var rX=Object.create;var Wk=Object.defineProperty;var aX=Object.getOwnPropertyDescriptor;var iX=Object.getOwnPropertyNames;var nX=Object.getPrototypeOf,oX=Object.prototype.hasOwnProperty;var sX=(ue,ge)=>()=>(ge||ue((ge={exports:{}}).exports,ge),ge.exports);var lX=(ue,ge,Ye,Rt)=>{if(ge&&typeof ge=="object"||typeof ge=="function")for(let gr of iX(ge))!oX.call(ue,gr)&&gr!==Ye&&Wk(ue,gr,{get:()=>ge[gr],enumerable:!(Rt=aX(ge,gr))||Rt.enumerable});return ue};var uX=(ue,ge,Ye)=>(Ye=ue!=null?rX(nX(ue)):{},lX(ge||!ue||!ue.__esModule?Wk(Ye,"default",{value:ue,enumerable:!0}):Ye,ue));var a7=sX((r7,c2)=>{(function(ue,ge){typeof c2=="object"&&c2.exports?c2.exports=ge():ue.moduleName=ge()})(typeof self<"u"?self:r7,()=>{"use strict";var ue=(()=>{var ge=Object.create,Ye=Object.defineProperty,Rt=Object.defineProperties,gr=Object.getOwnPropertyDescriptor,Yr=Object.getOwnPropertyDescriptors,Ea=Object.getOwnPropertyNames,ei=Object.getOwnPropertySymbols,oi=Object.getPrototypeOf,Cn=Object.prototype.hasOwnProperty,bn=Object.prototype.propertyIsEnumerable,Fn=(Z,G,v)=>G in Z?Ye(Z,G,{enumerable:!0,configurable:!0,writable:!0,value:v}):Z[G]=v,To=(Z,G)=>{for(var v in G||(G={}))Cn.call(G,v)&&Fn(Z,v,G[v]);if(ei)for(var v of ei(G))bn.call(G,v)&&Fn(Z,v,G[v]);return Z},ds=(Z,G)=>Rt(Z,Yr(G)),Qs=(Z,G)=>{var v={};for(var x in Z)Cn.call(Z,x)&&G.indexOf(x)<0&&(v[x]=Z[x]);if(Z!=null&&ei)for(var x of ei(Z))G.indexOf(x)<0&&bn.call(Z,x)&&(v[x]=Z[x]);return v},Vo=(Z,G)=>function(){return Z&&(G=(0,Z[Ea(Z)[0]])(Z=0)),G},Xe=(Z,G)=>function(){return G||(0,Z[Ea(Z)[0]])((G={exports:{}}).exports,G),G.exports},Kl=(Z,G)=>{for(var v in G)Ye(Z,v,{get:G[v],enumerable:!0})},nu=(Z,G,v,x)=>{if(G&&typeof G=="object"||typeof G=="function")for(let S of Ea(G))!Cn.call(Z,S)&&S!==v&&Ye(Z,S,{get:()=>G[S],enumerable:!(x=gr(G,S))||x.enumerable});return Z},jp=(Z,G,v)=>(v=Z!=null?ge(oi(Z)):{},nu(G||!Z||!Z.__esModule?Ye(v,"default",{value:Z,enumerable:!0}):v,Z)),zf=Z=>nu(Ye({},"__esModule",{value:!0}),Z),fp=Xe({"src/version.js"(Z){"use strict";Z.version="3.4.0"}}),Ff=Xe({"node_modules/native-promise-only/lib/npo.src.js"(Z,G){(function(x,S,E){S[x]=S[x]||E(),typeof G<"u"&&G.exports&&(G.exports=S[x])})("Promise",typeof window<"u"?window:Z,function(){"use strict";var x,S,E,e=Object.prototype.toString,t=typeof setImmediate<"u"?function(_){return setImmediate(_)}:setTimeout;try{Object.defineProperty({},"x",{}),x=function(_,w,A,M){return Object.defineProperty(_,w,{value:A,writable:!0,configurable:M!==!1})}}catch{x=function(w,A,M){return w[A]=M,w}}E=function(){var _,w,A;function M(g,b){this.fn=g,this.self=b,this.next=void 0}return{add:function(b,d){A=new M(b,d),w?w.next=A:_=A,w=A,A=void 0},drain:function(){var b=_;for(_=w=S=void 0;b;)b.fn.call(b.self),b=b.next}}}();function r(l,_){E.add(l,_),S||(S=t(E.drain))}function o(l){var _,w=typeof l;return l!=null&&(w=="object"||w=="function")&&(_=l.then),typeof _=="function"?_:!1}function a(){for(var l=0;l0&&r(a,w))}catch(A){s.call(new c(w),A)}}}function s(l){var _=this;_.triggered||(_.triggered=!0,_.def&&(_=_.def),_.msg=l,_.state=2,_.chain.length>0&&r(a,_))}function h(l,_,w,A){for(var M=0;M<_.length;M++)(function(b){l.resolve(_[b]).then(function(u){w(b,u)},A)})(M)}function c(l){this.def=l,this.triggered=!1}function m(l){this.promise=l,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function p(l){if(typeof l!="function")throw TypeError("Not a function");if(this.__NPO__!==0)throw TypeError("Not a promise");this.__NPO__=1;var _=new m(this);this.then=function(A,M){var g={success:typeof A=="function"?A:!0,failure:typeof M=="function"?M:!1};return g.promise=new this.constructor(function(d,u){if(typeof d!="function"||typeof u!="function")throw TypeError("Not a function");g.resolve=d,g.reject=u}),_.chain.push(g),_.state!==0&&r(a,_),g.promise},this.catch=function(A){return this.then(void 0,A)};try{l.call(void 0,function(A){i.call(_,A)},function(A){s.call(_,A)})}catch(w){s.call(_,w)}}var T=x({},"constructor",p,!1);return p.prototype=T,x(T,"__NPO__",0,!1),x(p,"resolve",function(_){var w=this;return _&&typeof _=="object"&&_.__NPO__===1?_:new w(function(M,g){if(typeof M!="function"||typeof g!="function")throw TypeError("Not a function");M(_)})}),x(p,"reject",function(_){return new this(function(A,M){if(typeof A!="function"||typeof M!="function")throw TypeError("Not a function");M(_)})}),x(p,"all",function(_){var w=this;return e.call(_)!="[object Array]"?w.reject(TypeError("Not an array")):_.length===0?w.resolve([]):new w(function(M,g){if(typeof M!="function"||typeof g!="function")throw TypeError("Not a function");var b=_.length,d=Array(b),u=0;h(w,_,function(f,R){d[f]=R,++u===b&&M(d)},g)})}),x(p,"race",function(_){var w=this;return e.call(_)!="[object Array]"?w.reject(TypeError("Not an array")):new w(function(M,g){if(typeof M!="function"||typeof g!="function")throw TypeError("Not a function");h(w,_,function(d,u){M(u)},g)})}),p})}}),Hn=Xe({"node_modules/@plotly/d3/d3.js"(Z,G){(function(){var v={version:"3.8.2"},x=[].slice,S=function(de){return x.call(de)},E=self.document;function e(de){return de&&(de.ownerDocument||de.document||de).documentElement}function t(de){return de&&(de.ownerDocument&&de.ownerDocument.defaultView||de.document&&de||de.defaultView)}if(E)try{S(E.documentElement.childNodes)[0].nodeType}catch{S=function(Fe){for(var et=Fe.length,mt=new Array(et);et--;)mt[et]=Fe[et];return mt}}if(Date.now||(Date.now=function(){return+new Date}),E)try{E.createElement("DIV").style.setProperty("opacity",0,"")}catch{var r=this.Element.prototype,o=r.setAttribute,a=r.setAttributeNS,n=this.CSSStyleDeclaration.prototype,i=n.setProperty;r.setAttribute=function(Fe,et){o.call(this,Fe,et+"")},r.setAttributeNS=function(Fe,et,mt){a.call(this,Fe,et,mt+"")},n.setProperty=function(Fe,et,mt){i.call(this,Fe,et+"",mt)}}v.ascending=s;function s(de,Fe){return deFe?1:de>=Fe?0:NaN}v.descending=function(de,Fe){return Fede?1:Fe>=de?0:NaN},v.min=function(de,Fe){var et=-1,mt=de.length,bt,Mt;if(arguments.length===1){for(;++et=Mt){bt=Mt;break}for(;++etMt&&(bt=Mt)}else{for(;++et=Mt){bt=Mt;break}for(;++etMt&&(bt=Mt)}return bt},v.max=function(de,Fe){var et=-1,mt=de.length,bt,Mt;if(arguments.length===1){for(;++et=Mt){bt=Mt;break}for(;++etbt&&(bt=Mt)}else{for(;++et=Mt){bt=Mt;break}for(;++etbt&&(bt=Mt)}return bt},v.extent=function(de,Fe){var et=-1,mt=de.length,bt,Mt,ar;if(arguments.length===1){for(;++et=Mt){bt=ar=Mt;break}for(;++etMt&&(bt=Mt),ar=Mt){bt=ar=Mt;break}for(;++etMt&&(bt=Mt),ar1)return ar/(_r-1)},v.deviation=function(){var de=v.variance.apply(this,arguments);return de&&Math.sqrt(de)};function m(de){return{left:function(Fe,et,mt,bt){for(arguments.length<3&&(mt=0),arguments.length<4&&(bt=Fe.length);mt>>1;de(Fe[Mt],et)<0?mt=Mt+1:bt=Mt}return mt},right:function(Fe,et,mt,bt){for(arguments.length<3&&(mt=0),arguments.length<4&&(bt=Fe.length);mt>>1;de(Fe[Mt],et)>0?bt=Mt:mt=Mt+1}return mt}}}var p=m(s);v.bisectLeft=p.left,v.bisect=v.bisectRight=p.right,v.bisector=function(de){return m(de.length===1?function(Fe,et){return s(de(Fe),et)}:de)},v.shuffle=function(de,Fe,et){(mt=arguments.length)<3&&(et=de.length,mt<2&&(Fe=0));for(var mt=et-Fe,bt,Mt;mt;)Mt=Math.random()*mt--|0,bt=de[mt+Fe],de[mt+Fe]=de[Mt+Fe],de[Mt+Fe]=bt;return de},v.permute=function(de,Fe){for(var et=Fe.length,mt=new Array(et);et--;)mt[et]=de[Fe[et]];return mt},v.pairs=function(de){for(var Fe=0,et=de.length-1,mt,bt=de[0],Mt=new Array(et<0?0:et);Fe=0;)for(ar=de[Fe],et=ar.length;--et>=0;)Mt[--bt]=ar[et];return Mt};var l=Math.abs;v.range=function(de,Fe,et){if(arguments.length<3&&(et=1,arguments.length<2&&(Fe=de,de=0)),(Fe-de)/et===1/0)throw new Error("infinite range");var mt=[],bt=_(l(et)),Mt=-1,ar;if(de*=bt,Fe*=bt,et*=bt,et<0)for(;(ar=de+et*++Mt)>Fe;)mt.push(ar/bt);else for(;(ar=de+et*++Mt)=Fe.length)return bt?bt.call(de,_r):mt?_r.sort(mt):_r;for(var Xr=-1,xa=_r.length,da=Fe[Gr++],Ja,ti,Sa,Fa=new A,Xa;++Xr=Fe.length)return Ot;var Gr=[],Xr=et[_r++];return Ot.forEach(function(xa,da){Gr.push({key:xa,values:ar(da,_r)})}),Xr?Gr.sort(function(xa,da){return Xr(xa.key,da.key)}):Gr}return de.map=function(Ot,_r){return Mt(_r,Ot,0)},de.entries=function(Ot){return ar(Mt(v.map,Ot,0),0)},de.key=function(Ot){return Fe.push(Ot),de},de.sortKeys=function(Ot){return et[Fe.length-1]=Ot,de},de.sortValues=function(Ot){return mt=Ot,de},de.rollup=function(Ot){return bt=Ot,de},de},v.set=function(de){var Fe=new z;if(de)for(var et=0,mt=de.length;et=0&&(mt=de.slice(et+1),de=de.slice(0,et)),de)return arguments.length<2?this[de].on(mt):this[de].on(mt,Fe);if(arguments.length===2){if(Fe==null)for(de in this)this.hasOwnProperty(de)&&this[de].on(mt,null);return this}};function X(de){var Fe=[],et=new A;function mt(){for(var bt=Fe,Mt=-1,ar=bt.length,Ot;++Mt=0&&(et=de.slice(0,Fe))!=="xmlns"&&(de=de.slice(Fe+1)),ce.hasOwnProperty(et)?{space:ce[et],local:de}:de}},ae.attr=function(de,Fe){if(arguments.length<2){if(typeof de=="string"){var et=this.node();return de=v.ns.qualify(de),de.local?et.getAttributeNS(de.space,de.local):et.getAttribute(de)}for(Fe in de)this.each(be(Fe,de[Fe]));return this}return this.each(be(de,Fe))};function be(de,Fe){de=v.ns.qualify(de);function et(){this.removeAttribute(de)}function mt(){this.removeAttributeNS(de.space,de.local)}function bt(){this.setAttribute(de,Fe)}function Mt(){this.setAttributeNS(de.space,de.local,Fe)}function ar(){var _r=Fe.apply(this,arguments);_r==null?this.removeAttribute(de):this.setAttribute(de,_r)}function Ot(){var _r=Fe.apply(this,arguments);_r==null?this.removeAttributeNS(de.space,de.local):this.setAttributeNS(de.space,de.local,_r)}return Fe==null?de.local?mt:et:typeof Fe=="function"?de.local?Ot:ar:de.local?Mt:bt}function Ae(de){return de.trim().replace(/\s+/g," ")}ae.classed=function(de,Fe){if(arguments.length<2){if(typeof de=="string"){var et=this.node(),mt=(de=ze(de)).length,bt=-1;if(Fe=et.classList){for(;++bt=0;)(Mt=et[mt])&&(bt&&bt!==Mt.nextSibling&&bt.parentNode.insertBefore(Mt,bt),bt=Mt);return this},ae.sort=function(de){de=Oe.apply(this,arguments);for(var Fe=-1,et=this.length;++Fe=Fe&&(Fe=bt+1);!(_r=ar[Fe])&&++Fe0&&(de=de.slice(0,bt));var ar=qt.get(de);ar&&(de=ar,Mt=kr);function Ot(){var Xr=this[mt];Xr&&(this.removeEventListener(de,Xr,Xr.$),delete this[mt])}function _r(){var Xr=Mt(Fe,S(arguments));Ot.call(this),this.addEventListener(de,this[mt]=Xr,Xr.$=et),Xr._=Fe}function Gr(){var Xr=new RegExp("^__on([^.]+)"+v.requote(de)+"$"),xa;for(var da in this)if(xa=da.match(Xr)){var Ja=this[da];this.removeEventListener(xa[1],Ja,Ja.$),delete this[da]}}return bt?Fe?_r:Ot:Fe?U:Gr}var qt=v.map({mouseenter:"mouseover",mouseleave:"mouseout"});E&&qt.forEach(function(de){"on"+de in E&&qt.remove(de)});function Wt(de,Fe){return function(et){var mt=v.event;v.event=et,Fe[0]=this.__data__;try{de.apply(this,Fe)}finally{v.event=mt}}}function kr(de,Fe){var et=Wt(de,Fe);return function(mt){var bt=this,Mt=mt.relatedTarget;(!Mt||Mt!==bt&&!(Mt.compareDocumentPosition(bt)&8))&&et.call(bt,mt)}}var mr,qr=0;function Sr(de){var Fe=".dragsuppress-"+ ++qr,et="click"+Fe,mt=v.select(t(de)).on("touchmove"+Fe,$).on("dragstart"+Fe,$).on("selectstart"+Fe,$);if(mr==null&&(mr="onselectstart"in de?!1:O(de.style,"userSelect")),mr){var bt=e(de).style,Mt=bt[mr];bt[mr]="none"}return function(ar){if(mt.on(Fe,null),mr&&(bt[mr]=Mt),ar){var Ot=function(){mt.on(et,null)};mt.on(et,function(){$(),Ot()},!0),setTimeout(Ot,0)}}}v.mouse=function(de){return wt(de,se())};var Rr=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function wt(de,Fe){Fe.changedTouches&&(Fe=Fe.changedTouches[0]);var et=de.ownerSVGElement||de;if(et.createSVGPoint){var mt=et.createSVGPoint();if(Rr<0){var bt=t(de);if(bt.scrollX||bt.scrollY){et=v.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var Mt=et[0][0].getScreenCTM();Rr=!(Mt.f||Mt.e),et.remove()}}return Rr?(mt.x=Fe.pageX,mt.y=Fe.pageY):(mt.x=Fe.clientX,mt.y=Fe.clientY),mt=mt.matrixTransform(de.getScreenCTM().inverse()),[mt.x,mt.y]}var ar=de.getBoundingClientRect();return[Fe.clientX-ar.left-de.clientLeft,Fe.clientY-ar.top-de.clientTop]}v.touch=function(de,Fe,et){if(arguments.length<3&&(et=Fe,Fe=se().changedTouches),Fe){for(var mt=0,bt=Fe.length,Mt;mt0?1:de<0?-1:0}function _t(de,Fe,et){return(Fe[0]-de[0])*(et[1]-de[1])-(Fe[1]-de[1])*(et[0]-de[0])}function Ct(de){return de>1?0:de<-1?Ie:Math.acos(de)}function ir(de){return de>1?Ee:de<-1?-Ee:Math.asin(de)}function rr(de){return((de=Math.exp(de))-1/de)/2}function er(de){return((de=Math.exp(de))+1/de)/2}function Lr(de){return((de=Math.exp(2*de))-1)/(de+1)}function fa(de){return(de=Math.sin(de/2))*de}var Da=Math.SQRT2,Ia=2,qa=4;v.interpolateZoom=function(de,Fe){var et=de[0],mt=de[1],bt=de[2],Mt=Fe[0],ar=Fe[1],Ot=Fe[2],_r=Mt-et,Gr=ar-mt,Xr=_r*_r+Gr*Gr,xa,da;if(Xr0&&(gn=gn.transition().duration(ar)),gn.call(ni.event)}function Jn(){Fa&&Fa.domain(Sa.range().map(function(gn){return(gn-de.x)/de.k}).map(Sa.invert)),fi&&fi.domain(Xa.range().map(function(gn){return(gn-de.y)/de.k}).map(Xa.invert))}function ro(gn){Ot++||gn({type:"zoomstart"})}function Yo(gn){Jn(),gn({type:"zoom",scale:de.k,translate:[de.x,de.y]})}function io(gn){--Ot||(gn({type:"zoomend"}),et=null)}function Ho(){var gn=this,vo=ti.of(gn,arguments),cs=0,ms=v.select(t(gn)).on(Gr,Su).on(Xr,Rl),Al=La(v.mouse(gn)),Hl=Sr(gn);Bn.call(gn),ro(vo);function Su(){cs=1,vn(v.mouse(gn),Al),Yo(vo)}function Rl(){ms.on(Gr,null).on(Xr,null),Hl(cs),io(vo)}}function cl(){var gn=this,vo=ti.of(gn,arguments),cs={},ms=0,Al,Hl=".zoom-"+v.event.changedTouches[0].identifier,Su="touchmove"+Hl,Rl="touchend"+Hl,_c=[],it=v.select(gn),Zt=Sr(gn);oa(),ro(vo),it.on(_r,null).on(da,oa);function fr(){var _a=v.touches(gn);return Al=de.k,_a.forEach(function(Ya){Ya.identifier in cs&&(cs[Ya.identifier]=La(Ya))}),_a}function oa(){var _a=v.event.target;v.select(_a).on(Su,wa).on(Rl,ma),_c.push(_a);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 wa(){var _a=v.touches(gn),Ya,bi,yi,si;Bn.call(gn);for(var yn=0,zi=_a.length;yn1?1:Fe,et=et<0?0:et>1?1:et,bt=et<=.5?et*(1+Fe):et+Fe-et*Fe,mt=2*et-bt;function Mt(Ot){return Ot>360?Ot-=360:Ot<0&&(Ot+=360),Ot<60?mt+(bt-mt)*Ot/60:Ot<180?bt:Ot<240?mt+(bt-mt)*(240-Ot)/60:mt}function ar(Ot){return Math.round(Mt(Ot)*255)}return new Tt(ar(de+120),ar(de),ar(de-120))}v.hcl=Jt;function Jt(de,Fe,et){return this instanceof Jt?(this.h=+de,this.c=+Fe,void(this.l=+et)):arguments.length<2?de instanceof Jt?new Jt(de.h,de.c,de.l):de instanceof ra?Ra(de.l,de.a,de.b):Ra((de=Hr((de=v.rgb(de)).r,de.g,de.b)).l,de.a,de.b):new Jt(de,Fe,et)}var Fr=Jt.prototype=new wi;Fr.brighter=function(de){return new Jt(this.h,this.c,Math.min(100,this.l+ca*(arguments.length?de:1)))},Fr.darker=function(de){return new Jt(this.h,this.c,Math.max(0,this.l-ca*(arguments.length?de:1)))},Fr.rgb=function(){return ta(this.h,this.c,this.l).rgb()};function ta(de,Fe,et){return isNaN(de)&&(de=0),isNaN(Fe)&&(Fe=0),new ra(et,Math.cos(de*=Pe)*Fe,Math.sin(de)*Fe)}v.lab=ra;function ra(de,Fe,et){return this instanceof ra?(this.l=+de,this.a=+Fe,void(this.b=+et)):arguments.length<2?de instanceof ra?new ra(de.l,de.a,de.b):de instanceof Jt?ta(de.h,de.c,de.l):Hr((de=Tt(de)).r,de.g,de.b):new ra(de,Fe,et)}var ca=18,Ba=.95047,$a=1,Za=1.08883,ri=ra.prototype=new wi;ri.brighter=function(de){return new ra(Math.min(100,this.l+ca*(arguments.length?de:1)),this.a,this.b)},ri.darker=function(de){return new ra(Math.max(0,this.l-ca*(arguments.length?de:1)),this.a,this.b)},ri.rgb=function(){return pi(this.l,this.a,this.b)};function pi(de,Fe,et){var mt=(de+16)/116,bt=mt+Fe/500,Mt=mt-et/200;return bt=tn(bt)*Ba,mt=tn(mt)*$a,Mt=tn(Mt)*Za,new Tt(hn(3.2404542*bt-1.5371385*mt-.4985314*Mt),hn(-.969266*bt+1.8760108*mt+.041556*Mt),hn(.0556434*bt-.2040259*mt+1.0572252*Mt))}function Ra(de,Fe,et){return de>0?new Jt(Math.atan2(et,Fe)*ft,Math.sqrt(Fe*Fe+et*et),de):new Jt(NaN,NaN,de)}function tn(de){return de>.206893034?de*de*de:(de-4/29)/7.787037}function on(de){return de>.008856?Math.pow(de,1/3):7.787037*de+4/29}function hn(de){return Math.round(255*(de<=.00304?12.92*de:1.055*Math.pow(de,1/2.4)-.055))}v.rgb=Tt;function Tt(de,Fe,et){return this instanceof Tt?(this.r=~~de,this.g=~~Fe,void(this.b=~~et)):arguments.length<2?de instanceof Tt?new Tt(de.r,de.g,de.b):Ir(""+de,Tt,Yt):new Tt(de,Fe,et)}function ut(de){return new Tt(de>>16,de>>8&255,de&255)}function Br(de){return ut(de)+""}var Cr=Tt.prototype=new wi;Cr.brighter=function(de){de=Math.pow(.7,arguments.length?de:1);var Fe=this.r,et=this.g,mt=this.b,bt=30;return!Fe&&!et&&!mt?new Tt(bt,bt,bt):(Fe&&Fe>4,mt=mt>>4|mt,bt=_r&240,bt=bt>>4|bt,Mt=_r&15,Mt=Mt<<4|Mt):de.length===7&&(mt=(_r&16711680)>>16,bt=(_r&65280)>>8,Mt=_r&255)),Fe(mt,bt,Mt))}function Ur(de,Fe,et){var mt=Math.min(de/=255,Fe/=255,et/=255),bt=Math.max(de,Fe,et),Mt=bt-mt,ar,Ot,_r=(bt+mt)/2;return Mt?(Ot=_r<.5?Mt/(bt+mt):Mt/(2-bt-mt),de==bt?ar=(Fe-et)/Mt+(Fe0&&_r<1?0:ar),new Kt(ar,Ot,_r)}function Hr(de,Fe,et){de=xt(de),Fe=xt(Fe),et=xt(et);var mt=on((.4124564*de+.3575761*Fe+.1804375*et)/Ba),bt=on((.2126729*de+.7151522*Fe+.072175*et)/$a),Mt=on((.0193339*de+.119192*Fe+.9503041*et)/Za);return ra(116*bt-16,500*(mt-bt),200*(bt-Mt))}function xt(de){return(de/=255)<=.04045?de/12.92:Math.pow((de+.055)/1.055,2.4)}function Xt(de){var Fe=parseFloat(de);return de.charAt(de.length-1)==="%"?Math.round(Fe*2.55):Fe}var vr=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});vr.forEach(function(de,Fe){vr.set(de,ut(Fe))});function Or(de){return typeof de=="function"?de:function(){return de}}v.functor=Or,v.xhr=ba(F);function ba(de){return function(Fe,et,mt){return arguments.length===2&&typeof et=="function"&&(mt=et,et=null),Pa(Fe,et,de,mt)}}function Pa(de,Fe,et,mt){var bt={},Mt=v.dispatch("beforesend","progress","load","error"),ar={},Ot=new XMLHttpRequest,_r=null;self.XDomainRequest&&!("withCredentials"in Ot)&&/^(http(s)?:)?\/\//.test(de)&&(Ot=new XDomainRequest),"onload"in Ot?Ot.onload=Ot.onerror=Gr:Ot.onreadystatechange=function(){Ot.readyState>3&&Gr()};function Gr(){var Xr=Ot.status,xa;if(!Xr&&la(Ot)||Xr>=200&&Xr<300||Xr===304){try{xa=et.call(bt,Ot)}catch(da){Mt.error.call(bt,da);return}Mt.load.call(bt,xa)}else Mt.error.call(bt,Ot)}return Ot.onprogress=function(Xr){var xa=v.event;v.event=Xr;try{Mt.progress.call(bt,Ot)}finally{v.event=xa}},bt.header=function(Xr,xa){return Xr=(Xr+"").toLowerCase(),arguments.length<2?ar[Xr]:(xa==null?delete ar[Xr]:ar[Xr]=xa+"",bt)},bt.mimeType=function(Xr){return arguments.length?(Fe=Xr==null?null:Xr+"",bt):Fe},bt.responseType=function(Xr){return arguments.length?(_r=Xr,bt):_r},bt.response=function(Xr){return et=Xr,bt},["get","post"].forEach(function(Xr){bt[Xr]=function(){return bt.send.apply(bt,[Xr].concat(S(arguments)))}}),bt.send=function(Xr,xa,da){if(arguments.length===2&&typeof xa=="function"&&(da=xa,xa=null),Ot.open(Xr,de,!0),Fe!=null&&!("accept"in ar)&&(ar.accept=Fe+",*/*"),Ot.setRequestHeader)for(var Ja in ar)Ot.setRequestHeader(Ja,ar[Ja]);return Fe!=null&&Ot.overrideMimeType&&Ot.overrideMimeType(Fe),_r!=null&&(Ot.responseType=_r),da!=null&&bt.on("error",da).on("load",function(ti){da(null,ti)}),Mt.beforesend.call(bt,Ot),Ot.send(xa??null),bt},bt.abort=function(){return Ot.abort(),bt},v.rebind(bt,Mt,"on"),mt==null?bt:bt.get(ya(mt))}function ya(de){return de.length===1?function(Fe,et){de(Fe==null?et:null)}:de}function la(de){var Fe=de.responseType;return Fe&&Fe!=="text"?de.response:de.responseText}v.dsv=function(de,Fe){var et=new RegExp('["'+de+` ]`),mt=de.charCodeAt(0);function bt(Gr,Xr,xa){arguments.length<3&&(xa=Xr,Xr=null);var da=Pa(Gr,Fe,Xr==null?Mt:ar(Xr),xa);return da.row=function(Ja){return arguments.length?da.response((Xr=Ja)==null?Mt:ar(Ja)):Xr},da}function Mt(Gr){return bt.parse(Gr.responseText)}function ar(Gr){return function(Xr){return bt.parse(Xr.responseText,Gr)}}bt.parse=function(Gr,Xr){var xa;return bt.parseRows(Gr,function(da,Ja){if(xa)return xa(da,Ja-1);var ti=function(Sa){for(var Fa={},Xa=da.length,fi=0;fi=ti)return da;if(fi)return fi=!1,xa;var sn=Sa;if(Gr.charCodeAt(sn)===34){for(var rn=sn;rn++24?(isFinite(Fe)&&(clearTimeout(Ki),Ki=setTimeout(En,Fe)),ki=0):(ki=1,_n(En))}v.timer.flush=function(){On(),no()};function On(){for(var de=Date.now(),Fe=Ta;Fe;)de>=Fe.t&&Fe.c(de-Fe.t)&&(Fe.c=null),Fe=Fe.n;return de}function no(){for(var de,Fe=Ta,et=1/0;Fe;)Fe.c?(Fe.t=0;--Ot)Sa.push(bt[Gr[xa[Ot]][2]]);for(Ot=+Ja;Ot1&&_t(de[et[mt-2]],de[et[mt-1]],de[bt])<=0;)--mt;et[mt++]=bt}return et.slice(0,mt)}function hs(de,Fe){return de[0]-Fe[0]||de[1]-Fe[1]}v.geom.polygon=function(de){return V(de,Oo),de};var Oo=v.geom.polygon.prototype=[];Oo.area=function(){for(var de=-1,Fe=this.length,et,mt=this[Fe-1],bt=0;++deKe)Ot=Ot.L;else if(ar=Fe-Gn(Ot,et),ar>Ke){if(!Ot.R){mt=Ot;break}Ot=Ot.R}else{Mt>-Ke?(mt=Ot.P,bt=Ot):ar>-Ke?(mt=Ot,bt=Ot.N):mt=bt=Ot;break}var _r=Xo(de);if(uo.insert(mt,_r),!(!mt&&!bt)){if(mt===bt){ko(mt),bt=Xo(mt.site),uo.insert(_r,bt),_r.edge=bt.edge=Vs(mt.site,_r.site),xn(mt),xn(bt);return}if(!bt){_r.edge=Vs(mt.site,_r.site);return}ko(mt),ko(bt);var Gr=mt.site,Xr=Gr.x,xa=Gr.y,da=de.x-Xr,Ja=de.y-xa,ti=bt.site,Sa=ti.x-Xr,Fa=ti.y-xa,Xa=2*(da*Fa-Ja*Sa),fi=da*da+Ja*Ja,ni=Sa*Sa+Fa*Fa,La={x:(Fa*fi-Ja*ni)/Xa+Xr,y:(da*ni-Sa*fi)/Xa+xa};Ts(bt.edge,Gr,ti,La),_r.edge=Vs(Gr,de,null,La),bt.edge=Vs(de,ti,null,La),xn(mt),xn(bt)}}function _s(de,Fe){var et=de.site,mt=et.x,bt=et.y,Mt=bt-Fe;if(!Mt)return mt;var ar=de.P;if(!ar)return-1/0;et=ar.site;var Ot=et.x,_r=et.y,Gr=_r-Fe;if(!Gr)return Ot;var Xr=Ot-mt,xa=1/Mt-1/Gr,da=Xr/Gr;return xa?(-da+Math.sqrt(da*da-2*xa*(Xr*Xr/(-2*Gr)-_r+Gr/2+bt-Mt/2)))/xa+mt:(mt+Ot)/2}function Gn(de,Fe){var et=de.N;if(et)return _s(et,Fe);var mt=de.site;return mt.y===Fe?mt.x:1/0}function zs(de){this.site=de,this.edges=[]}zs.prototype.prepare=function(){for(var de=this.edges,Fe=de.length,et;Fe--;)et=de[Fe].edge,(!et.b||!et.a)&&de.splice(Fe,1);return de.sort(Ws),de.length};function vs(de){for(var Fe=de[0][0],et=de[1][0],mt=de[0][1],bt=de[1][1],Mt,ar,Ot,_r,Gr=ss,Xr=Gr.length,xa,da,Ja,ti,Sa,Fa;Xr--;)if(xa=Gr[Xr],!(!xa||!xa.prepare()))for(Ja=xa.edges,ti=Ja.length,da=0;daKe||l(_r-ar)>Ke)&&(Ja.splice(da,0,new js(vl(xa.site,Fa,l(Ot-Fe)Ke?{x:Fe,y:l(Mt-Fe)Ke?{x:l(ar-bt)Ke?{x:et,y:l(Mt-et)Ke?{x:l(ar-mt)=-Te)){var da=_r*_r+Gr*Gr,Ja=Xr*Xr+Fa*Fa,ti=(Fa*da-Gr*Ja)/xa,Sa=(_r*Ja-Xr*da)/xa,Fa=Sa+Ot,Xa=Cs.pop()||new il;Xa.arc=de,Xa.site=bt,Xa.x=ti+ar,Xa.y=Fa+Math.sqrt(ti*ti+Sa*Sa),Xa.cy=Fa,de.circle=Xa;for(var fi=null,ni=ls._;ni;)if(Xa.y0)){if(Sa/=Ja,Ja<0){if(Sa0){if(Sa>da)return;Sa>xa&&(xa=Sa)}if(Sa=et-Ot,!(!Ja&&Sa<0)){if(Sa/=Ja,Ja<0){if(Sa>da)return;Sa>xa&&(xa=Sa)}else if(Ja>0){if(Sa0)){if(Sa/=ti,ti<0){if(Sa0){if(Sa>da)return;Sa>xa&&(xa=Sa)}if(Sa=mt-_r,!(!ti&&Sa<0)){if(Sa/=ti,ti<0){if(Sa>da)return;Sa>xa&&(xa=Sa)}else if(ti>0){if(Sa0&&(bt.a={x:Ot+xa*Ja,y:_r+xa*ti}),da<1&&(bt.b={x:Ot+da*Ja,y:_r+da*ti}),bt}}}}}}function Is(de){for(var Fe=Ns,et=bo(de[0][0],de[0][1],de[1][0],de[1][1]),mt=Fe.length,bt;mt--;)bt=Fe[mt],(!pu(bt,de)||!et(bt)||l(bt.a.x-bt.b.x)=Mt)return;if(Xr>da){if(!mt)mt={x:ti,y:ar};else if(mt.y>=Ot)return;et={x:ti,y:Ot}}else{if(!mt)mt={x:ti,y:Ot};else if(mt.y1)if(Xr>da){if(!mt)mt={x:(ar-Xa)/Fa,y:ar};else if(mt.y>=Ot)return;et={x:(Ot-Xa)/Fa,y:Ot}}else{if(!mt)mt={x:(Ot-Xa)/Fa,y:Ot};else if(mt.y=Mt)return;et={x:Mt,y:Fa*Mt+Xa}}else{if(!mt)mt={x:Mt,y:Fa*Mt+Xa};else if(mt.x=Xr&&Xa.x<=da&&Xa.y>=xa&&Xa.y<=Ja?[[Xr,Ja],[da,Ja],[da,xa],[Xr,xa]]:[];fi.point=_r[Sa]}),Gr}function Ot(_r){return _r.map(function(Gr,Xr){return{x:Math.round(mt(Gr,Xr)/Ke)*Ke,y:Math.round(bt(Gr,Xr)/Ke)*Ke,i:Xr}})}return ar.links=function(_r){return du(Ot(_r)).edges.filter(function(Gr){return Gr.l&&Gr.r}).map(function(Gr){return{source:_r[Gr.l.i],target:_r[Gr.r.i]}})},ar.triangles=function(_r){var Gr=[];return du(Ot(_r)).cells.forEach(function(Xr,xa){for(var da=Xr.site,Ja=Xr.edges.sort(Ws),ti=-1,Sa=Ja.length,Fa,Xa,fi=Ja[Sa-1].edge,ni=fi.l===da?fi.r:fi.l;++tini&&(ni=Xr.x),Xr.y>La&&(La=Xr.y),Ja.push(Xr.x),ti.push(Xr.y);else for(Sa=0;Sani&&(ni=sn),rn>La&&(La=rn),Ja.push(sn),ti.push(rn)}var vn=ni-Xa,Pn=La-fi;vn>Pn?La=fi+vn:ni=Xa+Pn;function Jn(io,Ho,cl,al,xl,gn,vo,cs){if(!(isNaN(cl)||isNaN(al)))if(io.leaf){var ms=io.x,Al=io.y;if(ms!=null)if(l(ms-cl)+l(Al-al)<.01)ro(io,Ho,cl,al,xl,gn,vo,cs);else{var Hl=io.point;io.x=io.y=io.point=null,ro(io,Hl,ms,Al,xl,gn,vo,cs),ro(io,Ho,cl,al,xl,gn,vo,cs)}else io.x=cl,io.y=al,io.point=Ho}else ro(io,Ho,cl,al,xl,gn,vo,cs)}function ro(io,Ho,cl,al,xl,gn,vo,cs){var ms=(xl+vo)*.5,Al=(gn+cs)*.5,Hl=cl>=ms,Su=al>=Al,Rl=Su<<1|Hl;io.leaf=!1,io=io.nodes[Rl]||(io.nodes[Rl]=lu()),Hl?xl=ms:vo=ms,Su?gn=Al:cs=Al,Jn(io,Ho,cl,al,xl,gn,vo,cs)}var Yo=lu();if(Yo.add=function(io){Jn(Yo,io,+xa(io,++Sa),+da(io,Sa),Xa,fi,ni,La)},Yo.visit=function(io){Pl(io,Yo,Xa,fi,ni,La)},Yo.find=function(io){return ic(Yo,io[0],io[1],Xa,fi,ni,La)},Sa=-1,Fe==null){for(;++SaMt||da>ar||Ja=sn,Pn=et>=rn,Jn=Pn<<1|vn,ro=Jn+4;Jnet&&(Mt=Fe.slice(et,Mt),Ot[ar]?Ot[ar]+=Mt:Ot[++ar]=Mt),(mt=mt[0])===(bt=bt[0])?Ot[ar]?Ot[ar]+=bt:Ot[++ar]=bt:(Ot[++ar]=null,_r.push({i:ar,x:ml(mt,bt)})),et=nc.lastIndex;return et=0&&!(mt=v.interpolators[et](de,Fe)););return mt}v.interpolators=[function(de,Fe){var et=typeof Fe;return(et==="string"?vr.has(Fe.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(Fe)?Ou:xs:Fe instanceof wi?Ou:Array.isArray(Fe)?qu:et==="object"&&isNaN(Fe)?nl:ml)(de,Fe)}],v.interpolateArray=qu;function qu(de,Fe){var et=[],mt=[],bt=de.length,Mt=Fe.length,ar=Math.min(de.length,Fe.length),Ot;for(Ot=0;Ot=0?de.slice(0,Fe):de,mt=Fe>=0?de.slice(Fe+1):"in";return et=xh.get(et)||fl,mt=ns.get(mt)||F,bh(mt(et.apply(null,x.call(arguments,1))))};function bh(de){return function(Fe){return Fe<=0?0:Fe>=1?1:de(Fe)}}function Es(de){return function(Fe){return 1-de(1-Fe)}}function to(de){return function(Fe){return .5*(Fe<.5?de(2*Fe):2-de(2-2*Fe))}}function Wc(de){return de*de}function Vu(de){return de*de*de}function jl(de){if(de<=0)return 0;if(de>=1)return 1;var Fe=de*de,et=Fe*de;return 4*(de<.5?et:3*(de-Fe)+et-.75)}function Mf(de){return function(Fe){return Math.pow(Fe,de)}}function Ac(de){return 1-Math.cos(de*Ee)}function nf(de){return Math.pow(2,10*(de-1))}function $l(de){return 1-Math.sqrt(1-de*de)}function Jf(de,Fe){var et;return arguments.length<2&&(Fe=.45),arguments.length?et=Fe/Ve*Math.asin(1/de):(de=1,et=Fe/4),function(mt){return 1+de*Math.pow(2,-10*mt)*Math.sin((mt-et)*Ve/Fe)}}function Of(de){return de||(de=1.70158),function(Fe){return Fe*Fe*((de+1)*Fe-de)}}function of(de){return de<1/2.75?7.5625*de*de:de<2/2.75?7.5625*(de-=1.5/2.75)*de+.75:de<2.5/2.75?7.5625*(de-=2.25/2.75)*de+.9375:7.5625*(de-=2.625/2.75)*de+.984375}v.interpolateHcl=jc;function jc(de,Fe){de=v.hcl(de),Fe=v.hcl(Fe);var et=de.h,mt=de.c,bt=de.l,Mt=Fe.h-et,ar=Fe.c-mt,Ot=Fe.l-bt;return isNaN(ar)&&(ar=0,mt=isNaN(mt)?Fe.c:mt),isNaN(Mt)?(Mt=0,et=isNaN(et)?Fe.h:et):Mt>180?Mt-=360:Mt<-180&&(Mt+=360),function(_r){return ta(et+Mt*_r,mt+ar*_r,bt+Ot*_r)+""}}v.interpolateHsl=Bf;function Bf(de,Fe){de=v.hsl(de),Fe=v.hsl(Fe);var et=de.h,mt=de.s,bt=de.l,Mt=Fe.h-et,ar=Fe.s-mt,Ot=Fe.l-bt;return isNaN(ar)&&(ar=0,mt=isNaN(mt)?Fe.s:mt),isNaN(Mt)?(Mt=0,et=isNaN(et)?Fe.h:et):Mt>180?Mt-=360:Mt<-180&&(Mt+=360),function(_r){return Yt(et+Mt*_r,mt+ar*_r,bt+Ot*_r)+""}}v.interpolateLab=Nf;function Nf(de,Fe){de=v.lab(de),Fe=v.lab(Fe);var et=de.l,mt=de.a,bt=de.b,Mt=Fe.l-et,ar=Fe.a-mt,Ot=Fe.b-bt;return function(_r){return pi(et+Mt*_r,mt+ar*_r,bt+Ot*_r)+""}}v.interpolateRound=Gu;function Gu(de,Fe){return Fe-=de,function(et){return Math.round(de+Fe*et)}}v.transform=function(de){var Fe=E.createElementNS(v.ns.prefix.svg,"g");return(v.transform=function(et){if(et!=null){Fe.setAttribute("transform",et);var mt=Fe.transform.baseVal.consolidate()}return new Ef(mt?mt.matrix:qc)})(de)};function Ef(de){var Fe=[de.a,de.b],et=[de.c,de.d],mt=Xc(Fe),bt=oc(Fe,et),Mt=Xc(Ql(et,Fe,-bt))||0;Fe[0]*et[1]180?Fe+=360:Fe-de>180&&(de+=360),mt.push({i:et.push(Sc(et)+"rotate(",null,")")-2,x:ml(de,Fe)})):Fe&&et.push(Sc(et)+"rotate("+Fe+")")}function fh(de,Fe,et,mt){de!==Fe?mt.push({i:et.push(Sc(et)+"skewX(",null,")")-2,x:ml(de,Fe)}):Fe&&et.push(Sc(et)+"skewX("+Fe+")")}function Uf(de,Fe,et,mt){if(de[0]!==Fe[0]||de[1]!==Fe[1]){var bt=et.push(Sc(et)+"scale(",null,",",null,")");mt.push({i:bt-4,x:ml(de[0],Fe[0])},{i:bt-2,x:ml(de[1],Fe[1])})}else(Fe[0]!==1||Fe[1]!==1)&&et.push(Sc(et)+"scale("+Fe+")")}function Zc(de,Fe){var et=[],mt=[];return de=v.transform(de),Fe=v.transform(Fe),Zs(de.translate,Fe.translate,et,mt),kf(de.rotate,Fe.rotate,et,mt),fh(de.skew,Fe.skew,et,mt),Uf(de.scale,Fe.scale,et,mt),de=Fe=null,function(bt){for(var Mt=-1,ar=mt.length,Ot;++Mt0?Mt=La:(et.c=null,et.t=NaN,et=null,Fe.end({type:"end",alpha:Mt=0})):La>0&&(Fe.start({type:"start",alpha:Mt=La}),et=Rn(de.tick)),de):Mt},de.start=function(){var La,sn=Ja.length,rn=ti.length,vn=mt[0],Pn=mt[1],Jn,ro;for(La=0;La=0;)Mt.push(Xr=Gr[_r]),Xr.parent=Ot,Xr.depth=Ot.depth+1;et&&(Ot.value=0),Ot.children=Gr}else et&&(Ot.value=+et.call(mt,Ot,Ot.depth)||0),delete Ot.children;return mc(bt,function(xa){var da,Ja;de&&(da=xa.children)&&da.sort(de),et&&(Ja=xa.parent)&&(Ja.value+=xa.value)}),ar}return mt.sort=function(bt){return arguments.length?(de=bt,mt):de},mt.children=function(bt){return arguments.length?(Fe=bt,mt):Fe},mt.value=function(bt){return arguments.length?(et=bt,mt):et},mt.revalue=function(bt){return et&&(Ec(bt,function(Mt){Mt.children&&(Mt.value=0)}),mc(bt,function(Mt){var ar;Mt.children||(Mt.value=+et.call(mt,Mt,Mt.depth)||0),(ar=Mt.parent)&&(ar.value+=Mt.value)})),bt},mt};function Bu(de,Fe){return v.rebind(de,Fe,"sort","children","value"),de.nodes=de,de.links=Nu,de}function Ec(de,Fe){for(var et=[de];(de=et.pop())!=null;)if(Fe(de),(bt=de.children)&&(mt=bt.length))for(var mt,bt;--mt>=0;)et.push(bt[mt])}function mc(de,Fe){for(var et=[de],mt=[];(de=et.pop())!=null;)if(mt.push(de),(ar=de.children)&&(Mt=ar.length))for(var bt=-1,Mt,ar;++btbt&&(bt=Ot),mt.push(Ot)}for(ar=0;armt&&(et=Fe,mt=bt);return et}function hl(de){return de.reduce(uf,0)}function uf(de,Fe){return de+Fe[1]}v.layout.histogram=function(){var de=!0,Fe=Number,et=gf,mt=kc;function bt(Mt,da){for(var Ot=[],_r=Mt.map(Fe,this),Gr=et.call(this,_r,da),Xr=mt.call(this,Gr,_r,da),xa,da=-1,Ja=_r.length,ti=Xr.length-1,Sa=de?1:1/Ja,Fa;++da0)for(da=-1;++da=Gr[0]&&Fa<=Gr[1]&&(xa=Ot[v.bisect(Xr,Fa,1,ti)-1],xa.y+=Sa,xa.push(Mt[da]));return Ot}return bt.value=function(Mt){return arguments.length?(Fe=Mt,bt):Fe},bt.range=function(Mt){return arguments.length?(et=Or(Mt),bt):et},bt.bins=function(Mt){return arguments.length?(mt=typeof Mt=="number"?function(ar){return Hu(ar,Mt)}:Or(Mt),bt):mt},bt.frequency=function(Mt){return arguments.length?(de=!!Mt,bt):de},bt};function kc(de,Fe){return Hu(de,Math.ceil(Math.log(Fe.length)/Math.LN2+1))}function Hu(de,Fe){for(var et=-1,mt=+de[0],bt=(de[1]-mt)/Fe,Mt=[];++et<=Fe;)Mt[et]=bt*et+mt;return Mt}function gf(de){return[v.min(de),v.max(de)]}v.layout.pack=function(){var de=v.layout.hierarchy().sort(Wu),Fe=0,et=[1,1],mt;function bt(Mt,ar){var Ot=de.call(this,Mt,ar),_r=Ot[0],Gr=et[0],Xr=et[1],xa=mt==null?Math.sqrt:typeof mt=="function"?mt:function(){return mt};if(_r.x=_r.y=0,mc(_r,function(Ja){Ja.r=+xa(Ja.value)}),mc(_r,Vf),Fe){var da=Fe*(mt?1:Math.max(2*_r.r/Gr,2*_r.r/Xr))/2;mc(_r,function(Ja){Ja.r+=da}),mc(_r,Vf),mc(_r,function(Ja){Ja.r-=da})}return gc(_r,Gr/2,Xr/2,mt?1:1/Math.max(2*_r.r/Gr,2*_r.r/Xr)),Ot}return bt.size=function(Mt){return arguments.length?(et=Mt,bt):et},bt.radius=function(Mt){return arguments.length?(mt=Mt==null||typeof Mt=="function"?Mt:+Mt,bt):mt},bt.padding=function(Mt){return arguments.length?(Fe=+Mt,bt):Fe},Bu(bt,de)};function Wu(de,Fe){return de.value-Fe.value}function Kc(de,Fe){var et=de._pack_next;de._pack_next=Fe,Fe._pack_prev=de,Fe._pack_next=et,et._pack_prev=Fe}function Lf(de,Fe){de._pack_next=Fe,Fe._pack_prev=de}function iu(de,Fe){var et=Fe.x-de.x,mt=Fe.y-de.y,bt=de.r+Fe.r;return .999*bt*bt>et*et+mt*mt}function Vf(de){if(!(Fe=de.children)||!(da=Fe.length))return;var Fe,et=1/0,mt=-1/0,bt=1/0,Mt=-1/0,ar,Ot,_r,Gr,Xr,xa,da;function Ja(La){et=Math.min(La.x-La.r,et),mt=Math.max(La.x+La.r,mt),bt=Math.min(La.y-La.r,bt),Mt=Math.max(La.y+La.r,Mt)}if(Fe.forEach(Xu),ar=Fe[0],ar.x=-ar.r,ar.y=0,Ja(ar),da>1&&(Ot=Fe[1],Ot.x=Ot.r,Ot.y=0,Ja(Ot),da>2))for(_r=Fe[2],ql(ar,Ot,_r),Ja(_r),Kc(ar,_r),ar._pack_prev=_r,Kc(_r,Ot),Ot=ar._pack_next,Gr=3;GrFa.x&&(Fa=sn),sn.depth>Xa.depth&&(Xa=sn)});var fi=Fe(Sa,Fa)/2-Sa.x,ni=et[0]/(Fa.x+Fe(Fa,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 da}function Mt(Xr){for(var xa={A:null,children:[Xr]},da=[xa],Ja;(Ja=da.pop())!=null;)for(var ti=Ja.children,Sa,Fa=0,Xa=ti.length;Fa0&&(sc(Qt(Sa,Xr,da),Xr,sn),Xa+=sn,fi+=sn),ni+=Sa.m,Xa+=Ja.m,La+=Fa.m,fi+=ti.m;Sa&&!Jc(ti)&&(ti.t=Sa,ti.m+=ni-fi),Ja&&!Lc(Fa)&&(Fa.t=Ja,Fa.m+=Xa-La,da=Xr)}return da}function Gr(Xr){Xr.x*=et[0],Xr.y=Xr.depth*et[1]}return bt.separation=function(Xr){return arguments.length?(Fe=Xr,bt):Fe},bt.size=function(Xr){return arguments.length?(mt=(et=Xr)==null?Gr:null,bt):mt?null:et},bt.nodeSize=function(Xr){return arguments.length?(mt=(et=Xr)==null?null:Gr,bt):mt?et:null},Bu(bt,de)};function xu(de,Fe){return de.parent==Fe.parent?1:2}function Lc(de){var Fe=de.children;return Fe.length?Fe[0]:de.t}function Jc(de){var Fe=de.children,et;return(et=Fe.length)?Fe[et-1]:de.t}function sc(de,Fe,et){var mt=et/(Fe.i-de.i);Fe.c-=mt,Fe.s+=et,de.c+=mt,Fe.z+=et,Fe.m+=et}function Pc(de){for(var Fe=0,et=0,mt=de.children,bt=mt.length,Mt;--bt>=0;)Mt=mt[bt],Mt.z+=Fe,Mt.m+=Fe,Fe+=Mt.s+(et+=Mt.c)}function Qt(de,Fe,et){return de.a.parent===Fe.parent?de.a:et}v.layout.cluster=function(){var de=v.layout.hierarchy().sort(null).value(null),Fe=xu,et=[1,1],mt=!1;function bt(Mt,ar){var Ot=de.call(this,Mt,ar),_r=Ot[0],Gr,Xr=0;mc(_r,function(Sa){var Fa=Sa.children;Fa&&Fa.length?(Sa.x=aa(Fa),Sa.y=br(Fa)):(Sa.x=Gr?Xr+=Fe(Sa,Gr):0,Sa.y=0,Gr=Sa)});var xa=$r(_r),da=ka(_r),Ja=xa.x-Fe(xa,da)/2,ti=da.x+Fe(da,xa)/2;return mc(_r,mt?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]}),Ot}return bt.separation=function(Mt){return arguments.length?(Fe=Mt,bt):Fe},bt.size=function(Mt){return arguments.length?(mt=(et=Mt)==null,bt):mt?null:et},bt.nodeSize=function(Mt){return arguments.length?(mt=(et=Mt)!=null,bt):mt?et:null},Bu(bt,de)};function br(de){return 1+v.max(de,function(Fe){return Fe.y})}function aa(de){return de.reduce(function(Fe,et){return Fe+et.x},0)/de.length}function $r(de){var Fe=de.children;return Fe&&Fe.length?$r(Fe[0]):de}function ka(de){var Fe=de.children,et;return Fe&&(et=Fe.length)?ka(Fe[et-1]):de}v.layout.treemap=function(){var de=v.layout.hierarchy(),Fe=Math.round,et=[1,1],mt=null,bt=li,Mt=!1,ar,Ot="squarify",_r=.5*(1+Math.sqrt(5));function Gr(Sa,Fa){for(var Xa=-1,fi=Sa.length,ni,La;++Xa0;)fi.push(La=ni[Pn-1]),fi.area+=La.area,Ot!=="squarify"||(rn=da(fi,vn))<=sn?(ni.pop(),sn=rn):(fi.area-=fi.pop().area,Ja(fi,vn,Xa,!1),vn=Math.min(Xa.dx,Xa.dy),fi.length=fi.area=0,sn=1/0);fi.length&&(Ja(fi,vn,Xa,!0),fi.length=fi.area=0),Fa.forEach(Xr)}}function xa(Sa){var Fa=Sa.children;if(Fa&&Fa.length){var Xa=bt(Sa),fi=Fa.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);Fa.forEach(xa)}}function da(Sa,Fa){for(var Xa=Sa.area,fi,ni=0,La=1/0,sn=-1,rn=Sa.length;++snni&&(ni=fi));return Xa*=Xa,Fa*=Fa,Xa?Math.max(Fa*ni*_r/Xa,Xa/(Fa*La*_r)):1/0}function Ja(Sa,Fa,Xa,fi){var ni=-1,La=Sa.length,sn=Xa.x,rn=Xa.y,vn=Fa?Fe(Sa.area/Fa):0,Pn;if(Fa==Xa.dx){for((fi||vn>Xa.dy)&&(vn=Xa.dy);++niXa.dx)&&(vn=Xa.dx);++ni1);return de+Fe*mt*Math.sqrt(-2*Math.log(Mt)/Mt)}},logNormal:function(){var de=v.random.normal.apply(v,arguments);return function(){return Math.exp(de())}},bates:function(de){var Fe=v.random.irwinHall(de);return function(){return Fe()/de}},irwinHall:function(de){return function(){for(var Fe=0,et=0;et2?mi:dn,Gr=mt?Cu:$f;return bt=_r(de,Fe,Gr,et),Mt=_r(Fe,de,Gr,Ul),Ot}function Ot(_r){return bt(_r)}return Ot.invert=function(_r){return Mt(_r)},Ot.domain=function(_r){return arguments.length?(de=_r.map(Number),ar()):de},Ot.range=function(_r){return arguments.length?(Fe=_r,ar()):Fe},Ot.rangeRound=function(_r){return Ot.range(_r).interpolate(Gu)},Ot.clamp=function(_r){return arguments.length?(mt=_r,ar()):mt},Ot.interpolate=function(_r){return arguments.length?(et=_r,ar()):et},Ot.ticks=function(_r){return fo(de,_r)},Ot.tickFormat=function(_r,Gr){return d3_scale_linearTickFormat(de,_r,Gr)},Ot.nice=function(_r){return ao(de,_r),ar()},Ot.copy=function(){return Mn(de,Fe,et,mt)},ar()}function Qn(de,Fe){return v.rebind(de,Fe,"range","rangeRound","interpolate","clamp")}function ao(de,Fe){return Pi(de,Di(eo(de,Fe)[2])),Pi(de,Di(eo(de,Fe)[2])),de}function eo(de,Fe){Fe==null&&(Fe=10);var et=Hi(de),mt=et[1]-et[0],bt=Math.pow(10,Math.floor(Math.log(mt/Fe)/Math.LN10)),Mt=Fe/mt*bt;return Mt<=.15?bt*=10:Mt<=.35?bt*=5:Mt<=.75&&(bt*=2),et[0]=Math.ceil(et[0]/bt)*bt,et[1]=Math.floor(et[1]/bt)*bt+bt*.5,et[2]=bt,et}function fo(de,Fe){return v.range.apply(v,eo(de,Fe))}var An={s:1,g:1,p:1,r:1,e:1};function un(de){return-Math.floor(Math.log(de)/Math.LN10+.01)}function yo(de,Fe){var et=un(Fe[2]);return de in An?Math.abs(et-un(Math.max(l(Fe[0]),l(Fe[1]))))+ +(de!=="e"):et-(de==="%")*2}v.scale.log=function(){return Ko(v.scale.linear().domain([0,1]),10,!0,[1,10])};function Ko(de,Fe,et,mt){function bt(Ot){return(et?Math.log(Ot<0?0:Ot):-Math.log(Ot>0?0:-Ot))/Math.log(Fe)}function Mt(Ot){return et?Math.pow(Fe,Ot):-Math.pow(Fe,-Ot)}function ar(Ot){return de(bt(Ot))}return ar.invert=function(Ot){return Mt(de.invert(Ot))},ar.domain=function(Ot){return arguments.length?(et=Ot[0]>=0,de.domain((mt=Ot.map(Number)).map(bt)),ar):mt},ar.base=function(Ot){return arguments.length?(Fe=+Ot,de.domain(mt.map(bt)),ar):Fe},ar.nice=function(){var Ot=Pi(mt.map(bt),et?Math:Ss);return de.domain(Ot),mt=Ot.map(Mt),ar},ar.ticks=function(){var Ot=Hi(mt),_r=[],Gr=Ot[0],Xr=Ot[1],xa=Math.floor(bt(Gr)),da=Math.ceil(bt(Xr)),Ja=Fe%1?2:Fe;if(isFinite(da-xa)){if(et){for(;xa0;ti--)_r.push(Mt(xa)*ti);for(xa=0;_r[xa]Xr;da--);_r=_r.slice(xa,da)}return _r},ar.copy=function(){return Ko(de.copy(),Fe,et,mt)},Qn(ar,de)}var Ss={floor:function(de){return-Math.ceil(-de)},ceil:function(de){return-Math.floor(-de)}};v.scale.pow=function(){return rl(v.scale.linear(),1,[0,1])};function rl(de,Fe,et){var mt=Os(Fe),bt=Os(1/Fe);function Mt(ar){return de(mt(ar))}return Mt.invert=function(ar){return bt(de.invert(ar))},Mt.domain=function(ar){return arguments.length?(de.domain((et=ar.map(Number)).map(mt)),Mt):et},Mt.ticks=function(ar){return fo(et,ar)},Mt.tickFormat=function(ar,Ot){return d3_scale_linearTickFormat(et,ar,Ot)},Mt.nice=function(ar){return Mt.domain(ao(et,ar))},Mt.exponent=function(ar){return arguments.length?(mt=Os(Fe=ar),bt=Os(1/Fe),de.domain(et.map(mt)),Mt):Fe},Mt.copy=function(){return rl(de.copy(),Fe,et)},Qn(Mt,de)}function Os(de){return function(Fe){return Fe<0?-Math.pow(-Fe,de):Math.pow(Fe,de)}}v.scale.sqrt=function(){return v.scale.pow().exponent(.5)},v.scale.ordinal=function(){return el([],{t:"range",a:[[]]})};function el(de,Fe){var et,mt,bt;function Mt(Ot){return mt[((et.get(Ot)||(Fe.t==="range"?et.set(Ot,de.push(Ot)):NaN))-1)%mt.length]}function ar(Ot,_r){return v.range(de.length).map(function(Gr){return Ot+_r*Gr})}return Mt.domain=function(Ot){if(!arguments.length)return de;de=[],et=new A;for(var _r=-1,Gr=Ot.length,Xr;++_r0?et[Mt-1]:de[0],Mtda?0:1;if(Xr=Ce)return _r(Xr,ti)+(Gr?_r(Gr,1-ti):"")+"Z";var Sa,Fa,Xa,fi,ni=0,La=0,sn,rn,vn,Pn,Jn,ro,Yo,io,Ho=[];if((fi=(+ar.apply(this,arguments)||0)/2)&&(Xa=mt===Iu?Math.sqrt(Gr*Gr+Xr*Xr):+mt.apply(this,arguments),ti||(La*=-1),Xr&&(La=ir(Xa/Xr*Math.sin(fi))),Gr&&(ni=ir(Xa/Gr*Math.sin(fi)))),Xr){sn=Xr*Math.cos(xa+La),rn=Xr*Math.sin(xa+La),vn=Xr*Math.cos(da-La),Pn=Xr*Math.sin(da-La);var cl=Math.abs(da-xa-2*La)<=Ie?0:1;if(La&&yc(sn,rn,vn,Pn)===ti^cl){var al=(xa+da)/2;sn=Xr*Math.cos(al),rn=Xr*Math.sin(al),vn=Pn=null}}else sn=rn=0;if(Gr){Jn=Gr*Math.cos(da-ni),ro=Gr*Math.sin(da-ni),Yo=Gr*Math.cos(xa+ni),io=Gr*Math.sin(xa+ni);var xl=Math.abs(xa-da+2*ni)<=Ie?0:1;if(ni&&yc(Jn,ro,Yo,io)===1-ti^xl){var gn=(xa+da)/2;Jn=Gr*Math.cos(gn),ro=Gr*Math.sin(gn),Yo=io=null}}else Jn=ro=0;if(Ja>Ke&&(Sa=Math.min(Math.abs(Xr-Gr)/2,+et.apply(this,arguments)))>.001){Fa=Gr0?0:1}function ho(de,Fe,et,mt,bt){var Mt=de[0]-Fe[0],ar=de[1]-Fe[1],Ot=(bt?mt:-mt)/Math.sqrt(Mt*Mt+ar*ar),_r=Ot*ar,Gr=-Ot*Mt,Xr=de[0]+_r,xa=de[1]+Gr,da=Fe[0]+_r,Ja=Fe[1]+Gr,ti=(Xr+da)/2,Sa=(xa+Ja)/2,Fa=da-Xr,Xa=Ja-xa,fi=Fa*Fa+Xa*Xa,ni=et-mt,La=Xr*Ja-da*xa,sn=(Xa<0?-1:1)*Math.sqrt(Math.max(0,ni*ni*fi-La*La)),rn=(La*Xa-Fa*sn)/fi,vn=(-La*Fa-Xa*sn)/fi,Pn=(La*Xa+Fa*sn)/fi,Jn=(-La*Fa+Xa*sn)/fi,ro=rn-ti,Yo=vn-Sa,io=Pn-ti,Ho=Jn-Sa;return ro*ro+Yo*Yo>io*io+Ho*Ho&&(rn=Pn,vn=Jn),[[rn-_r,vn-Gr],[rn*et/ni,vn*et/ni]]}function Ro(){return!0}function Dc(de){var Fe=cn,et=lo,mt=Ro,bt=Yu,Mt=bt.key,ar=.7;function Ot(_r){var Gr=[],Xr=[],xa=-1,da=_r.length,Ja,ti=Or(Fe),Sa=Or(et);function Fa(){Gr.push("M",bt(de(Xr),ar))}for(;++xa1?de.join("L"):de+"Z"}function Ue(de){return de.join("L")+"Z"}function I(de){for(var Fe=0,et=de.length,mt=de[0],bt=[mt[0],",",mt[1]];++Fe1&&bt.push("H",mt[0]),bt.join("")}function ie(de){for(var Fe=0,et=de.length,mt=de[0],bt=[mt[0],",",mt[1]];++Fe1){Ot=Fe[1],Mt=de[_r],_r++,mt+="C"+(bt[0]+ar[0])+","+(bt[1]+ar[1])+","+(Mt[0]-Ot[0])+","+(Mt[1]-Ot[1])+","+Mt[0]+","+Mt[1];for(var Gr=2;Gr9&&(Mt=et*3/Math.sqrt(Mt),ar[Ot]=Mt*mt,ar[Ot+1]=Mt*bt));for(Ot=-1;++Ot<=_r;)Mt=(de[Math.min(_r,Ot+1)][0]-de[Math.max(0,Ot-1)][0])/(6*(1+ar[Ot]*ar[Ot])),Fe.push([Mt||0,ar[Ot]*Mt||0]);return Fe}function cr(de){return de.length<3?Yu(de):de[0]+St(de,zt(de))}v.svg.line.radial=function(){var de=Dc(yr);return de.radius=de.x,delete de.x,de.angle=de.y,delete de.y,de};function yr(de){for(var Fe,et=-1,mt=de.length,bt,Mt;++etIe)+",1 "+xa}function Gr(Xr,xa,da,Ja){return"Q 0,0 "+Ja}return Mt.radius=function(Xr){return arguments.length?(et=Or(Xr),Mt):et},Mt.source=function(Xr){return arguments.length?(de=Or(Xr),Mt):de},Mt.target=function(Xr){return arguments.length?(Fe=Or(Xr),Mt):Fe},Mt.startAngle=function(Xr){return arguments.length?(mt=Or(Xr),Mt):mt},Mt.endAngle=function(Xr){return arguments.length?(bt=Or(Xr),Mt):bt},Mt};function pa(de){return de.radius}v.svg.diagonal=function(){var de=jr,Fe=Qr,et=Aa;function mt(bt,Mt){var ar=de.call(this,bt,Mt),Ot=Fe.call(this,bt,Mt),_r=(ar.y+Ot.y)/2,Gr=[ar,{x:ar.x,y:_r},{x:Ot.x,y:_r},Ot];return Gr=Gr.map(et),"M"+Gr[0]+"C"+Gr[1]+" "+Gr[2]+" "+Gr[3]}return mt.source=function(bt){return arguments.length?(de=Or(bt),mt):de},mt.target=function(bt){return arguments.length?(Fe=Or(bt),mt):Fe},mt.projection=function(bt){return arguments.length?(et=bt,mt):et},mt};function Aa(de){return[de.x,de.y]}v.svg.diagonal.radial=function(){var de=v.svg.diagonal(),Fe=Aa,et=de.projection;return de.projection=function(mt){return arguments.length?et(za(Fe=mt)):Fe},de};function za(de){return function(){var Fe=de.apply(this,arguments),et=Fe[0],mt=Fe[1]-Ee;return[et*Math.cos(mt),et*Math.sin(mt)]}}v.svg.symbol=function(){var de=Vi,Fe=ci;function et(mt,bt){return(nn.get(de.call(this,mt,bt))||ji)(Fe.call(this,mt,bt))}return et.type=function(mt){return arguments.length?(de=Or(mt),et):de},et.size=function(mt){return arguments.length?(Fe=Or(mt),et):Fe},et};function ci(){return 64}function Vi(){return"circle"}function ji(de){var Fe=Math.sqrt(de/Ie);return"M0,"+Fe+"A"+Fe+","+Fe+" 0 1,1 0,"+-Fe+"A"+Fe+","+Fe+" 0 1,1 0,"+Fe+"Z"}var nn=v.map({circle:ji,cross:function(de){var Fe=Math.sqrt(de/5)/2;return"M"+-3*Fe+","+-Fe+"H"+-Fe+"V"+-3*Fe+"H"+Fe+"V"+-Fe+"H"+3*Fe+"V"+Fe+"H"+Fe+"V"+3*Fe+"H"+-Fe+"V"+Fe+"H"+-3*Fe+"Z"},diamond:function(de){var Fe=Math.sqrt(de/(2*Kn)),et=Fe*Kn;return"M0,"+-Fe+"L"+et+",0 0,"+Fe+" "+-et+",0Z"},square:function(de){var Fe=Math.sqrt(de)/2;return"M"+-Fe+","+-Fe+"L"+Fe+","+-Fe+" "+Fe+","+Fe+" "+-Fe+","+Fe+"Z"},"triangle-down":function(de){var Fe=Math.sqrt(de/Sn),et=Fe*Sn/2;return"M0,"+et+"L"+Fe+","+-et+" "+-Fe+","+-et+"Z"},"triangle-up":function(de){var Fe=Math.sqrt(de/Sn),et=Fe*Sn/2;return"M0,"+-et+"L"+Fe+","+et+" "+-Fe+","+et+"Z"}});v.svg.symbolTypes=nn.keys();var Sn=Math.sqrt(3),Kn=Math.tan(30*Pe);ae.transition=function(de){for(var Fe=ps||++Zo,et=$o(de),mt=[],bt,Mt,ar=ul||{time:Date.now(),ease:jl,delay:0,duration:250},Ot=-1,_r=this.length;++Ot<_r;){mt.push(bt=[]);for(var Gr=this[Ot],Xr=-1,xa=Gr.length;++Xr0;)xa[--fi].call(de,Xa);if(Fa>=1)return ar.event&&ar.event.end.call(de,de.__data__,Fe),--Mt.count?delete Mt[mt]:delete de[et],1}ar||(Ot=bt.time,_r=Rn(da,0,Ot),ar=Mt[mt]={tween:new A,time:Ot,timer:_r,delay:bt.delay,duration:bt.duration,ease:bt.ease,index:Fe},bt=null,++Mt.count)}v.svg.axis=function(){var de=v.scale.linear(),Fe=eu,et=6,mt=6,bt=3,Mt=[10],ar=null,Ot;function _r(Gr){Gr.each(function(){var Xr=v.select(this),xa=this.__chart__||de,da=this.__chart__=de.copy(),Ja=ar??(da.ticks?da.ticks.apply(da,Mt):da.domain()),ti=Ot??(da.tickFormat?da.tickFormat.apply(da,Mt):F),Sa=Xr.selectAll(".tick").data(Ja,da),Fa=Sa.enter().insert("g",".domain").attr("class","tick").style("opacity",Ke),Xa=v.transition(Sa.exit()).style("opacity",Ke).remove(),fi=v.transition(Sa.order()).style("opacity",1),ni=Math.max(et,0)+bt,La,sn=Qi(da),rn=Xr.selectAll(".domain").data([0]),vn=(rn.enter().append("path").attr("class","domain"),v.transition(rn));Fa.append("line"),Fa.append("text");var Pn=Fa.select("line"),Jn=fi.select("line"),ro=Sa.select("text").text(ti),Yo=Fa.select("text"),io=fi.select("text"),Ho=Fe==="top"||Fe==="left"?-1:1,cl,al,xl,gn;if(Fe==="bottom"||Fe==="top"?(La=vu,cl="x",xl="y",al="x2",gn="y2",ro.attr("dy",Ho<0?"0em":".71em").style("text-anchor","middle"),vn.attr("d","M"+sn[0]+","+Ho*mt+"V0H"+sn[1]+"V"+Ho*mt)):(La=Tl,cl="y",xl="x",al="y2",gn="x2",ro.attr("dy",".32em").style("text-anchor",Ho<0?"end":"start"),vn.attr("d","M"+Ho*mt+","+sn[0]+"H0V"+sn[1]+"H"+Ho*mt)),Pn.attr(gn,Ho*et),Yo.attr(xl,Ho*ni),Jn.attr(al,0).attr(gn,Ho*et),io.attr(cl,0).attr(xl,Ho*ni),da.rangeBand){var vo=da,cs=vo.rangeBand()/2;xa=da=function(ms){return vo(ms)+cs}}else xa.rangeBand?xa=da:Xa.call(La,da,xa);Fa.call(La,xa,da),fi.call(La,da,da)})}return _r.scale=function(Gr){return arguments.length?(de=Gr,_r):de},_r.orient=function(Gr){return arguments.length?(Fe=Gr in Ru?Gr+"":eu,_r):Fe},_r.ticks=function(){return arguments.length?(Mt=S(arguments),_r):Mt},_r.tickValues=function(Gr){return arguments.length?(ar=Gr,_r):ar},_r.tickFormat=function(Gr){return arguments.length?(Ot=Gr,_r):Ot},_r.tickSize=function(Gr){var Xr=arguments.length;return Xr?(et=+Gr,mt=+arguments[Xr-1],_r):et},_r.innerTickSize=function(Gr){return arguments.length?(et=+Gr,_r):et},_r.outerTickSize=function(Gr){return arguments.length?(mt=+Gr,_r):mt},_r.tickPadding=function(Gr){return arguments.length?(bt=+Gr,_r):bt},_r.tickSubdivide=function(){return arguments.length&&_r},_r};var eu="bottom",Ru={top:1,right:1,bottom:1,left:1};function vu(de,Fe,et){de.attr("transform",function(mt){var bt=Fe(mt);return"translate("+(isFinite(bt)?bt:et(mt))+",0)"})}function Tl(de,Fe,et){de.attr("transform",function(mt){var bt=Fe(mt);return"translate(0,"+(isFinite(bt)?bt:et(mt))+")"})}v.svg.brush=function(){var de=le(Xr,"brushstart","brush","brushend"),Fe=null,et=null,mt=[0,0],bt=[0,0],Mt,ar,Ot=!0,_r=!0,Gr=uc[0];function Xr(Sa){Sa.each(function(){var Fa=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=Fa.selectAll(".background").data([0]);Xa.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),Fa.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var fi=Fa.selectAll(".resize").data(Gr,F);fi.exit().remove(),fi.enter().append("g").attr("class",function(rn){return"resize "+rn}).style("cursor",function(rn){return cu[rn]}).append("rect").attr("x",function(rn){return/[ew]$/.test(rn)?-3:null}).attr("y",function(rn){return/^[ns]/.test(rn)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),fi.style("display",Xr.empty()?"none":null);var ni=v.transition(Fa),La=v.transition(Xa),sn;Fe&&(sn=Qi(Fe),La.attr("x",sn[0]).attr("width",sn[1]-sn[0]),da(ni)),et&&(sn=Qi(et),La.attr("y",sn[0]).attr("height",sn[1]-sn[0]),Ja(ni)),xa(ni)})}Xr.event=function(Sa){Sa.each(function(){var Fa=de.of(this,arguments),Xa={x:mt,y:bt,i:Mt,j:ar},fi=this.__chart__||Xa;this.__chart__=Xa,ps?v.select(this).transition().each("start.brush",function(){Mt=fi.i,ar=fi.j,mt=fi.x,bt=fi.y,Fa({type:"brushstart"})}).tween("brush:brush",function(){var ni=qu(mt,Xa.x),La=qu(bt,Xa.y);return Mt=ar=null,function(sn){mt=Xa.x=ni(sn),bt=Xa.y=La(sn),Fa({type:"brush",mode:"resize"})}}).each("end.brush",function(){Mt=Xa.i,ar=Xa.j,Fa({type:"brush",mode:"resize"}),Fa({type:"brushend"})}):(Fa({type:"brushstart"}),Fa({type:"brush",mode:"resize"}),Fa({type:"brushend"}))})};function xa(Sa){Sa.selectAll(".resize").attr("transform",function(Fa){return"translate("+mt[+/e$/.test(Fa)]+","+bt[+/^s/.test(Fa)]+")"})}function da(Sa){Sa.select(".extent").attr("x",mt[0]),Sa.selectAll(".extent,.n>rect,.s>rect").attr("width",mt[1]-mt[0])}function Ja(Sa){Sa.select(".extent").attr("y",bt[0]),Sa.selectAll(".extent,.e>rect,.w>rect").attr("height",bt[1]-bt[0])}function ti(){var Sa=this,Fa=v.select(v.event.target),Xa=de.of(Sa,arguments),fi=v.select(Sa),ni=Fa.datum(),La=!/^(n|s)$/.test(ni)&&Fe,sn=!/^(e|w)$/.test(ni)&&et,rn=Fa.classed("extent"),vn=Sr(Sa),Pn,Jn=v.mouse(Sa),ro,Yo=v.select(t(Sa)).on("keydown.brush",cl).on("keyup.brush",al);if(v.event.changedTouches?Yo.on("touchmove.brush",xl).on("touchend.brush",vo):Yo.on("mousemove.brush",xl).on("mouseup.brush",vo),fi.interrupt().selectAll("*").interrupt(),rn)Jn[0]=mt[0]-Jn[0],Jn[1]=bt[0]-Jn[1];else if(ni){var io=+/w$/.test(ni),Ho=+/^n/.test(ni);ro=[mt[1-io]-Jn[0],bt[1-Ho]-Jn[1]],Jn[0]=mt[io],Jn[1]=bt[Ho]}else v.event.altKey&&(Pn=Jn.slice());fi.style("pointer-events","none").selectAll(".resize").style("display",null),v.select("body").style("cursor",Fa.style("cursor")),Xa({type:"brushstart"}),xl();function cl(){v.event.keyCode==32&&(rn||(Pn=null,Jn[0]-=mt[1],Jn[1]-=bt[1],rn=2),$())}function al(){v.event.keyCode==32&&rn==2&&(Jn[0]+=mt[1],Jn[1]+=bt[1],rn=0,$())}function xl(){var cs=v.mouse(Sa),ms=!1;ro&&(cs[0]+=ro[0],cs[1]+=ro[1]),rn||(v.event.altKey?(Pn||(Pn=[(mt[0]+mt[1])/2,(bt[0]+bt[1])/2]),Jn[0]=mt[+(cs[0]0))return Wt;do Wt.push(kr=new Date(+Pt)),Oe(Pt,qt),he(Pt);while(kr=It)for(;he(It),!Pt(It);)It.setTime(It-1)},function(It,qt){if(It>=It)if(qt<0)for(;++qt<=0;)for(;Oe(It,-1),!Pt(It););else for(;--qt>=0;)for(;Oe(It,1),!Pt(It););})},tt&&(Qe.count=function(Pt,It){return x.setTime(+Pt),S.setTime(+It),he(x),he(S),Math.floor(tt(x,S))},Qe.every=function(Pt){return Pt=Math.floor(Pt),!isFinite(Pt)||!(Pt>0)?null:Pt>1?Qe.filter(ot?function(It){return ot(It)%Pt===0}:function(It){return Qe.count(0,It)%Pt===0}):Qe}),Qe}var e=E(function(){},function(he,Oe){he.setTime(+he+Oe)},function(he,Oe){return Oe-he});e.every=function(he){return he=Math.floor(he),!isFinite(he)||!(he>0)?null:he>1?E(function(Oe){Oe.setTime(Math.floor(Oe/he)*he)},function(Oe,tt){Oe.setTime(+Oe+tt*he)},function(Oe,tt){return(tt-Oe)/he}):e};var t=e.range,r=1e3,o=6e4,a=36e5,n=864e5,i=6048e5,s=E(function(he){he.setTime(he-he.getMilliseconds())},function(he,Oe){he.setTime(+he+Oe*r)},function(he,Oe){return(Oe-he)/r},function(he){return he.getUTCSeconds()}),h=s.range,c=E(function(he){he.setTime(he-he.getMilliseconds()-he.getSeconds()*r)},function(he,Oe){he.setTime(+he+Oe*o)},function(he,Oe){return(Oe-he)/o},function(he){return he.getMinutes()}),m=c.range,p=E(function(he){he.setTime(he-he.getMilliseconds()-he.getSeconds()*r-he.getMinutes()*o)},function(he,Oe){he.setTime(+he+Oe*a)},function(he,Oe){return(Oe-he)/a},function(he){return he.getHours()}),T=p.range,l=E(function(he){he.setHours(0,0,0,0)},function(he,Oe){he.setDate(he.getDate()+Oe)},function(he,Oe){return(Oe-he-(Oe.getTimezoneOffset()-he.getTimezoneOffset())*o)/n},function(he){return he.getDate()-1}),_=l.range;function w(he){return E(function(Oe){Oe.setDate(Oe.getDate()-(Oe.getDay()+7-he)%7),Oe.setHours(0,0,0,0)},function(Oe,tt){Oe.setDate(Oe.getDate()+tt*7)},function(Oe,tt){return(tt-Oe-(tt.getTimezoneOffset()-Oe.getTimezoneOffset())*o)/i})}var A=w(0),M=w(1),g=w(2),b=w(3),d=w(4),u=w(5),y=w(6),f=A.range,R=M.range,L=g.range,z=b.range,F=d.range,N=u.range,O=y.range,P=E(function(he){he.setDate(1),he.setHours(0,0,0,0)},function(he,Oe){he.setMonth(he.getMonth()+Oe)},function(he,Oe){return Oe.getMonth()-he.getMonth()+(Oe.getFullYear()-he.getFullYear())*12},function(he){return he.getMonth()}),U=P.range,B=E(function(he){he.setMonth(0,1),he.setHours(0,0,0,0)},function(he,Oe){he.setFullYear(he.getFullYear()+Oe)},function(he,Oe){return Oe.getFullYear()-he.getFullYear()},function(he){return he.getFullYear()});B.every=function(he){return!isFinite(he=Math.floor(he))||!(he>0)?null:E(function(Oe){Oe.setFullYear(Math.floor(Oe.getFullYear()/he)*he),Oe.setMonth(0,1),Oe.setHours(0,0,0,0)},function(Oe,tt){Oe.setFullYear(Oe.getFullYear()+tt*he)})};var X=B.range,$=E(function(he){he.setUTCSeconds(0,0)},function(he,Oe){he.setTime(+he+Oe*o)},function(he,Oe){return(Oe-he)/o},function(he){return he.getUTCMinutes()}),se=$.range,le=E(function(he){he.setUTCMinutes(0,0,0)},function(he,Oe){he.setTime(+he+Oe*a)},function(he,Oe){return(Oe-he)/a},function(he){return he.getUTCHours()}),fe=le.range,V=E(function(he){he.setUTCHours(0,0,0,0)},function(he,Oe){he.setUTCDate(he.getUTCDate()+Oe)},function(he,Oe){return(Oe-he)/n},function(he){return he.getUTCDate()-1}),Y=V.range;function ee(he){return E(function(Oe){Oe.setUTCDate(Oe.getUTCDate()-(Oe.getUTCDay()+7-he)%7),Oe.setUTCHours(0,0,0,0)},function(Oe,tt){Oe.setUTCDate(Oe.getUTCDate()+tt*7)},function(Oe,tt){return(tt-Oe)/i})}var q=ee(0),oe=ee(1),ae=ee(2),j=ee(3),Q=ee(4),re=ee(5),ce=ee(6),be=q.range,Ae=oe.range,De=ae.range,ze=j.range,Ze=Q.range,at=re.range,nt=ce.range,rt=E(function(he){he.setUTCDate(1),he.setUTCHours(0,0,0,0)},function(he,Oe){he.setUTCMonth(he.getUTCMonth()+Oe)},function(he,Oe){return Oe.getUTCMonth()-he.getUTCMonth()+(Oe.getUTCFullYear()-he.getUTCFullYear())*12},function(he){return he.getUTCMonth()}),st=rt.range,Me=E(function(he){he.setUTCMonth(0,1),he.setUTCHours(0,0,0,0)},function(he,Oe){he.setUTCFullYear(he.getUTCFullYear()+Oe)},function(he,Oe){return Oe.getUTCFullYear()-he.getUTCFullYear()},function(he){return he.getUTCFullYear()});Me.every=function(he){return!isFinite(he=Math.floor(he))||!(he>0)?null:E(function(Oe){Oe.setUTCFullYear(Math.floor(Oe.getUTCFullYear()/he)*he),Oe.setUTCMonth(0,1),Oe.setUTCHours(0,0,0,0)},function(Oe,tt){Oe.setUTCFullYear(Oe.getUTCFullYear()+tt*he)})};var ye=Me.range;v.timeDay=l,v.timeDays=_,v.timeFriday=u,v.timeFridays=N,v.timeHour=p,v.timeHours=T,v.timeInterval=E,v.timeMillisecond=e,v.timeMilliseconds=t,v.timeMinute=c,v.timeMinutes=m,v.timeMonday=M,v.timeMondays=R,v.timeMonth=P,v.timeMonths=U,v.timeSaturday=y,v.timeSaturdays=O,v.timeSecond=s,v.timeSeconds=h,v.timeSunday=A,v.timeSundays=f,v.timeThursday=d,v.timeThursdays=F,v.timeTuesday=g,v.timeTuesdays=L,v.timeWednesday=b,v.timeWednesdays=z,v.timeWeek=A,v.timeWeeks=f,v.timeYear=B,v.timeYears=X,v.utcDay=V,v.utcDays=Y,v.utcFriday=re,v.utcFridays=at,v.utcHour=le,v.utcHours=fe,v.utcMillisecond=e,v.utcMilliseconds=t,v.utcMinute=$,v.utcMinutes=se,v.utcMonday=oe,v.utcMondays=Ae,v.utcMonth=rt,v.utcMonths=st,v.utcSaturday=ce,v.utcSaturdays=nt,v.utcSecond=s,v.utcSeconds=h,v.utcSunday=q,v.utcSundays=be,v.utcThursday=Q,v.utcThursdays=Ze,v.utcTuesday=ae,v.utcTuesdays=De,v.utcWednesday=j,v.utcWednesdays=ze,v.utcWeek=q,v.utcWeeks=be,v.utcYear=Me,v.utcYears=ye,Object.defineProperty(v,"__esModule",{value:!0})})}}),Xv=Xe({"node_modules/d3-time-format/dist/d3-time-format.js"(Z,G){(function(v,x){typeof Z=="object"&&typeof G<"u"?x(Z,dd()):(v=v||self,x(v.d3=v.d3||{},v.d3))})(Z,function(v,x){"use strict";function S(Ne){if(0<=Ne.y&&Ne.y<100){var Ke=new Date(-1,Ne.m,Ne.d,Ne.H,Ne.M,Ne.S,Ne.L);return Ke.setFullYear(Ne.y),Ke}return new Date(Ne.y,Ne.m,Ne.d,Ne.H,Ne.M,Ne.S,Ne.L)}function E(Ne){if(0<=Ne.y&&Ne.y<100){var Ke=new Date(Date.UTC(-1,Ne.m,Ne.d,Ne.H,Ne.M,Ne.S,Ne.L));return Ke.setUTCFullYear(Ne.y),Ke}return new Date(Date.UTC(Ne.y,Ne.m,Ne.d,Ne.H,Ne.M,Ne.S,Ne.L))}function e(Ne,Ke,Te){return{y:Ne,m:Ke,d:Te,H:0,M:0,S:0,L:0}}function t(Ne){var Ke=Ne.dateTime,Te=Ne.date,Ie=Ne.time,Ve=Ne.periods,Ce=Ne.days,Ee=Ne.shortDays,Pe=Ne.months,ft=Ne.shortMonths,ct=h(Ve),_t=c(Ve),Ct=h(Ce),ir=c(Ce),rr=h(Ee),er=c(Ee),Lr=h(Pe),fa=c(Pe),Da=h(ft),Ia=c(ft),qa={a:$a,A:Za,b:ri,B:pi,c:null,d:P,e:P,f:se,H:U,I:B,j:X,L:$,m:le,M:fe,p:Ra,q:tn,Q:It,s:qt,S:V,u:Y,U:ee,V:q,w:oe,W:ae,x:null,X:null,y:j,Y:Q,Z:re,"%":Pt},Wa={a:on,A:hn,b:Tt,B:ut,c:null,d:ce,e:ce,f:Ze,H:be,I:Ae,j:De,L:ze,m:at,M:nt,p:Br,q:Cr,Q:It,s:qt,S:rt,u:st,U:Me,V:ye,w:he,W:Oe,x:null,X:null,y:tt,Y:ot,Z:Qe,"%":Pt},Ca={a:Yt,A:Jt,b:Fr,B:ta,c:ra,d,e:d,f:z,H:y,I:y,j:u,L,m:b,M:f,p:Ft,q:g,Q:N,s:O,S:R,u:p,U:T,V:l,w:m,W:_,x:ca,X:Ba,y:A,Y:w,Z:M,"%":F};qa.x=hi(Te,qa),qa.X=hi(Ie,qa),qa.c=hi(Ke,qa),Wa.x=hi(Te,Wa),Wa.X=hi(Ie,Wa),Wa.c=hi(Ke,Wa);function hi(xr,Ir){return function(Ur){var Hr=[],xt=-1,Xt=0,vr=xr.length,Or,ba,Pa;for(Ur instanceof Date||(Ur=new Date(+Ur));++xt53)return null;"w"in Hr||(Hr.w=1),"Z"in Hr?(Xt=E(e(Hr.y,0,1)),vr=Xt.getUTCDay(),Xt=vr>4||vr===0?x.utcMonday.ceil(Xt):x.utcMonday(Xt),Xt=x.utcDay.offset(Xt,(Hr.V-1)*7),Hr.y=Xt.getUTCFullYear(),Hr.m=Xt.getUTCMonth(),Hr.d=Xt.getUTCDate()+(Hr.w+6)%7):(Xt=S(e(Hr.y,0,1)),vr=Xt.getDay(),Xt=vr>4||vr===0?x.timeMonday.ceil(Xt):x.timeMonday(Xt),Xt=x.timeDay.offset(Xt,(Hr.V-1)*7),Hr.y=Xt.getFullYear(),Hr.m=Xt.getMonth(),Hr.d=Xt.getDate()+(Hr.w+6)%7)}else("W"in Hr||"U"in Hr)&&("w"in Hr||(Hr.w="u"in Hr?Hr.u%7:"W"in Hr?1:0),vr="Z"in Hr?E(e(Hr.y,0,1)).getUTCDay():S(e(Hr.y,0,1)).getDay(),Hr.m=0,Hr.d="W"in Hr?(Hr.w+6)%7+Hr.W*7-(vr+5)%7:Hr.w+Hr.U*7-(vr+6)%7);return"Z"in Hr?(Hr.H+=Hr.Z/100|0,Hr.M+=Hr.Z%100,E(Hr)):S(Hr)}}function Kt(xr,Ir,Ur,Hr){for(var xt=0,Xt=Ir.length,vr=Ur.length,Or,ba;xt=vr)return-1;if(Or=Ir.charCodeAt(xt++),Or===37){if(Or=Ir.charAt(xt++),ba=Ca[Or in r?Ir.charAt(xt++):Or],!ba||(Hr=ba(xr,Ur,Hr))<0)return-1}else if(Or!=Ur.charCodeAt(Hr++))return-1}return Hr}function Ft(xr,Ir,Ur){var Hr=ct.exec(Ir.slice(Ur));return Hr?(xr.p=_t[Hr[0].toLowerCase()],Ur+Hr[0].length):-1}function Yt(xr,Ir,Ur){var Hr=rr.exec(Ir.slice(Ur));return Hr?(xr.w=er[Hr[0].toLowerCase()],Ur+Hr[0].length):-1}function Jt(xr,Ir,Ur){var Hr=Ct.exec(Ir.slice(Ur));return Hr?(xr.w=ir[Hr[0].toLowerCase()],Ur+Hr[0].length):-1}function Fr(xr,Ir,Ur){var Hr=Da.exec(Ir.slice(Ur));return Hr?(xr.m=Ia[Hr[0].toLowerCase()],Ur+Hr[0].length):-1}function ta(xr,Ir,Ur){var Hr=Lr.exec(Ir.slice(Ur));return Hr?(xr.m=fa[Hr[0].toLowerCase()],Ur+Hr[0].length):-1}function ra(xr,Ir,Ur){return Kt(xr,Ke,Ir,Ur)}function ca(xr,Ir,Ur){return Kt(xr,Te,Ir,Ur)}function Ba(xr,Ir,Ur){return Kt(xr,Ie,Ir,Ur)}function $a(xr){return Ee[xr.getDay()]}function Za(xr){return Ce[xr.getDay()]}function ri(xr){return ft[xr.getMonth()]}function pi(xr){return Pe[xr.getMonth()]}function Ra(xr){return Ve[+(xr.getHours()>=12)]}function tn(xr){return 1+~~(xr.getMonth()/3)}function on(xr){return Ee[xr.getUTCDay()]}function hn(xr){return Ce[xr.getUTCDay()]}function Tt(xr){return ft[xr.getUTCMonth()]}function ut(xr){return Pe[xr.getUTCMonth()]}function Br(xr){return Ve[+(xr.getUTCHours()>=12)]}function Cr(xr){return 1+~~(xr.getUTCMonth()/3)}return{format:function(xr){var Ir=hi(xr+="",qa);return Ir.toString=function(){return xr},Ir},parse:function(xr){var Ir=wi(xr+="",!1);return Ir.toString=function(){return xr},Ir},utcFormat:function(xr){var Ir=hi(xr+="",Wa);return Ir.toString=function(){return xr},Ir},utcParse:function(xr){var Ir=wi(xr+="",!0);return Ir.toString=function(){return xr},Ir}}}var r={"-":"",_:" ",0:"0"},o=/^\s*\d+/,a=/^%/,n=/[\\^$*+?|[\]().{}]/g;function i(Ne,Ke,Te){var Ie=Ne<0?"-":"",Ve=(Ie?-Ne:Ne)+"",Ce=Ve.length;return Ie+(Ce68?1900:2e3),Te+Ie[0].length):-1}function M(Ne,Ke,Te){var Ie=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(Ke.slice(Te,Te+6));return Ie?(Ne.Z=Ie[1]?0:-(Ie[2]+(Ie[3]||"00")),Te+Ie[0].length):-1}function g(Ne,Ke,Te){var Ie=o.exec(Ke.slice(Te,Te+1));return Ie?(Ne.q=Ie[0]*3-3,Te+Ie[0].length):-1}function b(Ne,Ke,Te){var Ie=o.exec(Ke.slice(Te,Te+2));return Ie?(Ne.m=Ie[0]-1,Te+Ie[0].length):-1}function d(Ne,Ke,Te){var Ie=o.exec(Ke.slice(Te,Te+2));return Ie?(Ne.d=+Ie[0],Te+Ie[0].length):-1}function u(Ne,Ke,Te){var Ie=o.exec(Ke.slice(Te,Te+3));return Ie?(Ne.m=0,Ne.d=+Ie[0],Te+Ie[0].length):-1}function y(Ne,Ke,Te){var Ie=o.exec(Ke.slice(Te,Te+2));return Ie?(Ne.H=+Ie[0],Te+Ie[0].length):-1}function f(Ne,Ke,Te){var Ie=o.exec(Ke.slice(Te,Te+2));return Ie?(Ne.M=+Ie[0],Te+Ie[0].length):-1}function R(Ne,Ke,Te){var Ie=o.exec(Ke.slice(Te,Te+2));return Ie?(Ne.S=+Ie[0],Te+Ie[0].length):-1}function L(Ne,Ke,Te){var Ie=o.exec(Ke.slice(Te,Te+3));return Ie?(Ne.L=+Ie[0],Te+Ie[0].length):-1}function z(Ne,Ke,Te){var Ie=o.exec(Ke.slice(Te,Te+6));return Ie?(Ne.L=Math.floor(Ie[0]/1e3),Te+Ie[0].length):-1}function F(Ne,Ke,Te){var Ie=a.exec(Ke.slice(Te,Te+1));return Ie?Te+Ie[0].length:-1}function N(Ne,Ke,Te){var Ie=o.exec(Ke.slice(Te));return Ie?(Ne.Q=+Ie[0],Te+Ie[0].length):-1}function O(Ne,Ke,Te){var Ie=o.exec(Ke.slice(Te));return Ie?(Ne.s=+Ie[0],Te+Ie[0].length):-1}function P(Ne,Ke){return i(Ne.getDate(),Ke,2)}function U(Ne,Ke){return i(Ne.getHours(),Ke,2)}function B(Ne,Ke){return i(Ne.getHours()%12||12,Ke,2)}function X(Ne,Ke){return i(1+x.timeDay.count(x.timeYear(Ne),Ne),Ke,3)}function $(Ne,Ke){return i(Ne.getMilliseconds(),Ke,3)}function se(Ne,Ke){return $(Ne,Ke)+"000"}function le(Ne,Ke){return i(Ne.getMonth()+1,Ke,2)}function fe(Ne,Ke){return i(Ne.getMinutes(),Ke,2)}function V(Ne,Ke){return i(Ne.getSeconds(),Ke,2)}function Y(Ne){var Ke=Ne.getDay();return Ke===0?7:Ke}function ee(Ne,Ke){return i(x.timeSunday.count(x.timeYear(Ne)-1,Ne),Ke,2)}function q(Ne,Ke){var Te=Ne.getDay();return Ne=Te>=4||Te===0?x.timeThursday(Ne):x.timeThursday.ceil(Ne),i(x.timeThursday.count(x.timeYear(Ne),Ne)+(x.timeYear(Ne).getDay()===4),Ke,2)}function oe(Ne){return Ne.getDay()}function ae(Ne,Ke){return i(x.timeMonday.count(x.timeYear(Ne)-1,Ne),Ke,2)}function j(Ne,Ke){return i(Ne.getFullYear()%100,Ke,2)}function Q(Ne,Ke){return i(Ne.getFullYear()%1e4,Ke,4)}function re(Ne){var Ke=Ne.getTimezoneOffset();return(Ke>0?"-":(Ke*=-1,"+"))+i(Ke/60|0,"0",2)+i(Ke%60,"0",2)}function ce(Ne,Ke){return i(Ne.getUTCDate(),Ke,2)}function be(Ne,Ke){return i(Ne.getUTCHours(),Ke,2)}function Ae(Ne,Ke){return i(Ne.getUTCHours()%12||12,Ke,2)}function De(Ne,Ke){return i(1+x.utcDay.count(x.utcYear(Ne),Ne),Ke,3)}function ze(Ne,Ke){return i(Ne.getUTCMilliseconds(),Ke,3)}function Ze(Ne,Ke){return ze(Ne,Ke)+"000"}function at(Ne,Ke){return i(Ne.getUTCMonth()+1,Ke,2)}function nt(Ne,Ke){return i(Ne.getUTCMinutes(),Ke,2)}function rt(Ne,Ke){return i(Ne.getUTCSeconds(),Ke,2)}function st(Ne){var Ke=Ne.getUTCDay();return Ke===0?7:Ke}function Me(Ne,Ke){return i(x.utcSunday.count(x.utcYear(Ne)-1,Ne),Ke,2)}function ye(Ne,Ke){var Te=Ne.getUTCDay();return Ne=Te>=4||Te===0?x.utcThursday(Ne):x.utcThursday.ceil(Ne),i(x.utcThursday.count(x.utcYear(Ne),Ne)+(x.utcYear(Ne).getUTCDay()===4),Ke,2)}function he(Ne){return Ne.getUTCDay()}function Oe(Ne,Ke){return i(x.utcMonday.count(x.utcYear(Ne)-1,Ne),Ke,2)}function tt(Ne,Ke){return i(Ne.getUTCFullYear()%100,Ke,2)}function ot(Ne,Ke){return i(Ne.getUTCFullYear()%1e4,Ke,4)}function Qe(){return"+0000"}function Pt(){return"%"}function It(Ne){return+Ne}function qt(Ne){return Math.floor(+Ne/1e3)}var Wt;kr({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 kr(Ne){return Wt=t(Ne),v.timeFormat=Wt.format,v.timeParse=Wt.parse,v.utcFormat=Wt.utcFormat,v.utcParse=Wt.utcParse,Wt}var mr="%Y-%m-%dT%H:%M:%S.%LZ";function qr(Ne){return Ne.toISOString()}var Sr=Date.prototype.toISOString?qr:v.utcFormat(mr);function Rr(Ne){var Ke=new Date(Ne);return isNaN(Ke)?null:Ke}var wt=+new Date("2000-01-01T00:00:00.000Z")?Rr:v.utcParse(mr);v.isoFormat=Sr,v.isoParse=wt,v.timeFormatDefaultLocale=kr,v.timeFormatLocale=t,Object.defineProperty(v,"__esModule",{value:!0})})}}),YA=Xe({"node_modules/d3-format/dist/d3-format.js"(Z,G){(function(v,x){typeof Z=="object"&&typeof G<"u"?x(Z):(v=typeof globalThis<"u"?globalThis:v||self,x(v.d3=v.d3||{}))})(Z,function(v){"use strict";function x(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,y=b.slice(0,u);return[y.length>1?y[0]+y.slice(2):y,+b.slice(u+1)]}function E(b){return b=S(Math.abs(b)),b?b[1]:NaN}function e(b,d){return function(u,y){for(var f=u.length,R=[],L=0,z=b[0],F=0;f>0&&z>0&&(F+z+1>y&&(z=Math.max(1,y-F)),R.push(u.substring(f-=z,f+z)),!((F+=z+1)>y));)z=b[L=(L+1)%b.length];return R.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 n(b){e:for(var d=b.length,u=1,y=-1,f;u0&&(y=0);break}return y>0?b.slice(0,y)+b.slice(f+1):b}var i;function s(b,d){var u=S(b,d);if(!u)return b+"";var y=u[0],f=u[1],R=f-(i=Math.max(-8,Math.min(8,Math.floor(f/3)))*3)+1,L=y.length;return R===L?y:R>L?y+new Array(R-L+1).join("0"):R>0?y.slice(0,R)+"."+y.slice(R):"0."+new Array(1-R).join("0")+S(b,Math.max(0,d+R-1))[0]}function h(b,d){var u=S(b,d);if(!u)return b+"";var y=u[0],f=u[1];return f<0?"0."+new Array(-f).join("0")+y:y.length>f+1?y.slice(0,f+1)+"."+y.slice(f+1):y+new Array(f-y.length+2).join("0")}var c={"%":function(b,d){return(b*100).toFixed(d)},b:function(b){return Math.round(b).toString(2)},c:function(b){return b+""},d:x,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 p=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(p.call(b.grouping,Number),b.thousands+""),u=b.currency===void 0?"":b.currency[0]+"",y=b.currency===void 0?"":b.currency[1]+"",f=b.decimal===void 0?".":b.decimal+"",R=b.numerals===void 0?m:t(p.call(b.numerals,String)),L=b.percent===void 0?"%":b.percent+"",z=b.minus===void 0?"-":b.minus+"",F=b.nan===void 0?"NaN":b.nan+"";function N(P){P=o(P);var U=P.fill,B=P.align,X=P.sign,$=P.symbol,se=P.zero,le=P.width,fe=P.comma,V=P.precision,Y=P.trim,ee=P.type;ee==="n"?(fe=!0,ee="g"):c[ee]||(V===void 0&&(V=12),Y=!0,ee="g"),(se||U==="0"&&B==="=")&&(se=!0,U="0",B="=");var q=$==="$"?u:$==="#"&&/[boxX]/.test(ee)?"0"+ee.toLowerCase():"",oe=$==="$"?y:/[%p]/.test(ee)?L:"",ae=c[ee],j=/[defgprs%]/.test(ee);V=V===void 0?6:/[gprs]/.test(ee)?Math.max(1,Math.min(21,V)):Math.max(0,Math.min(20,V));function Q(re){var ce=q,be=oe,Ae,De,ze;if(ee==="c")be=ae(re)+be,re="";else{re=+re;var Ze=re<0||1/re<0;if(re=isNaN(re)?F:ae(Math.abs(re),V),Y&&(re=n(re)),Ze&&+re==0&&X!=="+"&&(Ze=!1),ce=(Ze?X==="("?X:z:X==="-"||X==="("?"":X)+ce,be=(ee==="s"?T[8+i/3]:"")+be+(Ze&&X==="("?")":""),j){for(Ae=-1,De=re.length;++Aeze||ze>57){be=(ze===46?f+re.slice(Ae+1):re.slice(Ae))+be,re=re.slice(0,Ae);break}}}fe&&!se&&(re=d(re,1/0));var at=ce.length+re.length+be.length,nt=at>1)+ce+re+be+nt.slice(at);break;default:re=nt+ce+re+be;break}return R(re)}return Q.toString=function(){return P+""},Q}function O(P,U){var B=N((P=o(P),P.type="f",P)),X=Math.max(-8,Math.min(8,Math.floor(E(U)/3)))*3,$=Math.pow(10,-X),se=T[8+X/3];return function(le){return B($*le)+se}}return{format:N,formatPrefix:O}}var _;w({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function w(b){return _=l(b),v.format=_.format,v.formatPrefix=_.formatPrefix,_}function A(b){return Math.max(0,-E(Math.abs(b)))}function M(b,d){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(E(d)/3)))*3-E(Math.abs(b)))}function g(b,d){return b=Math.abs(b),d=Math.abs(d)-b,Math.max(0,E(d)-E(b))+1}v.FormatSpecifier=a,v.formatDefaultLocale=w,v.formatLocale=l,v.formatSpecifier=o,v.precisionFixed=A,v.precisionPrefix=M,v.precisionRound=g,Object.defineProperty(v,"__esModule",{value:!0})})}}),l7=Xe({"node_modules/is-string-blank/index.js"(Z,G){"use strict";G.exports=function(v){for(var x=v.length,S,E=0;E13)&&S!==32&&S!==133&&S!==160&&S!==5760&&S!==6158&&(S<8192||S>8205)&&S!==8232&&S!==8233&&S!==8239&&S!==8287&&S!==8288&&S!==12288&&S!==65279)return!1;return!0}}}),rs=Xe({"node_modules/fast-isnumeric/index.js"(Z,G){"use strict";var v=l7();G.exports=function(x){var S=typeof x;if(S==="string"){var E=x;if(x=+x,x===0&&v(E))return!1}else if(S!=="number")return!1;return x-x<1}}}),Hs=Xe({"src/constants/numerical.js"(Z,G){"use strict";G.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=Xe({"node_modules/base64-arraybuffer/dist/base64-arraybuffer.umd.js"(Z,G){(function(v,x){typeof Z=="object"&&typeof G<"u"?x(Z):(v=typeof globalThis<"u"?globalThis:v||self,x(v["base64-arraybuffer"]={}))})(Z,function(v){"use strict";for(var x="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",S=typeof Uint8Array>"u"?[]:new Uint8Array(256),E=0;E>2],i+=x[(o[a]&3)<<4|o[a+1]>>4],i+=x[(o[a+1]&15)<<2|o[a+2]>>6],i+=x[o[a+2]&63];return n%3===2?i=i.substring(0,i.length-1)+"=":n%3===1&&(i=i.substring(0,i.length-2)+"=="),i},t=function(r){var o=r.length*.75,a=r.length,n,i=0,s,h,c,m;r[r.length-1]==="="&&(o--,r[r.length-2]==="="&&o--);var p=new ArrayBuffer(o),T=new Uint8Array(p);for(n=0;n>4,T[i++]=(h&15)<<4|c>>2,T[i++]=(c&3)<<6|m&63;return p};v.decode=t,v.encode=e,Object.defineProperty(v,"__esModule",{value:!0})})}}),Zv=Xe({"src/lib/is_plain_object.js"(Z,G){"use strict";G.exports=function(x){return window&&window.process&&window.process.versions?Object.prototype.toString.call(x)==="[object Object]":Object.prototype.toString.call(x)==="[object Object]"&&Object.getPrototypeOf(x).hasOwnProperty("hasOwnProperty")}}}),bp=Xe({"src/lib/array.js"(Z){"use strict";var G=KA().decode,v=Zv(),x=Array.isArray,S=ArrayBuffer,E=DataView;function e(s){return S.isView(s)&&!(s instanceof E)}Z.isTypedArray=e;function t(s){return x(s)||e(s)}Z.isArrayOrTypedArray=t;function r(s){return!t(s[0])}Z.isArray1D=r,Z.ensureArray=function(s,h){return x(s)||(s=[]),s.length=h,s};var o={u1c:typeof Uint8ClampedArray>"u"?void 0:Uint8ClampedArray,i1:typeof Int8Array>"u"?void 0:Int8Array,u1:typeof Uint8Array>"u"?void 0:Uint8Array,i2:typeof Int16Array>"u"?void 0:Int16Array,u2:typeof Uint16Array>"u"?void 0:Uint16Array,i4:typeof Int32Array>"u"?void 0:Int32Array,u4:typeof Uint32Array>"u"?void 0:Uint32Array,f4:typeof Float32Array>"u"?void 0:Float32Array,f8:typeof Float64Array>"u"?void 0:Float64Array};o.uint8c=o.u1c,o.uint8=o.u1,o.int8=o.i1,o.uint16=o.u2,o.int16=o.i2,o.uint32=o.u4,o.int32=o.i4,o.float32=o.f4,o.float64=o.f8;function a(s){return s.constructor===ArrayBuffer}Z.isArrayBuffer=a,Z.decodeTypedArraySpec=function(s){var h=[],c=n(s),m=c.dtype,p=o[m];if(!p)throw new Error('Error in dtype: "'+m+'"');var T=p.BYTES_PER_ELEMENT,l=c.bdata;a(l)||(l=G(l));var _=c.shape===void 0?[l.byteLength/T]:(""+c.shape).split(",");_.reverse();var w=_.length,A,M,g=+_[0],b=T*g,d=0;if(w===1)h=new p(l);else if(w===2)for(A=+_[1],M=0;M2)return p[A]=p[A]|e,_.set(w,null);if(l){for(h=A;h0)return Math.log(S)/Math.LN10;var e=Math.log(Math.min(E[0],E[1]))/Math.LN10;return v(e)||(e=Math.log(Math.max(E[0],E[1]))/Math.LN10-6),e}}}),f7=Xe({"src/lib/relink_private.js"(Z,G){"use strict";var v=bp().isArrayOrTypedArray,x=Zv();G.exports=function S(E,e){for(var t in e){var r=e[t],o=E[t];if(o!==r)if(t.charAt(0)==="_"||typeof r=="function"){if(t in E)continue;E[t]=r}else if(v(r)&&v(o)&&x(r[0])){if(t==="customdata"||t==="ids")continue;for(var a=Math.min(r.length,o.length),n=0;nE/2?S-Math.round(S/E)*E:S}G.exports={mod:v,modHalf:x}}}),Ch=Xe({"node_modules/tinycolor2/tinycolor.js"(Z,G){(function(v){var x=/^\s+/,S=/\s+$/,E=0,e=v.round,t=v.min,r=v.max,o=v.random;function a(j,Q){if(j=j||"",Q=Q||{},j instanceof a)return j;if(!(this instanceof a))return new a(j,Q);var re=n(j);this._originalInput=j,this._r=re.r,this._g=re.g,this._b=re.b,this._a=re.a,this._roundA=e(100*this._a)/100,this._format=Q.format||re.format,this._gradientType=Q.gradientType,this._r<1&&(this._r=e(this._r)),this._g<1&&(this._g=e(this._g)),this._b<1&&(this._b=e(this._b)),this._ok=re.ok,this._tc_id=E++}a.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var j=this.toRgb();return(j.r*299+j.g*587+j.b*114)/1e3},getLuminance:function(){var j=this.toRgb(),Q,re,ce,be,Ae,De;return Q=j.r/255,re=j.g/255,ce=j.b/255,Q<=.03928?be=Q/12.92:be=v.pow((Q+.055)/1.055,2.4),re<=.03928?Ae=re/12.92:Ae=v.pow((re+.055)/1.055,2.4),ce<=.03928?De=ce/12.92:De=v.pow((ce+.055)/1.055,2.4),.2126*be+.7152*Ae+.0722*De},setAlpha:function(j){return this._a=P(j),this._roundA=e(100*this._a)/100,this},toHsv:function(){var j=c(this._r,this._g,this._b);return{h:j.h*360,s:j.s,v:j.v,a:this._a}},toHsvString:function(){var j=c(this._r,this._g,this._b),Q=e(j.h*360),re=e(j.s*100),ce=e(j.v*100);return this._a==1?"hsv("+Q+", "+re+"%, "+ce+"%)":"hsva("+Q+", "+re+"%, "+ce+"%, "+this._roundA+")"},toHsl:function(){var j=s(this._r,this._g,this._b);return{h:j.h*360,s:j.s,l:j.l,a:this._a}},toHslString:function(){var j=s(this._r,this._g,this._b),Q=e(j.h*360),re=e(j.s*100),ce=e(j.l*100);return this._a==1?"hsl("+Q+", "+re+"%, "+ce+"%)":"hsla("+Q+", "+re+"%, "+ce+"%, "+this._roundA+")"},toHex:function(j){return p(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[p(this._r,this._g,this._b,!0)]||!1},toFilter:function(j){var Q="#"+l(this._r,this._g,this._b,this._a),re=Q,ce=this._gradientType?"GradientType = 1, ":"";if(j){var be=a(j);re="#"+l(be._r,be._g,be._b,be._a)}return"progid:DXImageTransform.Microsoft.gradient("+ce+"startColorstr="+Q+",endColorstr="+re+")"},toString:function(j){var Q=!!j;j=j||this._format;var re=!1,ce=this._a<1&&this._a>=0,be=!Q&&ce&&(j==="hex"||j==="hex6"||j==="hex3"||j==="hex4"||j==="hex8"||j==="name");return be?j==="name"&&this._a===0?this.toName():this.toRgbString():(j==="rgb"&&(re=this.toRgbString()),j==="prgb"&&(re=this.toPercentageRgbString()),(j==="hex"||j==="hex6")&&(re=this.toHexString()),j==="hex3"&&(re=this.toHexString(!0)),j==="hex4"&&(re=this.toHex8String(!0)),j==="hex8"&&(re=this.toHex8String()),j==="name"&&(re=this.toName()),j==="hsl"&&(re=this.toHslString()),j==="hsv"&&(re=this.toHsvString()),re||this.toHexString())},clone:function(){return a(this.toString())},_applyModification:function(j,Q){var re=j.apply(null,[this].concat([].slice.call(Q)));return this._r=re._r,this._g=re._g,this._b=re._b,this.setAlpha(re._a),this},lighten:function(){return this._applyModification(M,arguments)},brighten:function(){return this._applyModification(g,arguments)},darken:function(){return this._applyModification(b,arguments)},desaturate:function(){return this._applyModification(_,arguments)},saturate:function(){return this._applyModification(w,arguments)},greyscale:function(){return this._applyModification(A,arguments)},spin:function(){return this._applyModification(d,arguments)},_applyCombination:function(j,Q){return j.apply(null,[this].concat([].slice.call(Q)))},analogous:function(){return this._applyCombination(L,arguments)},complement:function(){return this._applyCombination(u,arguments)},monochromatic:function(){return this._applyCombination(z,arguments)},splitcomplement:function(){return this._applyCombination(R,arguments)},triad:function(){return this._applyCombination(y,arguments)},tetrad:function(){return this._applyCombination(f,arguments)}},a.fromRatio=function(j,Q){if(typeof j=="object"){var re={};for(var ce in j)j.hasOwnProperty(ce)&&(ce==="a"?re[ce]=j[ce]:re[ce]=fe(j[ce]));j=re}return a(j,Q)};function n(j){var Q={r:0,g:0,b:0},re=1,ce=null,be=null,Ae=null,De=!1,ze=!1;return typeof j=="string"&&(j=oe(j)),typeof j=="object"&&(q(j.r)&&q(j.g)&&q(j.b)?(Q=i(j.r,j.g,j.b),De=!0,ze=String(j.r).substr(-1)==="%"?"prgb":"rgb"):q(j.h)&&q(j.s)&&q(j.v)?(ce=fe(j.s),be=fe(j.v),Q=m(j.h,ce,be),De=!0,ze="hsv"):q(j.h)&&q(j.s)&&q(j.l)&&(ce=fe(j.s),Ae=fe(j.l),Q=h(j.h,ce,Ae),De=!0,ze="hsl"),j.hasOwnProperty("a")&&(re=j.a)),re=P(re),{ok:De,format:j.format||ze,r:t(255,r(Q.r,0)),g:t(255,r(Q.g,0)),b:t(255,r(Q.b,0)),a:re}}function i(j,Q,re){return{r:U(j,255)*255,g:U(Q,255)*255,b:U(re,255)*255}}function s(j,Q,re){j=U(j,255),Q=U(Q,255),re=U(re,255);var ce=r(j,Q,re),be=t(j,Q,re),Ae,De,ze=(ce+be)/2;if(ce==be)Ae=De=0;else{var Ze=ce-be;switch(De=ze>.5?Ze/(2-ce-be):Ze/(ce+be),ce){case j:Ae=(Q-re)/Ze+(Q1&&(rt-=1),rt<1/6?at+(nt-at)*6*rt:rt<1/2?nt:rt<2/3?at+(nt-at)*(2/3-rt)*6:at}if(Q===0)ce=be=Ae=re;else{var ze=re<.5?re*(1+Q):re+Q-re*Q,Ze=2*re-ze;ce=De(Ze,ze,j+1/3),be=De(Ze,ze,j),Ae=De(Ze,ze,j-1/3)}return{r:ce*255,g:be*255,b:Ae*255}}function c(j,Q,re){j=U(j,255),Q=U(Q,255),re=U(re,255);var ce=r(j,Q,re),be=t(j,Q,re),Ae,De,ze=ce,Ze=ce-be;if(De=ce===0?0:Ze/ce,ce==be)Ae=0;else{switch(ce){case j:Ae=(Q-re)/Ze+(Q>1)+720)%360;--Q;)ce.h=(ce.h+be)%360,Ae.push(a(ce));return Ae}function z(j,Q){Q=Q||6;for(var re=a(j).toHsv(),ce=re.h,be=re.s,Ae=re.v,De=[],ze=1/Q;Q--;)De.push(a({h:ce,s:be,v:Ae})),Ae=(Ae+ze)%1;return De}a.mix=function(j,Q,re){re=re===0?0:re||50;var ce=a(j).toRgb(),be=a(Q).toRgb(),Ae=re/100,De={r:(be.r-ce.r)*Ae+ce.r,g:(be.g-ce.g)*Ae+ce.g,b:(be.b-ce.b)*Ae+ce.b,a:(be.a-ce.a)*Ae+ce.a};return a(De)},a.readability=function(j,Q){var re=a(j),ce=a(Q);return(v.max(re.getLuminance(),ce.getLuminance())+.05)/(v.min(re.getLuminance(),ce.getLuminance())+.05)},a.isReadable=function(j,Q,re){var ce=a.readability(j,Q),be,Ae;switch(Ae=!1,be=ae(re),be.level+be.size){case"AAsmall":case"AAAlarge":Ae=ce>=4.5;break;case"AAlarge":Ae=ce>=3;break;case"AAAsmall":Ae=ce>=7;break}return Ae},a.mostReadable=function(j,Q,re){var ce=null,be=0,Ae,De,ze,Ze;re=re||{},De=re.includeFallbackColors,ze=re.level,Ze=re.size;for(var at=0;atbe&&(be=Ae,ce=a(Q[at]));return a.isReadable(j,ce,{level:ze,size:Ze})||!De?ce:(re.includeFallbackColors=!1,a.mostReadable(j,["#fff","#000"],re))};var F=a.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},N=a.hexNames=O(F);function O(j){var Q={};for(var re in j)j.hasOwnProperty(re)&&(Q[j[re]]=re);return Q}function P(j){return j=parseFloat(j),(isNaN(j)||j<0||j>1)&&(j=1),j}function U(j,Q){$(j)&&(j="100%");var re=se(j);return j=t(Q,r(0,parseFloat(j))),re&&(j=parseInt(j*Q,10)/100),v.abs(j-Q)<1e-6?1:j%Q/parseFloat(Q)}function B(j){return t(1,r(0,j))}function X(j){return parseInt(j,16)}function $(j){return typeof j=="string"&&j.indexOf(".")!=-1&&parseFloat(j)===1}function se(j){return typeof j=="string"&&j.indexOf("%")!=-1}function le(j){return j.length==1?"0"+j:""+j}function fe(j){return j<=1&&(j=j*100+"%"),j}function V(j){return v.round(parseFloat(j)*255).toString(16)}function Y(j){return X(j)/255}var ee=function(){var j="[-\\+]?\\d+%?",Q="[-\\+]?\\d*\\.\\d+%?",re="(?:"+Q+")|(?:"+j+")",ce="[\\s|\\(]+("+re+")[,|\\s]+("+re+")[,|\\s]+("+re+")\\s*\\)?",be="[\\s|\\(]+("+re+")[,|\\s]+("+re+")[,|\\s]+("+re+")[,|\\s]+("+re+")\\s*\\)?";return{CSS_UNIT:new RegExp(re),rgb:new RegExp("rgb"+ce),rgba:new RegExp("rgba"+be),hsl:new RegExp("hsl"+ce),hsla:new RegExp("hsla"+be),hsv:new RegExp("hsv"+ce),hsva:new RegExp("hsva"+be),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function q(j){return!!ee.CSS_UNIT.exec(j)}function oe(j){j=j.replace(x,"").replace(S,"").toLowerCase();var Q=!1;if(F[j])j=F[j],Q=!0;else if(j=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var re;return(re=ee.rgb.exec(j))?{r:re[1],g:re[2],b:re[3]}:(re=ee.rgba.exec(j))?{r:re[1],g:re[2],b:re[3],a:re[4]}:(re=ee.hsl.exec(j))?{h:re[1],s:re[2],l:re[3]}:(re=ee.hsla.exec(j))?{h:re[1],s:re[2],l:re[3],a:re[4]}:(re=ee.hsv.exec(j))?{h:re[1],s:re[2],v:re[3]}:(re=ee.hsva.exec(j))?{h:re[1],s:re[2],v:re[3],a:re[4]}:(re=ee.hex8.exec(j))?{r:X(re[1]),g:X(re[2]),b:X(re[3]),a:Y(re[4]),format:Q?"name":"hex8"}:(re=ee.hex6.exec(j))?{r:X(re[1]),g:X(re[2]),b:X(re[3]),format:Q?"name":"hex"}:(re=ee.hex4.exec(j))?{r:X(re[1]+""+re[1]),g:X(re[2]+""+re[2]),b:X(re[3]+""+re[3]),a:Y(re[4]+""+re[4]),format:Q?"name":"hex8"}:(re=ee.hex3.exec(j))?{r:X(re[1]+""+re[1]),g:X(re[2]+""+re[2]),b:X(re[3]+""+re[3]),format:Q?"name":"hex"}:!1}function ae(j){var Q,re;return j=j||{level:"AA",size:"small"},Q=(j.level||"AA").toUpperCase(),re=(j.size||"small").toLowerCase(),Q!=="AA"&&Q!=="AAA"&&(Q="AA"),re!=="small"&&re!=="large"&&(re="small"),{level:Q,size:re}}typeof G<"u"&&G.exports?G.exports=a:window.tinycolor=a})(Math)}}),Qo=Xe({"src/lib/extend.js"(Z){"use strict";var G=Zv(),v=Array.isArray;function x(E,e){var t,r;for(t=0;t=0)))return a;if(c===3)s[c]>1&&(s[c]=1);else if(s[c]>=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+")"}}}),Ym=Xe({"src/constants/interactions.js"(Z,G){"use strict";G.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}}}),Jy=Xe({"src/lib/regex.js"(Z){"use strict";Z.counter=function(G,v,x,S){var E=(v||"")+(x?"":"$"),e=S===!1?"":"^";return G==="xy"?new RegExp(e+"x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?"+E):new RegExp(e+G+"([2-9]|[1-9][0-9]+)?"+E)}}}),h7=Xe({"src/lib/coerce.js"(Z){"use strict";var G=rs(),v=Ch(),x=Qo().extendFlat,S=ru(),E=W0(),e=$n(),t=Ym().DESELECTDIM,r=b_(),o=Jy().counter,a=Yy().modHalf,n=bp().isArrayOrTypedArray,i=bp().isTypedArraySpec,s=bp().decodeTypedArraySpec;Z.valObjectMeta={data_array:{coerceFunction:function(c,m,p){m.set(n(c)?c:i(c)?s(c):p)}},enumerated:{coerceFunction:function(c,m,p,T){T.coerceNumber&&(c=+c),T.values.indexOf(c)===-1?m.set(p):m.set(c)},validateFunction:function(c,m){m.coerceNumber&&(c=+c);for(var p=m.values,T=0;T_===!0||_===!1;l(c)||T.arrayOk&&Array.isArray(c)&&c.length>0&&c.every(l)?m.set(c):m.set(p)}},number:{coerceFunction:function(c,m,p,T){i(c)&&(c=s(c)),!G(c)||T.min!==void 0&&cT.max?m.set(p):m.set(+c)}},integer:{coerceFunction:function(c,m,p,T){if((T.extras||[]).indexOf(c)!==-1){m.set(c);return}i(c)&&(c=s(c)),c%1||!G(c)||T.min!==void 0&&cT.max?m.set(p):m.set(+c)}},string:{coerceFunction:function(c,m,p,T){if(typeof c!="string"){var l=typeof c=="number";T.strict===!0||!l?m.set(p):m.set(String(c))}else T.noBlank&&!c?m.set(p):m.set(c)}},color:{coerceFunction:function(c,m,p){i(c)&&(c=s(c)),v(c).isValid()?m.set(c):m.set(p)}},colorlist:{coerceFunction:function(c,m,p){function T(l){return v(l).isValid()}!Array.isArray(c)||!c.length?m.set(p):c.every(T)?m.set(c):m.set(p)}},colorscale:{coerceFunction:function(c,m,p){m.set(E.get(c,p))}},angle:{coerceFunction:function(c,m,p){i(c)&&(c=s(c)),c==="auto"?m.set("auto"):G(c)?m.set(a(+c,360)):m.set(p)}},subplotid:{coerceFunction:function(c,m,p,T){var l=T.regex||o(p);let _=w=>typeof w=="string"&&l.test(w);_(c)||T.arrayOk&&n(c)&&c.length>0&&c.every(_)?m.set(c):m.set(p)},validateFunction:function(c,m){var p=m.dflt;return c===p?!0:typeof c!="string"?!1:!!o(p).test(c)}},flaglist:{coerceFunction:function(c,m,p,T){if((T.extras||[]).indexOf(c)!==-1){m.set(c);return}if(typeof c!="string"){m.set(p);return}for(var l=c.split("+"),_=0;_/g),c=0;c1){var e=["LOG:"];for(E=0;E1){var t=[];for(E=0;E"),"long")}},S.warn=function(){var E;if(v.logging>0){var e=["WARN:"];for(E=0;E0){var t=[];for(E=0;E"),"stick")}},S.error=function(){var E;if(v.logging>0){var e=["ERROR:"];for(E=0;E0){var t=[];for(E=0;E"),"stick")}}}}),p2=Xe({"src/lib/noop.js"(Z,G){"use strict";G.exports=function(){}}}),$A=Xe({"src/lib/push_unique.js"(Z,G){"use strict";G.exports=function(x,S){if(S instanceof RegExp){for(var E=S.toString(),e=0;eTo({valType:"string",dflt:"",editType:E},e!==!1?{arrayOk:!0}:{}),Z.texttemplateAttrs=({editType:E="calc",arrayOk:e}={},t={})=>To({valType:"string",dflt:"",editType:E},e!==!1?{arrayOk:!0}:{}),Z.shapeTexttemplateAttrs=({editType:E="arraydraw",newshape:e}={},t={})=>({valType:"string",dflt:"",editType:E}),Z.templatefallbackAttrs=({editType:E="none"}={})=>({valType:"any",dflt:"-",editType:E})}}),v2=Xe({"src/components/shapes/label_texttemplate.js"(Z,G){"use strict";function v(A,M){return M?M.d2l(A):A}function x(A,M){return M?M.l2d(A):A}function S(A){return A.x0}function E(A){return A.x1}function e(A){return A.y0}function t(A){return A.y1}function r(A){return A.x0shift||0}function o(A){return A.x1shift||0}function a(A){return A.y0shift||0}function n(A){return A.y1shift||0}function i(A,M){return v(A.x1,M)+o(A)-v(A.x0,M)-r(A)}function s(A,M,g){return v(A.y1,g)+n(A)-v(A.y0,g)-a(A)}function h(A,M){return Math.abs(i(A,M))}function c(A,M,g){return Math.abs(s(A,M,g))}function m(A,M,g){return A.type!=="line"?void 0:Math.sqrt(Math.pow(i(A,M),2)+Math.pow(s(A,M,g),2))}function p(A,M){return x((v(A.x1,M)+o(A)+v(A.x0,M)+r(A))/2,M)}function T(A,M,g){return x((v(A.y1,g)+n(A)+v(A.y0,g)+a(A))/2,g)}function l(A,M,g){return A.type!=="line"?void 0:s(A,M,g)/i(A,M)}var _=["x0","x1","y0","y1","dy","height","ycenter"],w=["x0","x1","y0","y1","dx","width","xcenter"];G.exports={x0:S,x1:E,y0:e,y1:t,slope:l,dx:i,dy:s,width:h,height:c,length:m,xcenter:p,ycenter:T,simpleXVariables:_,simpleYVariables:w}}}),j7=Xe({"src/components/shapes/draw_newshape/attributes.js"(Z,G){"use strict";var v=pc().overrideAll,x=ru(),S=tc(),E=Gh().dash,e=Qo().extendFlat,{shapeTexttemplateAttrs:t,templatefallbackAttrs:r}=Jl(),o=v2();G.exports=v({newshape:{visible:e({},x.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:e({},x.legend,{}),legendgroup:e({},x.legendgroup,{}),legendgrouptitle:{text:e({},x.legendgrouptitle.text,{}),font:S({})},legendrank:e({},x.legendrank,{}),legendwidth:e({},x.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:e({},E,{dflt:"solid"})},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd"},opacity:{valType:"number",min:0,max:1,dflt:1},layer:{valType:"enumerated",values:["below","above","between"],dflt:"above"},drawdirection:{valType:"enumerated",values:["ortho","horizontal","vertical","diagonal"],dflt:"diagonal"},name:e({},x.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:t({newshape:!0},{keys:Object.keys(o)}),texttemplatefallback:r({editType:"arraydraw"}),font:S({}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"]},textangle:{valType:"angle",dflt:"auto"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},padding:{valType:"number",dflt:3,min:0}}},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)",description:"Sets the color filling the active shape' interior."},opacity:{valType:"number",min:0,max:1,dflt:.5}}},"none","from-root")}}),q7=Xe({"src/components/selections/draw_newselection/attributes.js"(Z,G){"use strict";var v=Gh().dash,x=Qo().extendFlat;G.exports={newselection:{mode:{valType:"enumerated",values:["immediate","gradual"],dflt:"immediate",editType:"none"},line:{color:{valType:"color",editType:"none"},width:{valType:"number",min:1,dflt:1,editType:"none"},dash:x({},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=Xe({"src/plots/pad_attributes.js"(Z,G){"use strict";G.exports=function(v){var x=v.editType;return{t:{valType:"number",dflt:0,editType:x},r:{valType:"number",dflt:0,editType:x},b:{valType:"number",dflt:0,editType:x},l:{valType:"number",dflt:0,editType:x},editType:x}}}}),$y=Xe({"src/plots/layout_attributes.js"(Z,G){"use strict";var v=tc(),x=A_(),S=sh(),E=j7(),e=q7(),t=m2(),r=Qo().extendFlat,o=v({editType:"calc"});o.family.dflt='"Open Sans", verdana, arial, sans-serif',o.size.dflt=12,o.color.dflt=S.defaultLine,G.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:E.newshape,activeshape:E.activeshape,newselection:e.newselection,activeselection:e.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:r({},x.transition,{editType:"none"})}}}),V7=Xe({"node_modules/maplibre-gl/dist/maplibre-gl.css"(){(function(){if(!document.getElementById("a75c73da1cd7a97e8992659f6aed556255838daadea9ca0c9fc3af7f1ddf63c0")){var Z=document.createElement("style");Z.id="a75c73da1cd7a97e8992659f6aed556255838daadea9ca0c9fc3af7f1ddf63c0",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=Xe({"src/registry.js"(Z){"use strict";var G=Km(),v=p2(),x=$A(),S=Zv(),E=T_().addStyleRule,e=Qo(),t=ru(),r=$y(),o=e.extendFlat,a=e.extendDeepAll;Z.modules={},Z.allCategories={},Z.allTypes=[],Z.subplotsRegistry={},Z.componentsRegistry={},Z.layoutArrayContainers=[],Z.layoutArrayRegexes=[],Z.traceLayoutAttributes={},Z.localeRegistry={},Z.apiMethodRegistry={},Z.collectableSubplotTypes=null,Z.register=function(w){if(Z.collectableSubplotTypes=null,w)w&&!Array.isArray(w)&&(w=[w]);else throw new Error("No argument passed to Plotly.register.");for(var A=0;A=l&&F<=_?F:e}if(typeof F!="string"&&typeof F!="number")return e;F=String(F);var B=p(N),X=F.charAt(0);B&&(X==="G"||X==="g")&&(F=F.slice(1),N="");var $=B&&N.slice(0,7)==="chinese",se=F.match($?c:h);if(!se)return e;var le=se[1],fe=se[3]||"1",V=Number(se[5]||1),Y=Number(se[7]||0),ee=Number(se[9]||0),q=Number(se[11]||0);if(B){if(le.length===2)return e;le=Number(le);var oe;try{var ae=i.getComponentMethod("calendars","getCal")(N);if($){var j=fe.charAt(fe.length-1)==="i";fe=parseInt(fe,10),oe=ae.newDate(le,ae.toMonthIndex(le,fe,j),V)}else oe=ae.newDate(le,Number(fe),V)}catch{return e}return oe?(oe.toJD()-n)*t+Y*r+ee*o+q*a:e}le.length===2?le=(Number(le)+2e3-m)%100+m:le=Number(le),fe-=1;var Q=new Date(Date.UTC(2e3,fe,V,Y,ee));return Q.setUTCFullYear(le),Q.getUTCMonth()!==fe||Q.getUTCDate()!==V?e:Q.getTime()+q*a},l=Z.MIN_MS=Z.dateTime2ms("-9999"),_=Z.MAX_MS=Z.dateTime2ms("9999-12-31 23:59:59.9999"),Z.isDateTime=function(F,N){return Z.dateTime2ms(F,N)!==e};function w(F,N){return String(F+Math.pow(10,N)).slice(1)}var A=90*t,M=3*r,g=5*o;Z.ms2DateTime=function(F,N,O){if(typeof F!="number"||!(F>=l&&F<=_))return e;N||(N=0);var P=Math.floor(S(F+.05,1)*10),U=Math.round(F-P/10),B,X,$,se,le,fe;if(p(O)){var V=Math.floor(U/t)+n,Y=Math.floor(S(F,t));try{B=i.getComponentMethod("calendars","getCal")(O).fromJD(V).formatDate("yyyy-mm-dd")}catch{B=s("G%Y-%m-%d")(new Date(U))}if(B.charAt(0)==="-")for(;B.length<11;)B="-0"+B.slice(1);else for(;B.length<10;)B="0"+B;X=N=l+t&&F<=_-t))return e;var N=Math.floor(S(F+.05,1)*10),O=new Date(Math.round(F-N/10)),P=G("%Y-%m-%d")(O),U=O.getHours(),B=O.getMinutes(),X=O.getSeconds(),$=O.getUTCMilliseconds()*10+N;return b(P,U,B,X,$)};function b(F,N,O,P,U){if((N||O||P||U)&&(F+=" "+w(N,2)+":"+w(O,2),(P||U)&&(F+=":"+w(P,2),U))){for(var B=4;U%10===0;)B-=1,U/=10;F+="."+w(U,B)}return F}Z.cleanDate=function(F,N,O){if(F===e)return N;if(Z.isJSDate(F)||typeof F=="number"&&isFinite(F)){if(p(O))return x.error("JS Dates and milliseconds are incompatible with world calendars",F),N;if(F=Z.ms2DateTimeLocal(+F),!F&&N!==void 0)return N}else if(!Z.isDateTime(F,O))return x.error("unrecognized date",F),N;return F};var d=/%\d?f/g,u=/%h/g,y={1:"1",2:"1",3:"2",4:"2"};function f(F,N,O,P){F=F.replace(d,function(B){var X=Math.min(+B.charAt(1)||6,6),$=(N/1e3%1+2).toFixed(X).slice(2).replace(/0+$/,"")||"0";return $});var U=new Date(Math.floor(N+.05));if(F=F.replace(u,function(){return y[O("%q")(U)]}),p(P))try{F=i.getComponentMethod("calendars","worldCalFmt")(F,N,P)}catch{return"Invalid"}return O(F)(U)}var R=[59,59.9,59.99,59.999,59.9999];function L(F,N){var O=S(F+.05,t),P=w(Math.floor(O/r),2)+":"+w(S(Math.floor(O/o),60),2);if(N!=="M"){v(N)||(N=0);var U=Math.min(S(F/a,60),R[N]),B=(100+U).toFixed(N).slice(1);N>0&&(B=B.replace(/0+$/,"").replace(/[\.]$/,"")),P+=":"+B}return P}Z.formatDate=function(F,N,O,P,U,B){if(U=p(U)&&U,!N)if(O==="y")N=B.year;else if(O==="m")N=B.month;else if(O==="d")N=B.dayMonth+` `+B.year;else return L(F,O)+` `+f(B.dayMonthYear,F,P,U);return f(N,F,P,U)};var z=3*t;Z.incrementMonth=function(F,N,O){O=p(O)&&O;var P=S(F,t);if(F=Math.round(F-P),O)try{var U=Math.round(F/t)+n,B=i.getComponentMethod("calendars","getCal")(O),X=B.fromJD(U);return N%12?B.add(X,N,"m"):B.add(X,N/12,"y"),(X.toJD()-n)*t+P}catch{x.error("invalid ms "+F+" in calendar "+O)}var $=new Date(F+z);return $.setUTCMonth($.getUTCMonth()+N)+P-z},Z.findExactDates=function(F,N){for(var O=0,P=0,U=0,B=0,X,$,se=p(N)&&i.getComponentMethod("calendars","getCal")(N),le=0;le1?(n[h-1]-n[0])/(h-1):1,p,T;for(m>=0?T=i?e:t:T=i?o:r,a+=m*E*(i?-1:1)*(m>=0?1:-1);s90&&v.log("Long binary search..."),s-1};function e(a,n){return an}function o(a,n){return a>=n}Z.sorterAsc=function(a,n){return a-n},Z.sorterDes=function(a,n){return n-a},Z.distinctVals=function(a){var n=a.slice();n.sort(Z.sorterAsc);var i;for(i=n.length-1;i>-1&&n[i]===S;i--);for(var s=n[i]-n[0]||1,h=s/(i||1)/1e4,c=[],m,p=0;p<=i;p++){var T=n[p],l=T-m;m===void 0?(c.push(T),m=T):l>h&&(s=Math.min(s,l),c.push(T),m=T)}return{vals:c,minDiff:s}},Z.roundUp=function(a,n,i){for(var s=0,h=n.length-1,c,m=0,p=i?0:1,T=i?1:0,l=i?Math.ceil:Math.floor;s0&&(s=1),i&&s)return a.sort(n)}return s?a:a.reverse()},Z.findIndexOfMin=function(a,n){n=n||x;for(var i=1/0,s,h=0;hE.length)&&(e=E.length),G(S)||(S=!1),v(E[0])){for(r=new Array(e),t=0;tx.length-1)return x[x.length-1];var E=S%1;return E*x[Math.ceil(S)]+(1-E)*x[Math.floor(S)]}}}),W7=Xe({"src/lib/angles.js"(Z,G){"use strict";var v=Yy(),x=v.mod,S=v.modHalf,E=Math.PI,e=2*E;function t(T){return T/180*E}function r(T){return T/E*180}function o(T){return Math.abs(T[1]-T[0])>e-1e-14}function a(T,l){return S(l-T,e)}function n(T,l){return Math.abs(a(T,l))}function i(T,l){if(o(l))return!0;var _,w;l[0]w&&(w+=e);var A=x(T,e),M=A+e;return A>=_&&A<=w||M>=_&&M<=w}function s(T,l,_,w){if(!i(l,w))return!1;var A,M;return _[0]<_[1]?(A=_[0],M=_[1]):(A=_[1],M=_[0]),T>=A&&T<=M}function h(T,l,_,w,A,M,g){A=A||0,M=M||0;var b=o([_,w]),d,u,y,f,R;b?(d=0,u=E,y=e):_1/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=Xe({"src/lib/geometry2d.js"(Z){"use strict";var G=Yy().mod;Z.segmentsIntersect=v;function v(t,r,o,a,n,i,s,h){var c=o-t,m=n-t,p=s-n,T=a-r,l=i-r,_=h-i,w=c*_-p*T;if(w===0)return null;var A=(m*_-p*l)/w,M=(m*T-c*l)/w;return M<0||M>1||A<0||A>1?null:{x:t+c*A,y:r+T*A}}Z.segmentDistance=function(r,o,a,n,i,s,h,c){if(v(r,o,a,n,i,s,h,c))return 0;var m=a-r,p=n-o,T=h-i,l=c-s,_=m*m+p*p,w=T*T+l*l,A=Math.min(x(m,p,_,i-r,s-o),x(m,p,_,h-r,c-o),x(T,l,w,r-i,o-s),x(T,l,w,a-i,n-s));return Math.sqrt(A)};function x(t,r,o,a,n){var i=a*t+n*r;if(i<0)return a*a+n*n;if(i>o){var s=a-t,h=n-r;return s*s+h*h}else{var c=a*r-n*t;return c*c/o}}var S,E,e;Z.getTextLocation=function(r,o,a,n){if((r!==E||n!==e)&&(S={},E=r,e=n),S[a])return S[a];var i=r.getPointAtLength(G(a-n/2,o)),s=r.getPointAtLength(G(a+n/2,o)),h=Math.atan((s.y-i.y)/(s.x-i.x)),c=r.getPointAtLength(G(a,o)),m=(c.x*4+i.x+s.x)/6,p=(c.y*4+i.y+s.y)/6,T={x:m,y:p,theta:h};return S[a]=T,T},Z.clearLocationCache=function(){E=null},Z.getVisibleSegment=function(r,o,a){var n=o.left,i=o.right,s=o.top,h=o.bottom,c=0,m=r.getTotalLength(),p=m,T,l;function _(A){var M=r.getPointAtLength(A);A===0?T=M:A===m&&(l=M);var g=M.xi?M.x-i:0,b=M.yh?M.y-h:0;return Math.sqrt(g*g+b*b)}for(var w=_(c);w;){if(c+=w+a,c>p)return;w=_(c)}for(w=_(p);w;){if(p-=w+a,c>p)return;w=_(p)}return{min:c,max:p,len:p-c,total:m,isClosed:c===0&&p===m&&Math.abs(T.x-l.x)<.1&&Math.abs(T.y-l.y)<.1}},Z.findPointOnPath=function(r,o,a,n){n=n||{};for(var i=n.pathLength||r.getTotalLength(),s=n.tolerance||.001,h=n.iterationLimit||30,c=r.getPointAtLength(0)[a]>r.getPointAtLength(i)[a]?-1:1,m=0,p=0,T=i,l,_,w;m0?T=l:p=l,m++}return _}}}),y2=Xe({"src/lib/throttle.js"(Z){"use strict";var G={};Z.throttle=function(S,E,e){var t=G[S],r=Date.now();if(!t){for(var o in G)G[o].tst.ts+E){a();return}t.timer=setTimeout(function(){a(),t.timer=null},E)},Z.done=function(x){var S=G[x];return!S||!S.timer?Promise.resolve():new Promise(function(E){var e=S.onDone;S.onDone=function(){e&&e(),E(),S.onDone=null}})},Z.clear=function(x){if(x)v(G[x]),delete G[x];else for(var S in G)Z.clear(S)};function v(x){x&&x.timer!==null&&(clearTimeout(x.timer),x.timer=null)}}}),Y7=Xe({"src/lib/clear_responsive.js"(Z,G){"use strict";G.exports=function(x){x._responsiveChartHandler&&(window.removeEventListener("resize",x._responsiveChartHandler),delete x._responsiveChartHandler)}}}),K7=Xe({"node_modules/is-mobile/index.js"(Z,G){"use strict";G.exports=E,G.exports.isMobile=E,G.exports.default=E;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,x=/CrOS/,S=/android|ipad|playbook|silk/i;function E(e){e||(e={});let t=e.ua;if(!t&&typeof navigator<"u"&&(t=navigator.userAgent),t&&t.headers&&typeof t.headers["user-agent"]=="string"&&(t=t.headers["user-agent"]),typeof t!="string")return!1;let r=v.test(t)&&!x.test(t)||!!e.tablet&&S.test(t);return!r&&e.tablet&&e.featureDetect&&navigator&&navigator.maxTouchPoints>1&&t.indexOf("Macintosh")!==-1&&t.indexOf("Safari")!==-1&&(r=!0),r}}}),J7=Xe({"src/lib/preserve_drawing_buffer.js"(Z,G){"use strict";var v=rs(),x=K7();G.exports=function(e){var t;if(e&&e.hasOwnProperty("userAgent")?t=e.userAgent:t=S(),typeof t!="string")return!0;var r=x({ua:{headers:{"user-agent":t}},tablet:!0,featureDetect:!1});if(!r)for(var o=t.split(" "),a=1;a-1;i--){var s=o[i];if(s.slice(0,8)==="Version/"){var h=s.slice(8).split(".")[0];if(v(h)&&(h=+h),h>=13)return!0}}}return r};function S(){var E;return typeof navigator<"u"&&(E=navigator.userAgent),E&&E.headers&&typeof E.headers["user-agent"]=="string"&&(E=E.headers["user-agent"]),E}}}),$7=Xe({"src/lib/make_trace_groups.js"(Z,G){"use strict";var v=Hn();G.exports=function(S,E,e){var t=S.selectAll("g."+e.replace(/\s/g,".")).data(E,function(o){return o[0].trace.uid});t.exit().remove(),t.enter().append("g").attr("class",e),t.order();var r=S.classed("rangeplot")?"nodeRangePlot3":"node3";return t.each(function(o){o[0][r]=v.select(this)}),t}}}),Q7=Xe({"src/lib/localize.js"(Z,G){"use strict";var v=so();G.exports=function(S,E){for(var e=S._context.locale,t=0;t<2;t++){for(var r=S._context.locales,o=0;o<2;o++){var a=(r[e]||{}).dictionary;if(a){var n=a[E];if(n)return n}r=v.localeRegistry}var i=e.split("-")[0];if(i===e)break;e=i}return E}}}),r5=Xe({"src/lib/filter_unique.js"(Z,G){"use strict";G.exports=function(x){for(var S={},E=[],e=0,t=0;t1?(E*x+E*S)/E:x+S,t=String(e).length;if(t>16){var r=String(S).length,o=String(x).length;if(t>=o+r){var a=parseFloat(e).toPrecision(12);a.indexOf("e+")===-1&&(e=+a)}}return e}}}),rz=Xe({"src/lib/clean_number.js"(Z,G){"use strict";var v=rs(),x=Hs().BADNUM,S=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;G.exports=function(e){return typeof e=="string"&&(e=e.replace(S,"")),v(e)?Number(e):x}}}),sa=Xe({"src/lib/index.js"(Z,G){"use strict";var v=Hn(),x=Xv().utcFormat,S=YA().format,E=rs(),e=Hs(),t=e.FP_SAFE,r=-t,o=e.BADNUM,a=G.exports={};a.adjustFormat=function(j){return!j||/^\d[.]\df/.test(j)||/[.]\d%/.test(j)?j:j==="0.f"?"~f":/^\d%/.test(j)?"~%":/^\ds/.test(j)?"~s":!/^[~,.0$]/.test(j)&&/[&fps]/.test(j)?"~"+j:j};var n={};a.warnBadFormat=function(ae){var j=String(ae);n[j]||(n[j]=1,a.warn('encountered bad format: "'+j+'"'))},a.noFormat=function(ae){return String(ae)},a.numberFormat=function(ae){var j;try{j=S(a.adjustFormat(ae))}catch{return a.warnBadFormat(ae),a.noFormat}return j},a.nestedProperty=b_(),a.keyedContainer=u7(),a.relativeAttr=c7(),a.isPlainObject=Zv(),a.toLogRange=h2(),a.relinkPrivateKeys=f7();var i=bp();a.isArrayBuffer=i.isArrayBuffer,a.isTypedArray=i.isTypedArray,a.isArrayOrTypedArray=i.isArrayOrTypedArray,a.isArray1D=i.isArray1D,a.ensureArray=i.ensureArray,a.concat=i.concat,a.maxRowLength=i.maxRowLength,a.minRowLength=i.minRowLength;var s=Yy();a.mod=s.mod,a.modHalf=s.modHalf;var h=h7();a.valObjectMeta=h.valObjectMeta,a.coerce=h.coerce,a.coerce2=h.coerce2,a.coerceFont=h.coerceFont,a.coercePattern=h.coercePattern,a.coerceHoverinfo=h.coerceHoverinfo,a.coerceSelectionMarkerOpacity=h.coerceSelectionMarkerOpacity,a.validate=h.validate;var c=G7();a.dateTime2ms=c.dateTime2ms,a.isDateTime=c.isDateTime,a.ms2DateTime=c.ms2DateTime,a.ms2DateTimeLocal=c.ms2DateTimeLocal,a.cleanDate=c.cleanDate,a.isJSDate=c.isJSDate,a.formatDate=c.formatDate,a.incrementMonth=c.incrementMonth,a.dateTick0=c.dateTick0,a.dfltRange=c.dfltRange,a.findExactDates=c.findExactDates,a.MIN_MS=c.MIN_MS,a.MAX_MS=c.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=Jm();var p=H7();a.aggNums=p.aggNums,a.len=p.len,a.mean=p.mean,a.geometricMean=p.geometricMean,a.median=p.median,a.midRange=p.midRange,a.variance=p.variance,a.stdev=p.stdev,a.interp=p.interp;var T=d2();a.init2dArray=T.init2dArray,a.transposeRagged=T.transposeRagged,a.dot=T.dot,a.translationMatrix=T.translationMatrix,a.rotationMatrix=T.rotationMatrix,a.rotationXYMatrix=T.rotationXYMatrix,a.apply3DTransform=T.apply3DTransform,a.apply2DTransform=T.apply2DTransform,a.apply2DTransform2=T.apply2DTransform2,a.convertCssMatrix=T.convertCssMatrix,a.inverseTransformMatrix=T.inverseTransformMatrix;var l=W7();a.deg2rad=l.deg2rad,a.rad2deg=l.rad2deg,a.angleDelta=l.angleDelta,a.angleDist=l.angleDist,a.isFullCircle=l.isFullCircle,a.isAngleInsideSector=l.isAngleInsideSector,a.isPtInsideSector=l.isPtInsideSector,a.pathArc=l.pathArc,a.pathSector=l.pathSector,a.pathAnnulus=l.pathAnnulus;var _=X7();a.isLeftAnchor=_.isLeftAnchor,a.isCenterAnchor=_.isCenterAnchor,a.isRightAnchor=_.isRightAnchor,a.isTopAnchor=_.isTopAnchor,a.isMiddleAnchor=_.isMiddleAnchor,a.isBottomAnchor=_.isBottomAnchor;var w=Z7();a.segmentsIntersect=w.segmentsIntersect,a.segmentDistance=w.segmentDistance,a.getTextLocation=w.getTextLocation,a.clearLocationCache=w.clearLocationCache,a.getVisibleSegment=w.getVisibleSegment,a.findPointOnPath=w.findPointOnPath;var A=Qo();a.extendFlat=A.extendFlat,a.extendDeep=A.extendDeep,a.extendDeepAll=A.extendDeepAll,a.extendDeepNoArrays=A.extendDeepNoArrays;var M=Km();a.log=M.log,a.warn=M.warn,a.error=M.error;var g=Jy();a.counterRegex=g.counter;var b=y2();a.throttle=b.throttle,a.throttleDone=b.done,a.clearThrottle=b.clear;var 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 E(j)?(j=Number(j),j>t||j=j?!1:E(ae)&&ae>=0&&ae%1===0},a.noop=p2(),a.identity=S_(),a.repeat=function(ae,j){for(var Q=new Array(j),re=0;reQ?Math.max(Q,Math.min(j,ae)):Math.max(j,Math.min(Q,ae))},a.bBoxIntersect=function(ae,j,Q){return Q=Q||0,ae.left<=j.right+Q&&j.left<=ae.right+Q&&ae.top<=j.bottom+Q&&j.top<=ae.bottom+Q},a.simpleMap=function(ae,j,Q,re,ce){for(var be=ae.length,Ae=new Array(be),De=0;De=Math.pow(2,Q)?ce>10?(a.warn("randstr failed uniqueness"),Ae):ae(j,Q,re,(ce||0)+1):Ae},a.OptionControl=function(ae,j){ae||(ae={}),j||(j="opt");var Q={};return Q.optionList=[],Q._newoption=function(re){re[j]=ae,Q[re.name]=re,Q.optionList.push(re)},Q["_"+j]=ae,Q},a.smooth=function(ae,j){if(j=Math.round(j)||0,j<2)return ae;var Q=ae.length,re=2*Q,ce=2*j-1,be=new Array(ce),Ae=new Array(Q),De,ze,Ze,at;for(De=0;De=re&&(Ze-=re*Math.floor(Ze/re)),Ze<0?Ze=-1-Ze:Ze>=Q&&(Ze=re-1-Ze),at+=ae[Ze]*be[ze];Ae[De]=at}return Ae},a.syncOrAsync=function(ae,j,Q){var re,ce;function be(){return a.syncOrAsync(ae,j,Q)}for(;ae.length;)if(ce=ae.splice(0,1)[0],re=ce(j),re&&re.then)return re.then(be);return Q&&Q(j)},a.stripTrailingSlash=function(ae){return ae.slice(-1)==="/"?ae.slice(0,-1):ae},a.noneOrAll=function(ae,j,Q){if(ae){var re=!1,ce=!0,be,Ae;for(be=0;be0?ce:0})},a.fillArray=function(ae,j,Q,re){if(re=re||a.identity,a.isArrayOrTypedArray(ae))for(var ce=0;ceL.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,Q,re){var ce=ae.select(j+(Q?"."+Q:""));if(ce.size())return ce;var be=ae.append(j);return Q&&be.classed(Q,!0),re&&be.call(re),be},a.ensureSingleById=function(ae,j,Q,re){var ce=ae.select(j+"#"+Q);if(ce.size())return ce;var be=ae.append(j).attr("id",Q);return re&&be.call(re),be},a.objectFromPath=function(ae,j){for(var Q=ae.split("."),re,ce=re={},be=0;be1?ce+Ae[1]:"";if(be&&(Ae.length>1||De.length>4||Q))for(;re.test(De);)De=De.replace(re,"$1"+be+"$2");return De+ze},a.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var P=/^\w*$/;a.templateString=function(ae,j){var Q={};return ae.replace(a.TEMPLATE_STRING_REGEX,function(re,ce){var be;return P.test(ce)?be=j[ce]:(Q[ce]=Q[ce]||a.nestedProperty(j,ce).get,be=Q[ce](!0)),be!==void 0?be:""})};var U={max:10,count:0,name:"hovertemplate"};a.hovertemplateString=ae=>fe(ds(To({},ae),{opts:U}));var B={max:10,count:0,name:"texttemplate"};a.texttemplateString=ae=>fe(ds(To({},ae),{opts:B}));var X=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;function $(ae){var j=ae.match(X);return j?{key:j[1],op:j[2],number:Number(j[3])}:{key:ae,op:null,number:null}}var se={max:10,count:0,name:"texttemplate",parseMultDiv:!0};a.texttemplateStringForShapes=ae=>fe(ds(To({},ae),{opts:se}));var le=/^[:|\|]/;function fe({data:ae=[],locale:j,fallback:Q,labels:re={},opts:ce,template:be}){return be.replace(a.TEMPLATE_STRING_REGEX,(Ae,De,ze)=>{let Ze=["xother","yother"].includes(De),at=["_xother","_yother"].includes(De),nt=["_xother_","_yother_"].includes(De),rt=["xother_","yother_"].includes(De),st=Ze||at||rt||nt;(at||nt)&&(De=De.substring(1)),(rt||nt)&&(De=De.substring(0,De.length-1));let Me=null,ye=null;if(ce.parseMultDiv){var he=$(De);De=he.key,Me=he.op,ye=he.number}let Oe;if(st){if(re[De]===void 0)return"";Oe=re[De]}else for(let Pt of ae)if(Pt){if(Pt.hasOwnProperty(De)){Oe=Pt[De];break}if(P.test(De)||(Oe=a.nestedProperty(Pt,De).get(!0)),Oe!==void 0)break}if(Oe===void 0){let{count:Pt,max:It,name:qt}=ce,Wt=Q===!1?Ae:Q;return Pt=V&&Ae<=Y,Ze=De>=V&&De<=Y;if(ze&&(re=10*re+Ae-V),Ze&&(ce=10*ce+De-V),!ze||!Ze){if(re!==ce)return re-ce;if(Ae!==De)return Ae-De}}return ce-re};var ee=2e9;a.seedPseudoRandom=function(){ee=2e9},a.pseudoRandom=function(){var ae=ee;return ee=(69069*ee+1)%4294967296,Math.abs(ee-ae)<429496729?a.pseudoRandom():ee/4294967296},a.fillText=function(ae,j,Q){var re=Array.isArray(Q)?function(Ae){Q.push(Ae)}:function(Ae){Q.text=Ae},ce=a.extractOption(ae,j,"htx","hovertext");if(a.isValidTextValue(ce))return re(ce);var be=a.extractOption(ae,j,"tx","text");if(a.isValidTextValue(be))return re(be)},a.isValidTextValue=function(ae){return ae||ae===0},a.formatPercent=function(ae,j){j=j||0;for(var Q=(Math.round(100*ae*Math.pow(10,j))*Math.pow(.1,j)).toFixed(j)+"%",re=0;re1&&(Ze=1):Ze=0,a.strTranslate(ce-Ze*(Q+Ae),be-Ze*(re+De))+a.strScale(Ze)+(ze?"rotate("+ze+(j?"":" "+Q+" "+re)+")":"")},a.setTransormAndDisplay=function(ae,j){ae.attr("transform",a.getTextTransform(j)),ae.style("display",j.scale?null:"none")},a.ensureUniformFontSize=function(ae,j){var Q=a.extendFlat({},j);return Q.size=Math.max(j.size,ae._fullLayout.uniformtext.minsize||0),Q},a.join2=function(ae,j,Q){var re=ae.length;return re>1?ae.slice(0,-1).join(j)+Q+ae[re-1]:ae.join(j)},a.bigFont=function(ae){return Math.round(1.2*ae)};var q=a.getFirefoxVersion(),oe=q!==null&&q<86;a.getPositionFromD3Event=function(){return oe?[v.event.layerX,v.event.layerY]:[v.event.offsetX,v.event.offsetY]}}}),az=Xe({"build/plotcss.js"(){"use strict";var Z=sa(),G={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;border:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X:focus-within .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-group a":"display:grid;place-content:center;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;border:none;background:rgba(0,0,0,0);","X .modebar-btn svg":"position:relative;","X .modebar-btn:focus-visible":"outline:1px solid #000;outline-offset:1px;border-radius:3px;","X .modebar.vertical":"display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;","X .modebar.vertical svg":"top:-1px;","X .modebar.vertical .modebar-group":"display:block;float:none;padding-left:0px;padding-bottom:8px;","X .modebar.vertical .modebar-group .modebar-btn":"display:block;text-align:center;","X [data-title]:before,X [data-title]:after":"position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;","X [data-title]:hover:before,X [data-title]:hover:after":"display:block;opacity:1;","X [data-title]:before":'content:"";position:absolute;background:rgba(0,0,0,0);border:6px solid rgba(0,0,0,0);z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;',"X [data-title]:after":"content:attr(data-title);background:#69738a;color:#fff;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;","X .vertical [data-title]:before,X .vertical [data-title]:after":"top:0%;right:200%;","X .vertical [data-title]:before":"border:6px solid rgba(0,0,0,0);border-left-color:#69738a;margin-top:8px;margin-right:-30px;",Y:'font-family:"Open Sans",verdana,arial,sans-serif;position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;',"Y p":"margin:0;","Y .notifier-note":"min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;","Y .notifier-close":"color:#fff;opacity:.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;","Y .notifier-close:hover":"color:#444;text-decoration:none;cursor:pointer;"};for(x in G)v=x.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier"),Z.addStyleRule(v,G[x]);var v,x}}),a5=Xe({"node_modules/is-browser/client.js"(Z,G){G.exports=!0}}),i5=Xe({"node_modules/has-hover/index.js"(Z,G){"use strict";var v=a5(),x;typeof window.matchMedia=="function"?x=!window.matchMedia("(hover: none)").matches:x=v,G.exports=x}}),Z0=Xe({"node_modules/events/events.js"(Z,G){"use strict";var v=typeof Reflect=="object"?Reflect:null,x=v&&typeof v.apply=="function"?v.apply:function(M,g,b){return Function.prototype.apply.call(M,g,b)},S;v&&typeof v.ownKeys=="function"?S=v.ownKeys:Object.getOwnPropertySymbols?S=function(M){return Object.getOwnPropertyNames(M).concat(Object.getOwnPropertySymbols(M))}:S=function(M){return Object.getOwnPropertyNames(M)};function E(A){console&&console.warn&&console.warn(A)}var e=Number.isNaN||function(M){return M!==M};function t(){t.init.call(this)}G.exports=t,G.exports.once=l,t.EventEmitter=t,t.prototype._events=void 0,t.prototype._eventsCount=0,t.prototype._maxListeners=void 0;var r=10;function o(A){if(typeof A!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof A)}Object.defineProperty(t,"defaultMaxListeners",{enumerable:!0,get:function(){return r},set:function(A){if(typeof A!="number"||A<0||e(A))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+A+".");r=A}}),t.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},t.prototype.setMaxListeners=function(M){if(typeof M!="number"||M<0||e(M))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+M+".");return this._maxListeners=M,this};function a(A){return A._maxListeners===void 0?t.defaultMaxListeners:A._maxListeners}t.prototype.getMaxListeners=function(){return a(this)},t.prototype.emit=function(M){for(var g=[],b=1;b0&&(y=g[0]),y instanceof Error)throw y;var f=new Error("Unhandled error."+(y?" ("+y.message+")":""));throw f.context=y,f}var R=u[M];if(R===void 0)return!1;if(typeof R=="function")x(R,this,g);else for(var L=R.length,z=m(R,L),b=0;b0&&y.length>d&&!y.warned){y.warned=!0;var f=new Error("Possible EventEmitter memory leak detected. "+y.length+" "+String(M)+" listeners added. Use emitter.setMaxListeners() to increase limit");f.name="MaxListenersExceededWarning",f.emitter=A,f.type=M,f.count=y.length,E(f)}return A}t.prototype.addListener=function(M,g){return n(this,M,g,!1)},t.prototype.on=t.prototype.addListener,t.prototype.prependListener=function(M,g){return n(this,M,g,!0)};function i(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function s(A,M,g){var b={fired:!1,wrapFn:void 0,target:A,type:M,listener:g},d=i.bind(b);return d.listener=g,b.wrapFn=d,d}t.prototype.once=function(M,g){return o(g),this.on(M,s(this,M,g)),this},t.prototype.prependOnceListener=function(M,g){return o(g),this.prependListener(M,s(this,M,g)),this},t.prototype.removeListener=function(M,g){var b,d,u,y,f;if(o(g),d=this._events,d===void 0)return this;if(b=d[M],b===void 0)return this;if(b===g||b.listener===g)--this._eventsCount===0?this._events=Object.create(null):(delete d[M],d.removeListener&&this.emit("removeListener",M,b.listener||g));else if(typeof b!="function"){for(u=-1,y=b.length-1;y>=0;y--)if(b[y]===g||b[y].listener===g){f=b[y].listener,u=y;break}if(u<0)return this;u===0?b.shift():p(b,u),b.length===1&&(d[M]=b[0]),d.removeListener!==void 0&&this.emit("removeListener",M,f||g)}return this},t.prototype.off=t.prototype.removeListener,t.prototype.removeAllListeners=function(M){var g,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[M]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete b[M]),this;if(arguments.length===0){var u=Object.keys(b),y;for(d=0;d=0;d--)this.removeListener(M,g[d]);return this};function h(A,M,g){var b=A._events;if(b===void 0)return[];var d=b[M];return d===void 0?[]:typeof d=="function"?g?[d.listener||d]:[d]:g?T(d):m(d,d.length)}t.prototype.listeners=function(M){return h(this,M,!0)},t.prototype.rawListeners=function(M){return h(this,M,!1)},t.listenerCount=function(A,M){return typeof A.listenerCount=="function"?A.listenerCount(M):c.call(A,M)},t.prototype.listenerCount=c;function c(A){var M=this._events;if(M!==void 0){var g=M[A];if(typeof g=="function")return 1;if(g!==void 0)return g.length}return 0}t.prototype.eventNames=function(){return this._eventsCount>0?S(this._events):[]};function m(A,M){for(var g=new Array(M),b=0;b{},{passive:!0}),S},triggerHandler:function(S,E,e){var t,r=S._ev;if(!r)return;var o=r._events[E];if(!o)return;function a(i){if(i.listener){if(r.removeListener(E,i.listener),!i.fired)return i.fired=!0,i.listener.apply(r,[e])}else return i.apply(r,[e])}o=Array.isArray(o)?o:[o];var n;for(n=0;nx.queueLength&&(e.undoQueue.queue.shift(),e.undoQueue.index--)},E.startSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!0,e.undoQueue.beginSequence=!0},E.stopSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!1,e.undoQueue.beginSequence=!1},E.undo=function(t){var r,o;if(!(t.undoQueue===void 0||isNaN(t.undoQueue.index)||t.undoQueue.index<=0)){for(t.undoQueue.index--,r=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,o=0;o=t.undoQueue.queue.length)){for(r=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,o=0;o=P.length)return!1;if(L.dimensions===2){if(F++,z.length===F)return L;var U=z[F];if(!w(U))return!1;L=P[O][U]}else L=P[O]}else L=P}}return L}function w(L){return L===Math.round(L)&&L>=0}function A(L){var z,F;z=G.modules[L]._module,F=z.basePlotModule;var N={};N.type=null;var O=o({},x),P=o({},z.attributes);Z.crawl(P,function(X,$,se,le,fe){i(O,fe).set(void 0),X===void 0&&i(P,fe).set(void 0)}),o(N,O),G.traceIs(L,"noOpacity")&&delete N.opacity,G.traceIs(L,"showLegend")||(delete N.showlegend,delete N.legendgroup),G.traceIs(L,"noHover")&&(delete N.hoverinfo,delete N.hoverlabel),z.selectPoints||delete N.selectedpoints,o(N,P),F.attributes&&o(N,F.attributes),N.type=L;var U={meta:z.meta||{},categories:z.categories||{},animatable:!!z.animatable,type:L,attributes:b(N)};if(z.layoutAttributes){var B={};o(B,z.layoutAttributes),U.layoutAttributes=b(B)}return z.animatable||Z.crawl(U,function(X){Z.isValObject(X)&&"anim"in X&&delete X.anim}),U}function M(){var L={},z,F;o(L,S);for(z in G.subplotsRegistry)if(F=G.subplotsRegistry[z],!!F.layoutAttributes)if(Array.isArray(F.attr))for(var N=0;N=a&&(o._input||{})._templateitemname;i&&(n=a);var s=r+"["+n+"]",h;function c(){h={},i&&(h[s]={},h[s][x]=i)}c();function m(_,w){h[_]=w}function p(_,w){i?G.nestedProperty(h[s],_).set(w):h[s+"."+_]=w}function T(){var _=h;return c(),_}function l(_,w){_&&p(_,w);var A=T();for(var M in A)G.nestedProperty(t,M).set(A[M])}return{modifyBase:m,modifyItem:p,getUpdateObj:T,applyUpdate:l}}}}),lh=Xe({"src/plots/cartesian/constants.js"(Z,G){"use strict";var v=Jy().counter;G.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"}}}),ef=Xe({"src/plots/cartesian/axis_ids.js"(Z){"use strict";var G=so(),v=lh();Z.id2name=function(E){if(!(typeof E!="string"||!E.match(v.AX_ID_PATTERN))){var e=E.split(" ")[0].slice(1);return e==="1"&&(e=""),E.charAt(0)+"axis"+e}},Z.name2id=function(E){if(E.match(v.AX_NAME_PATTERN)){var e=E.slice(5);return e==="1"&&(e=""),E.charAt(0)+e}},Z.cleanId=function(E,e,t){var r=/( domain)$/.test(E);if(!(typeof E!="string"||!E.match(v.AX_ID_PATTERN))&&!(e&&E.charAt(0)!==e)&&!(r&&!t)){var o=E.split(" ")[0].slice(1).replace(/^0+/,"");return o==="1"&&(o=""),E.charAt(0)+o+(r&&t?" domain":"")}},Z.list=function(S,E,e){var t=S._fullLayout;if(!t)return[];var r=Z.listIds(S,E),o=new Array(r.length),a;for(a=0;at?1:-1:+(S.slice(1)||1)-+(E.slice(1)||1)},Z.ref2id=function(S){return/^[xyz]/.test(S)?S.split(" ")[0]:!1};function x(S,E){if(E&&E.length){for(var e=0;e0?".":"")+i;v.isPlainObject(s)?t(s,o,h,n+1):o(h,i,s)}})}}}),bc=Xe({"src/plots/plots.js"(Z,G){"use strict";var v=Hn(),x=Xv().timeFormatLocale,S=YA().formatLocale,E=rs(),e=KA(),t=so(),r=e1(),o=zl(),a=sa(),n=$n(),i=Hs().BADNUM,s=ef(),h=$m().clearOutline,c=_2(),m=A_(),p=n5(),T=Hh().getModuleCalcData,l=a.relinkPrivateKeys,_=a._,w=G.exports={};a.extendFlat(w,t),w.attributes=ru(),w.attributes.type.values=w.allTypes,w.fontAttrs=tc(),w.layoutAttributes=$y();var A=nz();w.executeAPICommand=A.executeAPICommand,w.computeAPICommandBindings=A.computeAPICommandBindings,w.manageCommandObserver=A.manageCommandObserver,w.hasSimpleAPICommandBindings=A.hasSimpleAPICommandBindings,w.redrawText=function(V){return V=a.getGraphDiv(V),new Promise(function(Y){setTimeout(function(){V._fullLayout&&(t.getComponentMethod("annotations","draw")(V),t.getComponentMethod("legend","draw")(V),t.getComponentMethod("colorbar","draw")(V),Y(w.previousPromises(V)))},300)})},w.resize=function(V){V=a.getGraphDiv(V);var Y,ee=new Promise(function(q,oe){(!V||a.isHidden(V))&&oe(new Error("Resize must be passed a displayed plot div element.")),V._redrawTimer&&clearTimeout(V._redrawTimer),V._resolveResize&&(Y=V._resolveResize),V._resolveResize=q,V._redrawTimer=setTimeout(function(){if(!V.layout||V.layout.width&&V.layout.height||a.isHidden(V)){q(V);return}delete V.layout.width,delete V.layout.height;var ae=V.changed;V.autoplay=!0,t.call("relayout",V,{autosize:!0}).then(function(){V.changed=ae,V._resolveResize===q&&(delete V._resolveResize,q(V))})},100)});return Y&&Y(ee),ee},w.previousPromises=function(V){if((V._promises||[]).length)return Promise.all(V._promises).then(function(){V._promises=[]})},w.addLinks=function(V){if(!(!V._context.showLink&&!V._context.showSources)){var Y=V._fullLayout,ee=a.ensureSingle(Y._paper,"text","js-plot-link-container",function(re){re.style({"font-family":'"Open Sans", Arial, sans-serif',"font-size":"12px",fill:n.defaultLine,"pointer-events":"all"}).each(function(){var ce=v.select(this);ce.append("tspan").classed("js-link-to-tool",!0),ce.append("tspan").classed("js-link-spacer",!0),ce.append("tspan").classed("js-sourcelinks",!0)})}),q=ee.node(),oe={y:Y._paper.attr("height")-9};document.body.contains(q)&&q.getComputedTextLength()>=Y.width-20?(oe["text-anchor"]="start",oe.x=5):(oe["text-anchor"]="end",oe.x=Y._paper.attr("width")-7),ee.attr(oe);var ae=ee.select(".js-link-to-tool"),j=ee.select(".js-link-spacer"),Q=ee.select(".js-sourcelinks");V._context.showSources&&V._context.showSources(V),V._context.showLink&&M(V,ae),j.text(ae.text()&&Q.text()?" - ":"")}};function M(V,Y){Y.text("");var ee=Y.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(V._context.linkText+" \xBB");if(V._context.sendData)ee.on("click",function(){w.sendDataToCloud(V)});else{var q=window.location.pathname.split("/"),oe=window.location.search;ee.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+q[2].split(".")[0]+"/"+q[1]+oe})}}w.sendDataToCloud=function(V){var Y=(window.PLOTLYENV||{}).BASE_URL||V._context.plotlyServerURL;if(Y){V.emit("plotly_beforeexport");var ee=v.select(V).append("div").attr("id","hiddenform").style("display","none"),q=ee.append("form").attr({action:Y+"/external",method:"post",target:"_blank"}),oe=q.append("input").attr({type:"text",name:"data"});return oe.node().value=w.graphJson(V,!1,"keepdata"),q.node().submit(),ee.remove(),V.emit("plotly_afterexport"),!1}};var g=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],b=["year","month","dayMonth","dayMonthYear"];w.supplyDefaults=function(V,Y){var ee=Y&&Y.skipUpdateCalc,q=V._fullLayout||{};if(q._skipDefaults){delete q._skipDefaults;return}var oe=V._fullLayout={},ae=V.layout||{},j=V._fullData||[],Q=V._fullData=[],re=V.data||[],ce=V.calcdata||[],be=V._context||{},Ae;V._transitionData||w.createTransitionData(V),oe._dfltTitle={plot:_(V,"Click to enter Plot title"),subtitle:_(V,"Click to enter Plot subtitle"),x:_(V,"Click to enter X axis title"),y:_(V,"Click to enter Y axis title"),colorbar:_(V,"Click to enter Colorscale title"),annotation:_(V,"new text")},oe._traceWord=_(V,"trace");var De=y(V,g);if(oe._mapboxAccessToken=be.mapboxAccessToken,q._initialAutoSizeIsDone){var ze=q.width,Ze=q.height;w.supplyLayoutGlobalDefaults(ae,oe,De),ae.width||(oe.width=ze),ae.height||(oe.height=Ze),w.sanitizeMargins(oe)}else{w.supplyLayoutGlobalDefaults(ae,oe,De);var at=!ae.width||!ae.height,nt=oe.autosize,rt=be.autosizable,st=at&&(nt||rt);st?w.plotAutoSize(V,ae,oe):at&&w.sanitizeMargins(oe),!nt&&at&&(ae.width=oe.width,ae.height=oe.height)}oe._d3locale=f(De,oe.separators),oe._extraFormat=y(V,b),oe._initialAutoSizeIsDone=!0,oe._dataLength=re.length,oe._modules=[],oe._visibleModules=[],oe._basePlotModules=[];var Me=oe._subplots=u(),ye=oe._splomAxes={x:{},y:{}},he=oe._splomSubplots={};oe._splomGridDflt={},oe._scatterStackOpts={},oe._firstScatter={},oe._alignmentOpts={},oe._colorAxes={},oe._requestRangeslider={},oe._traceUids=d(j,re),w.supplyDataDefaults(re,Q,ae,oe);var Oe=Object.keys(ye.x),tt=Object.keys(ye.y);if(Oe.length>1&&tt.length>1){for(t.getComponentMethod("grid","sizeDefaults")(ae,oe),Ae=0;Ae15&&tt.length>15&&oe.shapes.length===0&&oe.images.length===0,w.linkSubplots(Q,oe,j,q),w.cleanPlot(Q,oe,j,q);var qt=!!(q._has&&q._has("cartesian")),Wt=!!(oe._has&&oe._has("cartesian")),kr=qt,mr=Wt;kr&&!mr?q._bgLayer.remove():mr&&!kr&&(oe._shouldCreateBgLayer=!0),q._zoomlayer&&!V._dragging&&h({_fullLayout:q}),R(Q,oe),l(oe,q),t.getComponentMethod("colorscale","crossTraceDefaults")(Q,oe),oe._preGUI||(oe._preGUI={}),oe._tracePreGUI||(oe._tracePreGUI={});var qr=oe._tracePreGUI,Sr={},Rr;for(Rr in qr)Sr[Rr]="old";for(Ae=0;Ae0){var be=1-2*ae;j=Math.round(be*j),Q=Math.round(be*Q)}}var Ae=w.layoutAttributes.width.min,De=w.layoutAttributes.height.min;j1,Ze=!ee.height&&Math.abs(q.height-Q)>1;(Ze||ze)&&(ze&&(q.width=j),Ze&&(q.height=Q)),Y._initialAutoSize||(Y._initialAutoSize={width:j,height:Q}),w.sanitizeMargins(q)},w.supplyLayoutModuleDefaults=function(V,Y,ee,q){var oe=t.componentsRegistry,ae=Y._basePlotModules,j,Q,re,ce=t.subplotsRegistry.cartesian;for(j in oe)re=oe[j],re.includeBasePlot&&re.includeBasePlot(V,Y);ae.length||ae.push(ce),Y._has("cartesian")&&(t.getComponentMethod("grid","contentDefaults")(V,Y),ce.finalizeSubplots(V,Y));for(var be in Y._subplots)Y._subplots[be].sort(a.subplotSort);for(Q=0;Q1&&(ee.l/=nt,ee.r/=nt)}if(De){var rt=(ee.t+ee.b)/De;rt>1&&(ee.t/=rt,ee.b/=rt)}var st=ee.xl!==void 0?ee.xl:ee.x,Me=ee.xr!==void 0?ee.xr:ee.x,ye=ee.yt!==void 0?ee.yt:ee.y,he=ee.yb!==void 0?ee.yb:ee.y;ze[Y]={l:{val:st,size:ee.l+at},r:{val:Me,size:ee.r+at},b:{val:he,size:ee.b+at},t:{val:ye,size:ee.t+at}},Ze[Y]=1}if(!q._replotting)return w.doAutoMargin(V)}};function P(V){if("_redrawFromAutoMarginCount"in V._fullLayout)return!1;var Y=s.list(V,"",!0);for(var ee in Y)if(Y[ee].autoshift||Y[ee].shift)return!0;return!1}w.doAutoMargin=function(V){var Y=V._fullLayout,ee=Y.width,q=Y.height;Y._size||(Y._size={}),F(Y);var oe=Y._size,ae=Y.margin,j={t:0,b:0,l:0,r:0},Q=a.extendFlat({},oe),re=ae.l,ce=ae.r,be=ae.t,Ae=ae.b,De=Y._pushmargin,ze=Y._pushmarginIds,Ze=Y.minreducedwidth,at=Y.minreducedheight;if(ae.autoexpand!==!1){for(var nt in De)ze[nt]||delete De[nt];var rt=V._fullLayout._reservedMargin;for(var st in rt)for(var Me in rt[st]){var ye=rt[st][Me];j[Me]=Math.max(j[Me],ye)}De.base={l:{val:0,size:re},r:{val:1,size:ce},t:{val:1,size:be},b:{val:0,size:Ae}};for(var he in j){var Oe=0;for(var tt in De)tt!=="base"&&E(De[tt][he].size)&&(Oe=De[tt][he].size>Oe?De[tt][he].size:Oe);var ot=Math.max(0,ae[he]-Oe);j[he]=Math.max(0,j[he]-ot)}for(var Qe in De){var Pt=De[Qe].l||{},It=De[Qe].b||{},qt=Pt.val,Wt=Pt.size,kr=It.val,mr=It.size,qr=ee-j.r-j.l,Sr=q-j.t-j.b;for(var Rr in De){if(E(Wt)&&De[Rr].r){var wt=De[Rr].r.val,Ne=De[Rr].r.size;if(wt>qt){var Ke=(Wt*wt+(Ne-qr)*qt)/(wt-qt),Te=(Ne*(1-qt)+(Wt-qr)*(1-wt))/(wt-qt);Ke+Te>re+ce&&(re=Ke,ce=Te)}}if(E(mr)&&De[Rr].t){var Ie=De[Rr].t.val,Ve=De[Rr].t.size;if(Ie>kr){var Ce=(mr*Ie+(Ve-Sr)*kr)/(Ie-kr),Ee=(Ve*(1-kr)+(mr-Sr)*(1-Ie))/(Ie-kr);Ce+Ee>Ae+be&&(Ae=Ce,be=Ee)}}}}}var Pe=a.constrain(ee-ae.l-ae.r,N,Ze),ft=a.constrain(q-ae.t-ae.b,O,at),ct=Math.max(0,ee-Pe),_t=Math.max(0,q-ft);if(ct){var Ct=(re+ce)/ct;Ct>1&&(re/=Ct,ce/=Ct)}if(_t){var ir=(Ae+be)/_t;ir>1&&(Ae/=ir,be/=ir)}if(oe.l=Math.round(re)+j.l,oe.r=Math.round(ce)+j.r,oe.t=Math.round(be)+j.t,oe.b=Math.round(Ae)+j.b,oe.p=Math.round(ae.pad),oe.w=Math.round(ee)-oe.l-oe.r,oe.h=Math.round(q)-oe.t-oe.b,!Y._replotting&&(w.didMarginChange(Q,oe)||P(V))){"_redrawFromAutoMarginCount"in Y?Y._redrawFromAutoMarginCount++:Y._redrawFromAutoMarginCount=1;var rr=3*(1+Object.keys(ze).length);if(Y._redrawFromAutoMarginCount1)return!0}return!1},w.graphJson=function(V,Y,ee,q,oe,ae){(oe&&Y&&!V._fullData||oe&&!Y&&!V._fullLayout)&&w.supplyDefaults(V);var j=oe?V._fullData:V.data,Q=oe?V._fullLayout:V.layout,re=(V._transitionData||{})._frames;function ce(De,ze){if(typeof De=="function")return ze?"_function_":null;if(a.isPlainObject(De)){var Ze={},at;return Object.keys(De).sort().forEach(function(Me){if(["_","["].indexOf(Me.charAt(0))===-1){if(typeof De[Me]=="function"){ze&&(Ze[Me]="_function");return}if(ee==="keepdata"){if(Me.slice(-3)==="src")return}else if(ee==="keepstream"){if(at=De[Me+"src"],typeof at=="string"&&at.indexOf(":")>0&&!a.isPlainObject(De.stream))return}else if(ee!=="keepall"&&(at=De[Me+"src"],typeof at=="string"&&at.indexOf(":")>0))return;Ze[Me]=ce(De[Me],ze)}}),Ze}var nt=Array.isArray(De),rt=a.isTypedArray(De);if((nt||rt)&&De.dtype&&De.shape){var st=De.bdata;return ce({dtype:De.dtype,shape:De.shape,bdata:a.isArrayBuffer(st)?e.encode(st):st},ze)}return nt?De.map(function(Me){return ce(Me,ze)}):rt?a.simpleMap(De,a.identity):a.isJSDate(De)?a.ms2DateTimeLocal(+De):De}var be={data:(j||[]).map(function(De){var ze=ce(De);return Y&&delete ze.fit,ze})};if(!Y&&(be.layout=ce(Q),oe)){var Ae=Q._size;be.layout.computed={margin:{b:Ae.b,l:Ae.l,r:Ae.r,t:Ae.t}}}return re&&(be.frames=ce(re)),ae&&(be.config=ce(V._context,!0)),q==="object"?be:JSON.stringify(be)},w.modifyFrames=function(V,Y){var ee,q,oe,ae=V._transitionData._frames,j=V._transitionData._frameHash;for(ee=0;ee0&&(V._transitioningWithDuration=!0),V._transitionData._interruptCallbacks.push(function(){q=!0}),ee.redraw&&V._transitionData._interruptCallbacks.push(function(){return t.call("redraw",V)}),V._transitionData._interruptCallbacks.push(function(){V.emit("plotly_transitioninterrupted",[])});var De=0,ze=0;function Ze(){return De++,function(){ze++,!q&&ze===De&&Q(Ae)}}ee.runFn(Ze),setTimeout(Ze())})}function Q(Ae){if(V._transitionData)return ae(V._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(ee.redraw)return t.call("redraw",V)}).then(function(){V._transitioning=!1,V._transitioningWithDuration=!1,V.emit("plotly_transitioned",[])}).then(Ae)}function re(){if(V._transitionData)return V._transitioning=!1,oe(V._transitionData._interruptCallbacks)}var ce=[w.previousPromises,re,ee.prepareFn,w.rehover,w.reselect,j],be=a.syncOrAsync(ce,V);return(!be||!be.then)&&(be=Promise.resolve()),be.then(function(){return V})}w.doCalcdata=function(V,Y){var ee=s.list(V),q=V._fullData,oe=V._fullLayout,ae,j,Q,re,ce=new Array(q.length),be=(V.calcdata||[]).slice();for(V.calcdata=ce,oe._numBoxes=0,oe._numViolins=0,oe._violinScaleGroupStats={},V._hmpixcount=0,V._hmlumcount=0,oe._piecolormap={},oe._sunburstcolormap={},oe._treemapcolormap={},oe._iciclecolormap={},oe._funnelareacolormap={},Q=0;Q=0;re--)if(he[re].enabled){ae._indexToPoints=he[re]._indexToPoints;break}j&&j.calc&&(ye=j.calc(V,ae))}(!Array.isArray(ye)||!ye[0])&&(ye=[{x:i,y:i}]),ye[0].t||(ye[0].t={}),ye[0].trace=ae,ce[st]=ye}}for(le(ee,q,oe),Q=0;QQ||ze>re)&&(ae.style("overflow","hidden"),Ae=ae.node().getBoundingClientRect(),De=Ae.width,ze=Ae.height);var Ze=+O.attr("x"),at=+O.attr("y"),nt=V||O.node().getBoundingClientRect().height,rt=-nt/4;if(se[0]==="y")j.attr({transform:"rotate("+[-90,Ze,at]+")"+x(-De/2,rt-ze/2)});else if(se[0]==="l")at=rt-ze/2;else if(se[0]==="a"&&se.indexOf("atitle")!==0)Ze=0,at=rt;else{var st=O.attr("text-anchor");Ze=Ze-De*(st==="middle"?.5:st==="end"?1:0),at=at+rt-ze/2}ae.attr({x:Ze,y:at}),U&&U.call(O,j),fe(j)})})):le(),O};var t=/(<|<|<)/g,r=/(>|>|>)/g;function o(O){return O.replace(t,"\\lt ").replace(r,"\\gt ")}var a=[["$","$"],["\\(","\\)"]];function n(O,P,U){var B=parseInt((MathJax.version||"").split(".")[0]);if(B!==2&&B!==3){v.warn("No MathJax version:",MathJax.version);return}var X,$,se,le,fe=function(){return $=v.extendDeepAll({},MathJax.Hub.config),se=MathJax.Hub.processSectionDelay,MathJax.Hub.processSectionDelay!==void 0&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:a},displayAlign:"left"})},V=function(){$=v.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=a},Y=function(){if(X=MathJax.Hub.config.menuSettings.renderer,X!=="SVG")return MathJax.Hub.setRenderer("SVG")},ee=function(){X=MathJax.config.startup.output,X!=="svg"&&(MathJax.config.startup.output="svg")},q=function(){var ce="math-output-"+v.randstr({},64);le=G.select("body").append("div").attr({id:ce}).style({visibility:"hidden",position:"absolute","font-size":P.fontSize+"px"}).text(o(O));var be=le.node();return B===2?MathJax.Hub.Typeset(be):MathJax.typeset([be])},oe=function(){var ce=le.select(B===2?".MathJax_SVG":".MathJax"),be=!ce.empty()&&le.select("svg").node();if(!be)v.log("There was an error in the tex syntax.",O),U();else{var Ae=be.getBoundingClientRect(),De;B===2?De=G.select("body").select("#MathJax_SVG_glyphs"):De=ce.select("defs"),U(ce,De,Ae)}le.remove()},ae=function(){if(X!=="SVG")return MathJax.Hub.setRenderer(X)},j=function(){X!=="svg"&&(MathJax.config.startup.output=X)},Q=function(){return se!==void 0&&(MathJax.Hub.processSectionDelay=se),MathJax.Hub.Config($)},re=function(){MathJax.config=$};B===2?MathJax.Hub.Queue(fe,Y,q,oe,ae,Q):B===3&&(V(),ee(),MathJax.startup.defaultReady(),MathJax.startup.promise.then(function(){q(),oe(),j(),re()}))}var i={sup:"font-size:70%",sub:"font-size:70%",s:"text-decoration:line-through",u:"text-decoration:underline",b:"font-weight:bold",i:"font-style:italic",a:"cursor:pointer",span:"",em:"font-style:italic;font-weight:bold"},s={sub:"0.3em",sup:"-0.6em"},h={sub:"-0.21em",sup:"0.42em"},c="\u200B",m=["http:","https:","mailto:","",void 0,":"],p=Z.NEWLINES=/(\r\n?|\n)/g,T=/(<[^<>]*>)/,l=/<(\/?)([^ >]*)(\s+(.*))?>/i,_=//i;Z.BR_TAG_ALL=//gi;var w=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,A=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,M=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,g=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function b(O,P){if(!O)return null;var U=O.match(P),B=U&&(U[3]||U[4]);return B&&f(B)}var d=/(^|;)\s*color:/;Z.plainText=function(O,P){P=P||{};for(var U=P.len!==void 0&&P.len!==-1?P.len:1/0,B=P.allowedTags!==void 0?P.allowedTags:["br"],X="...",$=X.length,se=O.split(T),le=[],fe="",V=0,Y=0;Y$?le.push(ee.slice(0,Math.max(0,j-$))+X):le.push(ee.slice(0,j));break}fe=""}}return le.join("")};var u={mu:"\u03BC",amp:"&",lt:"<",gt:">",nbsp:"\xA0",times:"\xD7",plusmn:"\xB1",deg:"\xB0"},y=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function f(O){return O.replace(y,function(P,U){var B;return U.charAt(0)==="#"?B=R(U.charAt(1)==="x"?parseInt(U.slice(2),16):parseInt(U.slice(1),10)):B=u[U],B||P})}Z.convertEntities=f;function R(O){if(!(O>1114111)){var P=String.fromCodePoint;if(P)return P(O);var U=String.fromCharCode;return O<=65535?U(O):U((O>>10)+55232,O%1024+56320)}}function L(O,P){P=P.replace(p," ");var U=!1,B=[],X,$=-1;function se(){$++;var ze=document.createElementNS(S.svg,"tspan");G.select(ze).attr({class:"line",dy:$*E+"em"}),O.appendChild(ze),X=ze;var Ze=B;if(B=[{node:ze}],Ze.length>1)for(var at=1;at.",P);return}var Ze=B.pop();ze!==Ze.type&&v.log("Start tag <"+Ze.type+"> doesnt match end tag <"+ze+">. Pretending it did match.",P),X=B[B.length-1].node}var Y=_.test(P);Y?se():(X=O,B=[{node:O}]);for(var ee=P.split(T),q=0;q=0;_--,w++){var A=p[_];l[w]=[1-A[0],A[1]]}return l}function h(p,T){T=T||{};for(var l=p.domain,_=p.range,w=_.length,A=new Array(w),M=0;Mp-c?c=p-(m-p):m-p=0?_=o.colorscale.sequential:_=o.colorscale.sequentialminus,s._sync("colorscale",_)}}}}),rc=Xe({"src/components/colorscale/index.js"(Z,G){"use strict";var v=W0(),x=wp();G.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:x.hasColorscale,extractOpts:x.extractOpts,extractScale:x.extractScale,flipScale:x.flipScale,makeColorScaleFunc:x.makeColorScaleFunc,makeColorScaleFuncFromTrace:x.makeColorScaleFuncFromTrace}}}),Fu=Xe({"src/traces/scatter/subtypes.js"(Z,G){"use strict";var v=sa(),x=bp().isTypedArraySpec;G.exports={hasLines:function(S){return S.visible&&S.mode&&S.mode.indexOf("lines")!==-1},hasMarkers:function(S){return S.visible&&(S.mode&&S.mode.indexOf("markers")!==-1||S.type==="splom")},hasText:function(S){return S.visible&&S.mode&&S.mode.indexOf("text")!==-1},isBubble:function(S){var E=S.marker;return v.isPlainObject(E)&&(v.isArrayOrTypedArray(E.size)||x(E.size))}}}}),r1=Xe({"src/traces/scatter/make_bubble_size_func.js"(Z,G){"use strict";var v=rs();G.exports=function(S,E){E||(E=2);var e=S.marker,t=e.sizeref||1,r=e.sizemin||0,o=e.sizemode==="area"?function(a){return Math.sqrt(a/t)}:function(a){return a/t};return function(a){var n=o(a/E);return v(n)&&n>0?Math.max(n,r):0}}}}),$p=Xe({"src/components/fx/helpers.js"(Z){"use strict";var G=sa();Z.getSubplot=function(t){return t.subplot||t.xaxis+t.yaxis||t.geo},Z.isTraceInSubplots=function(t,r){if(t.type==="splom"){for(var o=t.xaxes||[],a=t.yaxes||[],n=0;n=0&&o.index2&&(r.push([a].concat(n.splice(0,2))),i="l",a=a=="m"?"l":"L");;){if(n.length==v[i])return n.unshift(a),r.push(n);if(n.length0&&(ye=100,Me=Me.replace("-open","")),Me.indexOf("-dot")>0&&(ye+=200,Me=Me.replace("-dot","")),Me=l.symbolNames.indexOf(Me),Me>=0&&(Me+=ye)}return Me%100>=d||Me>=400?0:Math.floor(Math.max(Me,0))};function y(Me,ye,he,Oe){var tt=Me%100;return l.symbolFuncs[tt](ye,he,Oe)+(Me>=200?u:"")}var f=S("~f"),R={radial:{type:"radial"},radialreversed:{type:"radial",reversed:!0},horizontal:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0}},horizontalreversed:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0},reversed:!0},vertical:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0}},verticalreversed:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0},reversed:!0}};l.gradient=function(Me,ye,he,Oe,tt,ot){var Qe=R[Oe];return L(Me,ye,he,Qe.type,tt,ot,Qe.start,Qe.stop,!1,Qe.reversed)};function L(Me,ye,he,Oe,tt,ot,Qe,Pt,It,qt){var Wt=tt.length,kr;Oe==="linear"?kr={node:"linearGradient",attrs:{x1:Qe.x,y1:Qe.y,x2:Pt.x,y2:Pt.y,gradientUnits:It?"userSpaceOnUse":"objectBoundingBox"},reversed:qt}:Oe==="radial"&&(kr={node:"radialGradient",reversed:qt});for(var mr=new Array(Wt),qr=0;qr=0&&Me.i===void 0&&(Me.i=ot.i),ye.style("opacity",Oe.selectedOpacityFn?Oe.selectedOpacityFn(Me):Me.mo===void 0?Qe.opacity:Me.mo),Oe.ms2mrc){var It;Me.ms==="various"||Qe.size==="various"?It=3:It=Oe.ms2mrc(Me.ms),Me.mrc=It,Oe.selectedSizeFn&&(It=Me.mrc=Oe.selectedSizeFn(Me));var qt=l.symbolNumber(Me.mx||Qe.symbol)||0;Me.om=qt%200>=100;var Wt=st(Me,he),kr=Q(Me,he);ye.attr("d",y(qt,It,Wt,kr))}var mr=!1,qr,Sr,Rr;if(Me.so)Rr=Pt.outlierwidth,Sr=Pt.outliercolor,qr=Qe.outliercolor;else{var wt=(Pt||{}).width;Rr=(Me.mlw+1||wt+1||(Me.trace?(Me.trace.marker.line||{}).width:0)+1)-1||0,"mlc"in Me?Sr=Me.mlcc=Oe.lineScale(Me.mlc):x.isArrayOrTypedArray(Pt.color)?Sr=r.defaultLine:Sr=Pt.color,x.isArrayOrTypedArray(Qe.color)&&(qr=r.defaultLine,mr=!0),"mc"in Me?qr=Me.mcc=Oe.markerScale(Me.mc):qr=Qe.color||Qe.colors||"rgba(0,0,0,0)",Oe.selectedColorFn&&(qr=Oe.selectedColorFn(Me))}let Ne=Me.mld||(Pt||{}).dash;if(Ne&&l.dashLine(ye,Ne,Rr),Me.om)ye.call(r.stroke,qr).style({"stroke-width":(Rr||1)+"px",fill:"none"});else{ye.style("stroke-width",(Me.isBlank?0:Rr)+"px");var Ke=Qe.gradient,Te=Me.mgt;Te?mr=!0:Te=Ke&&Ke.type,x.isArrayOrTypedArray(Te)&&(Te=Te[0],R[Te]||(Te=0));var Ie=Qe.pattern,Ve=l.getPatternAttr,Ce=Ie&&(Ve(Ie.shape,Me.i,"")||Ve(Ie.path,Me.i,""));if(Te&&Te!=="none"){var Ee=Me.mgc;Ee?mr=!0:Ee=Ke.color;var Pe=he.uid;mr&&(Pe+="-"+Me.i),l.gradient(ye,tt,Pe,Te,[[0,Ee],[1,qr]],"fill")}else if(Ce){var ft=!1,ct=Ie.fgcolor;!ct&&ot&&ot.color&&(ct=ot.color,ft=!0);var _t=Ve(ct,Me.i,ot&&ot.color||null),Ct=Ve(Ie.bgcolor,Me.i,null),ir=Ie.fgopacity,rr=Ve(Ie.size,Me.i,8),er=Ve(Ie.solidity,Me.i,.3);ft=ft||Me.mcc||x.isArrayOrTypedArray(Ie.shape)||x.isArrayOrTypedArray(Ie.path)||x.isArrayOrTypedArray(Ie.bgcolor)||x.isArrayOrTypedArray(Ie.fgcolor)||x.isArrayOrTypedArray(Ie.size)||x.isArrayOrTypedArray(Ie.solidity);var Lr=he.uid;ft&&(Lr+="-"+Me.i),l.pattern(ye,"point",tt,Lr,Ce,rr,er,Me.mcc,Ie.fillmode,Ct,_t,ir)}else x.isArrayOrTypedArray(qr)?r.fill(ye,qr[Me.i]):r.fill(ye,qr);Rr&&r.stroke(ye,Sr)}},l.makePointStyleFns=function(Me){var ye={},he=Me.marker;return ye.markerScale=l.tryColorscale(he,""),ye.lineScale=l.tryColorscale(he,"line"),t.traceIs(Me,"symbols")&&(ye.ms2mrc=m.isBubble(Me)?p(Me):function(){return(he.size||6)/2}),Me.selectedpoints&&x.extendFlat(ye,l.makeSelectedPointStyleFns(Me)),ye},l.makeSelectedPointStyleFns=function(Me){var ye={},he=Me.selected||{},Oe=Me.unselected||{},tt=Me.marker||{},ot=he.marker||{},Qe=Oe.marker||{},Pt=tt.opacity,It=ot.opacity,qt=Qe.opacity,Wt=It!==void 0,kr=qt!==void 0;(x.isArrayOrTypedArray(Pt)||Wt||kr)&&(ye.selectedOpacityFn=function(Ie){var Ve=Ie.mo===void 0?tt.opacity:Ie.mo;return Ie.selected?Wt?It:Ve:kr?qt:c*Ve});var mr=tt.color,qr=ot.color,Sr=Qe.color;(qr||Sr)&&(ye.selectedColorFn=function(Ie){var Ve=Ie.mcc||mr;return Ie.selected?qr||Ve:Sr||Ve});var Rr=tt.size,wt=ot.size,Ne=Qe.size,Ke=wt!==void 0,Te=Ne!==void 0;return t.traceIs(Me,"symbols")&&(Ke||Te)&&(ye.selectedSizeFn=function(Ie){var Ve=Ie.mrc||Rr/2;return Ie.selected?Ke?wt/2:Ve:Te?Ne/2:Ve}),ye},l.makeSelectedTextStyleFns=function(Me){var ye={},he=Me.selected||{},Oe=Me.unselected||{},tt=Me.textfont||{},ot=he.textfont||{},Qe=Oe.textfont||{},Pt=tt.color,It=ot.color,qt=Qe.color;return ye.selectedTextColorFn=function(Wt){var kr=Wt.tc||Pt;return Wt.selected?It||kr:qt||(It?kr:r.addOpacity(kr,c))},ye},l.selectedPointStyle=function(Me,ye){if(!(!Me.size()||!ye.selectedpoints)){var he=l.makeSelectedPointStyleFns(ye),Oe=ye.marker||{},tt=[];he.selectedOpacityFn&&tt.push(function(ot,Qe){ot.style("opacity",he.selectedOpacityFn(Qe))}),he.selectedColorFn&&tt.push(function(ot,Qe){r.fill(ot,he.selectedColorFn(Qe))}),he.selectedSizeFn&&tt.push(function(ot,Qe){var Pt=Qe.mx||Oe.symbol||0,It=he.selectedSizeFn(Qe);ot.attr("d",y(l.symbolNumber(Pt),It,st(Qe,ye),Q(Qe,ye))),Qe.mrc2=It}),tt.length&&Me.each(function(ot){for(var Qe=v.select(this),Pt=0;Pt0?he:0}l.textPointStyle=function(Me,ye,he){if(Me.size()){var Oe;if(ye.selectedpoints){var tt=l.makeSelectedTextStyleFns(ye);Oe=tt.selectedTextColorFn}var ot=ye.texttemplate,Qe=he._fullLayout;Me.each(function(Pt){var It=v.select(this),qt=ot?x.extractOption(Pt,ye,"txt","texttemplate"):x.extractOption(Pt,ye,"tx","text");if(!qt&&qt!==0){It.remove();return}if(ot){var Wt=ye._module.formatLabels,kr=Wt?Wt(Pt,ye,Qe):{},mr={};T(mr,ye,Pt.i),qt=x.texttemplateString({data:[mr,Pt,ye._meta],fallback:ye.texttemplatefallback,labels:kr,locale:Qe._d3locale,template:qt})}var qr=Pt.tp||ye.textposition,Sr=N(Pt,ye),Rr=Oe?Oe(Pt):Pt.tc||ye.textfont.color;It.call(l.font,{family:Pt.tf||ye.textfont.family,weight:Pt.tw||ye.textfont.weight,style:Pt.ty||ye.textfont.style,variant:Pt.tv||ye.textfont.variant,textcase:Pt.tC||ye.textfont.textcase,lineposition:Pt.tE||ye.textfont.lineposition,shadow:Pt.tS||ye.textfont.shadow,size:Sr,color:Rr}).text(qt).call(n.convertToTspans,he).call(F,qr,Sr,Pt.mrc)})}},l.selectedTextStyle=function(Me,ye){if(!(!Me.size()||!ye.selectedpoints)){var he=l.makeSelectedTextStyleFns(ye);Me.each(function(Oe){var tt=v.select(this),ot=he.selectedTextColorFn(Oe),Qe=Oe.tp||ye.textposition,Pt=N(Oe,ye);r.fill(tt,ot);var It=t.traceIs(ye,"bar-like");F(tt,Qe,Pt,Oe.mrc2||Oe.mrc,It)})}};var O=.5;l.smoothopen=function(Me,ye){if(Me.length<3)return"M"+Me.join("L");var he="M"+Me[0],Oe=[],tt;for(tt=1;tt=It||Ie>=Wt&&Ie<=It)&&(Ve<=kr&&Ve>=qt||Ve>=kr&&Ve<=qt)&&(Me=[Ie,Ve])}return Me}l.applyBackoff=V,l.makeTester=function(){var Me=x.ensureSingleById(v.select("body"),"svg","js-plotly-tester",function(he){he.attr(i.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),ye=x.ensureSingle(Me,"path","js-reference-point",function(he){he.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});l.tester=Me,l.testref=ye},l.savedBBoxes={};var Y=0,ee=1e4;l.bBox=function(Me,ye,he){he||(he=q(Me));var Oe;if(he){if(Oe=l.savedBBoxes[he],Oe)return x.extendFlat({},Oe)}else if(Me.childNodes.length===1){var tt=Me.childNodes[0];if(he=q(tt),he){var ot=+tt.getAttribute("x")||0,Qe=+tt.getAttribute("y")||0,Pt=tt.getAttribute("transform");if(!Pt){var It=l.bBox(tt,!1,he);return ot&&(It.left+=ot,It.right+=ot),Qe&&(It.top+=Qe,It.bottom+=Qe),It}if(he+="~"+ot+"~"+Qe+"~"+Pt,Oe=l.savedBBoxes[he],Oe)return x.extendFlat({},Oe)}}var qt,Wt;ye?qt=Me:(Wt=l.tester.node(),qt=Me.cloneNode(!0),Wt.appendChild(qt)),v.select(qt).attr("transform",null).call(n.positionText,0,0);var kr=qt.getBoundingClientRect(),mr=l.testref.node().getBoundingClientRect();ye||Wt.removeChild(qt);var qr={height:kr.height,width:kr.width,left:kr.left-mr.left,top:kr.top-mr.top,right:kr.right-mr.left,bottom:kr.bottom-mr.top};return Y>=ee&&(l.savedBBoxes={},Y=0),he&&(l.savedBBoxes[he]=qr),Y++,x.extendFlat({},qr)};function q(Me){var ye=Me.getAttribute("data-unformatted");if(ye!==null)return ye+Me.getAttribute("data-math")+Me.getAttribute("text-anchor")+Me.getAttribute("style")}l.setClipUrl=function(Me,ye,he){Me.attr("clip-path",oe(ye,he))};function oe(Me,ye){if(!Me)return null;var he=ye._context,Oe=he._exportedPlot?"":he._baseUrl||"";return Oe?"url('"+Oe+"#"+Me+"')":"url(#"+Me+")"}l.getTranslate=function(Me){var ye=/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,he=Me.attr?"attr":"getAttribute",Oe=Me[he]("transform")||"",tt=Oe.replace(ye,function(ot,Qe,Pt){return[Qe,Pt].join(" ")}).split(" ");return{x:+tt[0]||0,y:+tt[1]||0}},l.setTranslate=function(Me,ye,he){var Oe=/(\btranslate\(.*?\);?)/,tt=Me.attr?"attr":"getAttribute",ot=Me.attr?"attr":"setAttribute",Qe=Me[tt]("transform")||"";return ye=ye||0,he=he||0,Qe=Qe.replace(Oe,"").trim(),Qe+=a(ye,he),Qe=Qe.trim(),Me[ot]("transform",Qe),Qe},l.getScale=function(Me){var ye=/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,he=Me.attr?"attr":"getAttribute",Oe=Me[he]("transform")||"",tt=Oe.replace(ye,function(ot,Qe,Pt){return[Qe,Pt].join(" ")}).split(" ");return{x:+tt[0]||1,y:+tt[1]||1}},l.setScale=function(Me,ye,he){var Oe=/(\bscale\(.*?\);?)/,tt=Me.attr?"attr":"getAttribute",ot=Me.attr?"attr":"setAttribute",Qe=Me[tt]("transform")||"";return ye=ye||1,he=he||1,Qe=Qe.replace(Oe,"").trim(),Qe+="scale("+ye+","+he+")",Qe=Qe.trim(),Me[ot]("transform",Qe),Qe};var ae=/\s*sc.*/;l.setPointGroupScale=function(Me,ye,he){if(ye=ye||1,he=he||1,!!Me){var Oe=ye===1&&he===1?"":"scale("+ye+","+he+")";Me.each(function(){var tt=(this.getAttribute("transform")||"").replace(ae,"");tt+=Oe,tt=tt.trim(),this.setAttribute("transform",tt)})}};var j=/translate\([^)]*\)\s*$/;l.setTextPointsScale=function(Me,ye,he){Me&&Me.each(function(){var Oe,tt=v.select(this),ot=tt.select("text");if(ot.node()){var Qe=parseFloat(ot.attr("x")||0),Pt=parseFloat(ot.attr("y")||0),It=(tt.attr("transform")||"").match(j);ye===1&&he===1?Oe=[]:Oe=[a(Qe,Pt),"scale("+ye+","+he+")",a(-Qe,-Pt)],It&&Oe.push(It),tt.attr("transform",Oe.join(""))}})};function Q(Me,ye){var he;return Me&&(he=Me.mf),he===void 0&&(he=ye.marker&&ye.marker.standoff||0),!ye._geo&&!ye._xA?-he:he}l.getMarkerStandoff=Q;var re=Math.atan2,ce=Math.cos,be=Math.sin;function Ae(Me,ye){var he=ye[0],Oe=ye[1];return[he*ce(Me)-Oe*be(Me),he*be(Me)+Oe*ce(Me)]}var De,ze,Ze,at,nt,rt;function st(Me,ye){var he=Me.ma;he===void 0&&(he=ye.marker.angle,(!he||x.isArrayOrTypedArray(he))&&(he=0));var Oe,tt,ot=ye.marker.angleref;if(ot==="previous"||ot==="north"){if(ye._geo){var Qe=ye._geo.project(Me.lonlat);Oe=Qe[0],tt=Qe[1]}else{var Pt=ye._xA,It=ye._yA;if(Pt&&It)Oe=Pt.c2p(Me.x),tt=It.c2p(Me.y);else return 90}if(ye._geo){var qt=Me.lonlat[0],Wt=Me.lonlat[1],kr=ye._geo.project([qt,Wt+1e-5]),mr=ye._geo.project([qt+1e-5,Wt]),qr=re(mr[1]-tt,mr[0]-Oe),Sr=re(kr[1]-tt,kr[0]-Oe),Rr;if(ot==="north")Rr=he/180*Math.PI;else if(ot==="previous"){var wt=qt/180*Math.PI,Ne=Wt/180*Math.PI,Ke=De/180*Math.PI,Te=ze/180*Math.PI,Ie=Ke-wt,Ve=ce(Te)*be(Ie),Ce=be(Te)*ce(Ne)-ce(Te)*be(Ne)*ce(Ie);Rr=-re(Ve,Ce)-Math.PI,De=qt,ze=Wt}var Ee=Ae(qr,[ce(Rr),0]),Pe=Ae(Sr,[be(Rr),0]);he=re(Ee[1]+Pe[1],Ee[0]+Pe[0])/Math.PI*180,ot==="previous"&&!(rt===ye.uid&&Me.i===nt+1)&&(he=null)}if(ot==="previous"&&!ye._geo)if(rt===ye.uid&&Me.i===nt+1&&E(Oe)&&E(tt)){var ft=Oe-Ze,ct=tt-at,_t=ye.line&&ye.line.shape||"",Ct=_t.slice(_t.length-1);Ct==="h"&&(ct=0),Ct==="v"&&(ft=0),he+=re(ct,ft)/Math.PI*180+90}else he=null}return Ze=Oe,at=tt,nt=Me.i,rt=ye.uid,he}l.getMarkerAngle=st}}),K0=Xe({"src/components/titles/index.js"(Z,G){"use strict";var v=Hn(),x=rs(),S=bc(),E=so(),e=sa(),t=e.strTranslate,r=es(),o=$n(),a=ou(),n=Ym(),i=uh().OPPOSITE_SIDE,s=/ [XY][0-9]* /,h=1.6,c=1.6;function m(p,T,l){var _=p._fullLayout,w=l.propContainer,A=l.propName,M=l.placeholder,g=l.traceIndex,b=l.avoid||{},d=l.attributes,u=l.transform,y=l.containerGroup,f=1,R=w.title,L=(R&&R.text?R.text:"").trim(),z=!1,F=R&&R.font?R.font:{},N=F.family,O=F.size,P=F.color,U=F.weight,B=F.style,X=F.variant,$=F.textcase,se=F.lineposition,le=F.shadow,fe=l.subtitlePropName,V=!!fe,Y=l.subtitlePlaceholder,ee=(w.title||{}).subtitle||{text:"",font:{}},q=(ee.text||"").trim(),oe=!1,ae=1,j=ee.font,Q=j.family,re=j.size,ce=j.color,be=j.weight,Ae=j.style,De=j.variant,ze=j.textcase,Ze=j.lineposition,at=j.shadow,nt;A==="title.text"?nt="titleText":A.indexOf("axis")!==-1?nt="axisTitleText":A.indexOf("colorbar")!==-1&&(nt="colorbarTitleText");var rt=p._context.edits[nt];function st(mr,qr){return mr===void 0||qr===void 0?!1:mr.replace(s," % ")===qr.replace(s," % ")}L===""?f=0:st(L,M)&&(rt||(L=""),f=.2,z=!0),V&&(q===""?ae=0:st(q,Y)&&(rt||(q=""),ae=.2,oe=!0)),l._meta?L=e.templateString(L,l._meta):_._meta&&(L=e.templateString(L,_._meta));var Me=L||q||rt,ye;y||(y=e.ensureSingle(_._infolayer,"g","g-"+T),ye=_._hColorbarMoveTitle);var he=y.selectAll("text."+T).data(Me?[0]:[]);he.enter().append("text"),he.text(L).attr("class",T),he.exit().remove();var Oe=null,tt=T+"-subtitle",ot=q||rt;if(V&&(Oe=y.selectAll("text."+tt).data(ot?[0]:[]),Oe.enter().append("text"),Oe.text(q).attr("class",tt),Oe.exit().remove()),!Me)return y;function Qe(mr,qr){e.syncOrAsync([Pt,It],{title:mr,subtitle:qr})}function Pt(mr){var qr=mr.title,Sr=mr.subtitle,Rr;!u&&ye&&(u={}),u?(Rr="",u.rotate&&(Rr+="rotate("+[u.rotate,d.x,d.y]+")"),(u.offset||ye)&&(Rr+=t(0,(u.offset||0)-(ye||0)))):Rr=null,qr.attr("transform",Rr);function wt(Ce){if(Ce){var Ee=v.select(Ce.node().parentNode).select("."+tt);if(!Ee.empty()){var Pe=Ce.node().getBBox();if(Pe.height){var ft=Pe.y+Pe.height+h*re;Ee.attr("y",ft)}}}}if(qr.style("opacity",f*o.opacity(P)).call(r.font,{color:o.rgb(P),size:v.round(O,2),family:N,weight:U,style:B,variant:X,textcase:$,shadow:le,lineposition:se}).attr(d).call(a.convertToTspans,p,wt),Sr&&!Sr.empty()){var Ne=y.select("."+T+"-math-group"),Ke=qr.node().getBBox(),Te=Ne.node()?Ne.node().getBBox():void 0,Ie=Te?Te.y+Te.height+h*re:Ke.y+Ke.height+c*re,Ve=e.extendFlat({},d,{y:Ie});Sr.attr("transform",Rr),Sr.style("opacity",ae*o.opacity(ce)).call(r.font,{color:o.rgb(ce),size:v.round(re,2),family:Q,weight:be,style:Ae,variant:De,textcase:ze,shadow:at,lineposition:Ze}).attr(Ve).call(a.convertToTspans,p)}return S.previousPromises(p)}function It(mr){var qr=mr.title,Sr=v.select(qr.node().parentNode);if(b&&b.selection&&b.side&&L){Sr.attr("transform",null);var Rr=i[b.side],wt=b.side==="left"||b.side==="top"?-1:1,Ne=x(b.pad)?b.pad:2,Ke=r.bBox(Sr.node()),Te={t:0,b:0,l:0,r:0},Ie=p._fullLayout._reservedMargin;for(var Ve in Ie)for(var Ce in Ie[Ve]){var Ee=Ie[Ve][Ce];Te[Ce]=Math.max(Te[Ce],Ee)}var Pe={left:Te.l,top:Te.t,right:_.width-Te.r,bottom:_.height-Te.b},ft=b.maxShift||wt*(Pe[b.side]-Ke[b.side]),ct=0;if(ft<0)ct=ft;else{var _t=b.offsetLeft||0,Ct=b.offsetTop||0;Ke.left-=_t,Ke.right-=_t,Ke.top-=Ct,Ke.bottom-=Ct,b.selection.each(function(){var rr=r.bBox(this);e.bBoxIntersect(Ke,rr,Ne)&&(ct=Math.max(ct,wt*(rr[b.side]-Ke[Rr])+Ne))}),ct=Math.min(ft,ct),w._titleScoot=Math.abs(ct)}if(ct>0||ft<0){var ir={left:[-ct,0],right:[ct,0],top:[0,-ct],bottom:[0,ct]}[b.side];Sr.attr("transform",t(ir[0],ir[1]))}}}he.call(Qe,Oe);function qt(mr,qr){mr.text(qr).on("mouseover.opacity",function(){v.select(this).transition().duration(n.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){v.select(this).transition().duration(n.HIDE_PLACEHOLDER).style("opacity",0)})}if(rt&&(L?he.on(".opacity",null):(qt(he,M),z=!0),he.call(a.makeEditable,{gd:p}).on("edit",function(mr){g!==void 0?E.call("_guiRestyle",p,A,mr,g):E.call("_guiRelayout",p,A,mr)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(Qe)}).on("input",function(mr){this.text(mr||" ").call(a.positionText,d.x,d.y)}),V)){if(V&&!L){var Wt=he.node().getBBox(),kr=Wt.y+Wt.height+c*re;Oe.attr("y",kr)}q?Oe.on(".opacity",null):(qt(Oe,Y),oe=!0),Oe.call(a.makeEditable,{gd:p}).on("edit",function(mr){E.call("_guiRelayout",p,"title.subtitle.text",mr)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(Qe)}).on("input",function(mr){this.text(mr||" ").call(a.positionText,Oe.attr("x"),Oe.attr("y"))})}return he.classed("js-placeholder",z),Oe&&!Oe.empty()&&Oe.classed("js-placeholder",oe),y}G.exports={draw:m,SUBTITLE_PADDING_EM:c,SUBTITLE_PADDING_MATHJAX_EM:h}}}),wv=Xe({"src/plots/cartesian/set_convert.js"(Z,G){"use strict";var v=Hn(),x=Xv().utcFormat,S=sa(),E=S.numberFormat,e=rs(),t=S.cleanNumber,r=S.ms2DateTime,o=S.dateTime2ms,a=S.ensureNumber,n=S.isArrayOrTypedArray,i=Hs(),s=i.FP_SAFE,h=i.BADNUM,c=i.LOG_CLIP,m=i.ONEWEEK,p=i.ONEDAY,T=i.ONEHOUR,l=i.ONEMIN,_=i.ONESEC,w=ef(),A=lh(),M=A.HOUR_PATTERN,g=A.WEEKDAY_PATTERN;function b(u){return Math.pow(10,u)}function d(u){return u!=null}G.exports=function(y,f){f=f||{};var R=y._id||"x",L=R.charAt(0);function z(q,oe){if(q>0)return Math.log(q)/Math.LN10;if(q<=0&&oe&&y.range&&y.range.length===2){var ae=y.range[0],j=y.range[1];return .5*(ae+j-2*c*Math.abs(ae-j))}else return h}function F(q,oe,ae,j){if((j||{}).msUTC&&e(q))return+q;var Q=o(q,ae||y.calendar);if(Q===h)if(e(q)){q=+q;var re=Math.floor(S.mod(q+.05,1)*10),ce=Math.round(q-re/10);Q=o(new Date(ce))+re/10}else return h;return Q}function N(q,oe,ae){return r(q,oe,ae||y.calendar)}function O(q){return y._categories[Math.round(q)]}function P(q){if(d(q)){if(y._categoriesMap===void 0&&(y._categoriesMap={}),y._categoriesMap[q]!==void 0)return y._categoriesMap[q];y._categories.push(typeof q=="number"?String(q):q);var oe=y._categories.length-1;return y._categoriesMap[q]=oe,oe}return h}function U(q,oe){for(var ae=new Array(oe),j=0;jy.range[1]&&(ae=!ae);for(var j=ae?-1:1,Q=j*q,re=0,ce=0;ceAe)re=ce+1;else{re=Q<(be+Ae)/2?ce:ce+1;break}}var De=y._B[re]||0;return isFinite(De)?se(q,y._m2,De):0},V=function(q){var oe=y._rangebreaks.length;if(!oe)return le(q,y._m,y._b);for(var ae=0,j=0;jy._rangebreaks[j].pmax&&(ae=j+1);return le(q,y._m2,y._B[ae])}}y.c2l=y.type==="log"?z:a,y.l2c=y.type==="log"?b:a,y.l2p=fe,y.p2l=V,y.c2p=y.type==="log"?function(q,oe){return fe(z(q,oe))}:fe,y.p2c=y.type==="log"?function(q){return b(V(q))}:V,["linear","-"].indexOf(y.type)!==-1?(y.d2r=y.r2d=y.d2c=y.r2c=y.d2l=y.r2l=t,y.c2d=y.c2r=y.l2d=y.l2r=a,y.d2p=y.r2p=function(q){return y.l2p(t(q))},y.p2d=y.p2r=V,y.cleanPos=a):y.type==="log"?(y.d2r=y.d2l=function(q,oe){return z(t(q),oe)},y.r2d=y.r2c=function(q){return b(t(q))},y.d2c=y.r2l=t,y.c2d=y.l2r=a,y.c2r=z,y.l2d=b,y.d2p=function(q,oe){return y.l2p(y.d2r(q,oe))},y.p2d=function(q){return b(V(q))},y.r2p=function(q){return y.l2p(t(q))},y.p2r=V,y.cleanPos=a):y.type==="date"?(y.d2r=y.r2d=S.identity,y.d2c=y.r2c=y.d2l=y.r2l=F,y.c2d=y.c2r=y.l2d=y.l2r=N,y.d2p=y.r2p=function(q,oe,ae){return y.l2p(F(q,0,ae))},y.p2d=y.p2r=function(q,oe,ae){return N(V(q),oe,ae)},y.cleanPos=function(q){return S.cleanDate(q,h,y.calendar)}):y.type==="category"?(y.d2c=y.d2l=P,y.r2d=y.c2d=y.l2d=O,y.d2r=y.d2l_noadd=X,y.r2c=function(q){var oe=$(q);return oe!==void 0?oe:y.fraction2r(.5)},y.l2r=y.c2r=a,y.r2l=$,y.d2p=function(q){return y.l2p(y.r2c(q))},y.p2d=function(q){return O(V(q))},y.r2p=y.d2p,y.p2r=V,y.cleanPos=function(q){return typeof q=="string"&&q!==""?q:a(q)}):y.type==="multicategory"&&(y.r2d=y.c2d=y.l2d=O,y.d2r=y.d2l_noadd=X,y.r2c=function(q){var oe=X(q);return oe!==void 0?oe:y.fraction2r(.5)},y.r2c_just_indices=B,y.l2r=y.c2r=a,y.r2l=X,y.d2p=function(q){return y.l2p(y.r2c(q))},y.p2d=function(q){return O(V(q))},y.r2p=y.d2p,y.p2r=V,y.cleanPos=function(q){return Array.isArray(q)||typeof q=="string"&&q!==""?q:a(q)},y.setupMultiCategory=function(q){var oe=y._traceIndices,ae,j,Q=y._matchGroup;if(Q&&y._categories.length===0){for(var re in Q)if(re!==R){var ce=f[w.id2name(re)];oe=oe.concat(ce._traceIndices)}}var be=[[0,{}],[0,{}]],Ae=[];for(ae=0;aece[1]&&(j[re?0:1]=ae),j[0]===j[1]){var be=y.l2r(oe),Ae=y.l2r(ae);if(oe!==void 0){var De=be+1;ae!==void 0&&(De=Math.min(De,Ae)),j[re?1:0]=De}if(ae!==void 0){var ze=Ae+1;oe!==void 0&&(ze=Math.max(ze,be)),j[re?0:1]=ze}}}},y.cleanRange=function(q,oe){y._cleanRange(q,oe),y.limitRange(q)},y._cleanRange=function(q,oe){oe||(oe={}),q||(q="range");var ae=S.nestedProperty(y,q).get(),j,Q;if(y.type==="date"?Q=S.dfltRange(y.calendar):L==="y"?Q=A.DFLTRANGEY:y._name==="realaxis"?Q=[0,1]:Q=oe.dfltRange||A.DFLTRANGEX,Q=Q.slice(),(y.rangemode==="tozero"||y.rangemode==="nonnegative")&&(Q[0]=0),!ae||ae.length!==2){S.nestedProperty(y,q).set(Q);return}var re=ae[0]===null,ce=ae[1]===null;for(y.type==="date"&&!y.autorange&&(ae[0]=S.cleanDate(ae[0],h,y.calendar),ae[1]=S.cleanDate(ae[1],h,y.calendar)),j=0;j<2;j++)if(y.type==="date"){if(!S.isDateTime(ae[j],y.calendar)){y[q]=Q;break}if(y.r2l(ae[0])===y.r2l(ae[1])){var be=S.constrain(y.r2l(ae[0]),S.MIN_MS+1e3,S.MAX_MS-1e3);ae[0]=y.l2r(be-1e3),ae[1]=y.l2r(be+1e3);break}}else{if(!e(ae[j]))if(!(re||ce)&&e(ae[1-j]))ae[j]=ae[1-j]*(j?10:.1);else{y[q]=Q;break}if(ae[j]<-s?ae[j]=-s:ae[j]>s&&(ae[j]=s),ae[0]===ae[1]){var Ae=Math.max(1,Math.abs(ae[0]*1e-6));ae[0]-=Ae,ae[1]+=Ae}}},y.setScale=function(q){var oe=f._size;if(y.overlaying){var ae=w.getFromId({_fullLayout:f},y.overlaying);y.domain=ae.domain}var j=q&&y._r?"_r":"range",Q=y.calendar;y.cleanRange(j);var re=y.r2l(y[j][0],Q),ce=y.r2l(y[j][1],Q),be=L==="y";if(be?(y._offset=oe.t+(1-y.domain[1])*oe.h,y._length=oe.h*(y.domain[1]-y.domain[0]),y._m=y._length/(re-ce),y._b=-y._m*ce):(y._offset=oe.l+y.domain[0]*oe.w,y._length=oe.w*(y.domain[1]-y.domain[0]),y._m=y._length/(ce-re),y._b=-y._m*re),y._rangebreaks=[],y._lBreaks=0,y._m2=0,y._B=[],y.rangebreaks){var Ae,De;if(y._rangebreaks=y.locateBreaks(Math.min(re,ce),Math.max(re,ce)),y._rangebreaks.length){for(Ae=0;Aece&&(ze=!ze),ze&&y._rangebreaks.reverse();var Ze=ze?-1:1;for(y._m2=Ze*y._length/(Math.abs(ce-re)-y._lBreaks),y._B.push(-y._m2*(be?ce:re)),Ae=0;AeQ&&(Q+=7,reQ&&(Q+=24,re=j&&re=j&&q=Qe.min&&(heQe.max&&(Qe.max=Oe),tt=!1)}tt&&ce.push({min:he,max:Oe})}};for(ae=0;ae_*2}function i(c){return Math.max(1,(c-1)/1e3)}function s(c,m){for(var p=c.length,T=i(p),l=0,_=0,w={},A=0;Al*2}function h(c){return E(c[0])&&E(c[1])}}}),Yd=Xe({"src/plots/cartesian/autorange.js"(Z,G){"use strict";var v=Hn(),x=rs(),S=sa(),E=Hs().FP_SAFE,e=so(),t=es(),r=ef(),o=r.getFromId,a=r.isLinked;G.exports={applyAutorangeOptions:y,getAutoRange:n,makePadFn:s,doAutoRange:p,findExtremes:T,concatExtremes:m};function n(f,R){var L,z,F=[],N=f._fullLayout,O=s(N,R,0),P=s(N,R,1),U=m(f,R),B=U.min,X=U.max;if(B.length===0||X.length===0)return S.simpleMap(R.range,R.r2l);var $=B[0].val,se=X[0].val;for(L=1;L0&&(Ae=oe-O(Q)-P(re),Ae>ae?De/Ae>j&&(ce=Q,be=re,j=De/Ae):De/oe>j&&(ce={val:Q.val,nopad:1},be={val:re.val,nopad:1},j=De/oe));function ze(st,Me){return Math.max(st,P(Me))}if($===se){var Ze=$-1,at=$+1;if(ee)if($===0)F=[0,1];else{var nt=($>0?X:B).reduce(ze,0),rt=$/(1-Math.min(.5,nt/oe));F=$>0?[0,rt]:[rt,0]}else q?F=[Math.max(0,Ze),Math.max(1,at)]:F=[Ze,at]}else ee?(ce.val>=0&&(ce={val:0,nopad:1}),be.val<=0&&(be={val:0,nopad:1})):q&&(ce.val-j*O(ce)<0&&(ce={val:0,nopad:1}),be.val<=0&&(be={val:1,nopad:1})),j=(be.val-ce.val-i(R,Q.val,re.val))/(oe-O(ce)-P(be)),F=[ce.val-j*O(ce),be.val+j*P(be)];return F=y(F,R),R.limitRange&&R.limitRange(),fe&&F.reverse(),S.simpleMap(F,R.l2r||Number)}function i(f,R,L){var z=0;if(f.rangebreaks)for(var F=f.locateBreaks(R,L),N=0;N0?L.ppadplus:L.ppadminus)||L.ppad||0),Q=ae((f._m>0?L.ppadminus:L.ppadplus)||L.ppad||0),re=ae(L.vpadplus||L.vpad),ce=ae(L.vpadminus||L.vpad);if(!B){if(q=1/0,oe=-1/0,U)for($=0;$0&&(q=se),se>oe&&se-E&&(q=se),se>oe&&se=De;$--)Ae($);return{min:z,max:F,opts:L}}function l(f,R,L,z){w(f,R,L,z,M)}function _(f,R,L,z){w(f,R,L,z,g)}function w(f,R,L,z,F){for(var N=z.tozero,O=z.extrapad,P=!0,U=0;U=L&&(B.extrapad||!O)){P=!1;break}else F(R,B.val)&&B.pad<=L&&(O||!B.extrapad)&&(f.splice(U,1),U--)}if(P){var X=N&&R===0;f.push({val:R,pad:X?0:L,extrapad:X?!1:O})}}function A(f){return x(f)&&Math.abs(f)=R}function b(f,R){var L=R.autorangeoptions;return L&&L.minallowed!==void 0&&u(R,L.minallowed,L.maxallowed)?L.minallowed:L&&L.clipmin!==void 0&&u(R,L.clipmin,L.clipmax)?Math.max(f,R.d2l(L.clipmin)):f}function d(f,R){var L=R.autorangeoptions;return L&&L.maxallowed!==void 0&&u(R,L.minallowed,L.maxallowed)?L.maxallowed:L&&L.clipmax!==void 0&&u(R,L.clipmin,L.clipmax)?Math.min(f,R.d2l(L.clipmax)):f}function u(f,R,L){return R!==void 0&&L!==void 0?(R=f.d2l(R),L=f.d2l(L),R=U&&(N=U,L=U),O<=U&&(O=U,z=U)}}return L=b(L,R),z=d(z,R),[L,z]}}}),Go=Xe({"src/plots/cartesian/axes.js"(Z,G){"use strict";var v=Hn(),x=rs(),S=bc(),E=so(),e=sa(),t=e.strTranslate,r=ou(),o=K0(),a=$n(),n=es(),i=Wh(),s=l5(),h=lh(),c=Hs(),m=c.ONEMAXYEAR,p=c.ONEAVGYEAR,T=c.ONEMINYEAR,l=c.ONEMAXQUARTER,_=c.ONEAVGQUARTER,w=c.ONEMINQUARTER,A=c.ONEMAXMONTH,M=c.ONEAVGMONTH,g=c.ONEMINMONTH,b=c.ONEWEEK,d=c.ONEDAY,u=d/2,y=c.ONEHOUR,f=c.ONEMIN,R=c.ONESEC,L=c.ONEMILLI,z=c.ONEMICROSEC,F=c.MINUS_SIGN,N=c.BADNUM,O={K:"zeroline"},P={K:"gridline",L:"path"},U={K:"minor-gridline",L:"path"},B={K:"tick",L:"path"},X={K:"tick",L:"text"},$={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},se=uh(),le=se.MID_SHIFT,fe=se.CAP_SHIFT,V=se.LINE_SPACING,Y=se.OPPOSITE_SIDE,ee=3,q=G.exports={};q.setConvert=wv();var oe=a1(),ae=ef(),j=ae.idSort,Q=ae.isLinked;q.id2name=ae.id2name,q.name2id=ae.name2id,q.cleanId=ae.cleanId,q.list=ae.list,q.listIds=ae.listIds,q.getFromId=ae.getFromId,q.getFromTrace=ae.getFromTrace;var re=Yd();q.getAutoRange=re.getAutoRange,q.findExtremes=re.findExtremes;var ce=1e-4;function be(Tt){var ut=(Tt[1]-Tt[0])*ce;return[Tt[0]-ut,Tt[1]+ut]}q.coerceRef=function(Tt,ut,Br,Cr,xr,Ir){var Ur=Cr.charAt(Cr.length-1),Hr=Br._fullLayout._subplots[Ur+"axis"],xt=Cr+"ref",Xt={};return xr||(xr=Hr[0]||(typeof Ir=="string"?Ir:Ir[0])),Ir||(Ir=xr),Hr=Hr.concat(Hr.map(function(vr){return vr+" domain"})),Xt[xt]={valType:"enumerated",values:Hr.concat(Ir?typeof Ir=="string"?[Ir]:Ir:[]),dflt:xr},e.coerce(Tt,ut,Xt,xt)},q.coerceRefArray=function(Tt,ut,Br,Cr,xr,Ir,Ur){let Hr=Cr.charAt(Cr.length-1);var xt=Br._fullLayout._subplots[Hr+"axis"];let Xt=Cr+"ref";var vr=Tt[Xt];xr||(xr=xt[0]||(typeof Ir=="string"?Ir:Ir[0])),xt=xt.concat(xt.map(ba=>ba+" domain")),xt=xt.concat(Ir||[]),vr.length>Ur?(e.warn("Array attribute "+Xt+" has more entries than expected, truncating to "+Ur),vr=vr.slice(0,Ur)):vr.length2e-6||((Br-Tt._forceTick0)/Tt._minDtick%1+1.000001)%1>2e-6)&&(Tt._minDtick=0))},q.saveRangeInitial=function(Tt,ut){for(var Br=q.list(Tt,"",!0),Cr=!1,xr=0;xrOr*.3||Xt(Cr)||Xt(xr))){var ba=Br.dtick/2;Tt+=Tt+baUr){var Hr=Number(Br.slice(1));Ir.exactYears>Ur&&Hr%12===0?Tt=q.tickIncrement(Tt,"M6","reverse")+d*1.5:Ir.exactMonths>Ur?Tt=q.tickIncrement(Tt,"M1","reverse")+d*15.5:Tt-=u;var xt=q.tickIncrement(Tt,Br);if(xt<=Cr)return xt}return Tt}q.prepMinorTicks=function(Tt,ut,Br){if(!ut.minor.dtick){delete Tt.dtick;var Cr=ut.dtick&&x(ut._tmin),xr;if(Cr){var Ir=q.tickIncrement(ut._tmin,ut.dtick,!0);xr=[ut._tmin,Ir*.99+ut._tmin*.01]}else{var Ur=e.simpleMap(ut.range,ut.r2l);xr=[Ur[0],.8*Ur[0]+.2*Ur[1]]}if(Tt.range=e.simpleMap(xr,ut.l2r),Tt._isMinor=!0,q.prepTicks(Tt,Br),Cr){var Hr=x(ut.dtick),xt=x(Tt.dtick),Xt=Hr?ut.dtick:+ut.dtick.substring(1),vr=xt?Tt.dtick:+Tt.dtick.substring(1);Hr&&xt?nt(Xt,vr)?Xt===2*b&&vr===2*d&&(Tt.dtick=b):Xt===2*b&&vr===3*d?Tt.dtick=b:Xt===b&&!(ut._input.minor||{}).nticks?Tt.dtick=d:rt(Xt/vr,2.5)?Tt.dtick=Xt/2:Tt.dtick=Xt:String(ut.dtick).charAt(0)==="M"?xt?Tt.dtick="M1":nt(Xt,vr)?Xt>=12&&vr===2&&(Tt.dtick="M3"):Tt.dtick=ut.dtick:String(Tt.dtick).charAt(0)==="L"?String(ut.dtick).charAt(0)==="L"?nt(Xt,vr)||(Tt.dtick=rt(Xt/vr,2.5)?ut.dtick/2:ut.dtick):Tt.dtick="D1":Tt.dtick==="D2"&&+ut.dtick>1&&(Tt.dtick=1)}Tt.range=ut.range}ut.minor._tick0Init===void 0&&(Tt.tick0=ut.tick0)};function nt(Tt,ut){return Math.abs((Tt/ut+.5)%1-.5)<.001}function rt(Tt,ut){return Math.abs(Tt/ut-1)<.001}q.prepTicks=function(Tt,ut){var Br=e.simpleMap(Tt.range,Tt.r2l,void 0,void 0,ut);if(Tt.tickmode==="auto"||!Tt.dtick){var Cr=Tt.nticks,xr;Cr||(Tt.type==="category"||Tt.type==="multicategory"?(xr=Tt.tickfont?e.bigFont(Tt.tickfont.size||12):15,Cr=Tt._length/xr):(xr=Tt._id.charAt(0)==="y"?40:80,Cr=e.constrain(Tt._length/xr,4,9)+1),Tt._name==="radialaxis"&&(Cr*=2)),Tt.minor&&Tt.minor.tickmode!=="array"||Tt.tickmode==="array"&&(Cr*=100),Tt._roughDTick=Math.abs(Br[1]-Br[0])/Cr,q.autoTicks(Tt,Tt._roughDTick),Tt._minDtick>0&&Tt.dtick0?(Ir=Cr-1,Ur=Cr):(Ir=Cr,Ur=Cr);var Hr=Tt[Ir].value,xt=Tt[Ur].value,Xt=Math.abs(xt-Hr),vr=Br||Xt,Or=0;vr>=T?Xt>=T&&Xt<=m?Or=Xt:Or=p:Br===_&&vr>=w?Xt>=w&&Xt<=l?Or=Xt:Or=_:vr>=g?Xt>=g&&Xt<=A?Or=Xt:Or=M:Br===b&&vr>=b?Or=b:vr>=d?Or=d:Br===u&&vr>=u?Or=u:Br===y&&vr>=y&&(Or=y);var ba;Or>=Xt&&(Or=Xt,ba=!0);var Pa=xr+Or;if(ut.rangebreaks&&Or>0){for(var ya=84,la=0,Ta=0;Tab&&(Or=Xt)}(Or>0||Cr===0)&&(Tt[Cr].periodX=xr+Or/2)}}q.calcTicks=function(ut,Br){for(var Cr=ut.type,xr=ut.calendar,Ir=ut.ticklabelstep,Ur=ut.ticklabelmode==="period",Hr=ut.range[0]>ut.range[1],xt=!ut.ticklabelindex||e.isArrayOrTypedArray(ut.ticklabelindex)?ut.ticklabelindex:[ut.ticklabelindex],Xt=e.simpleMap(ut.range,ut.r2l,void 0,void 0,Br),vr=Xt[1]=(Ki?0:1);_n--){var Rn=!_n;_n?(ut._dtickInit=ut.dtick,ut._tick0Init=ut.tick0):(ut.minor._dtickInit=ut.minor.dtick,ut.minor._tick0Init=ut.minor.tick0);var En=_n?ut:e.extendFlat({},ut,ut.minor);if(Rn?q.prepMinorTicks(En,ut,Br):q.prepTicks(En,Br),En.tickmode==="array"){_n?(Ta=[],ya=tt(ut,!Rn)):(Ai=[],la=tt(ut,!Rn));continue}if(En.tickmode==="sync"){Ta=[],ya=Oe(ut);continue}var On=be(Xt),no=On[0],cn=On[1],lo=x(En.dtick),Wo=Cr==="log"&&!(lo||En.dtick.charAt(0)==="L"),hs=q.tickFirst(En,Br);if(_n){if(ut._tmin=hs,hs=cn:Wn<=cn;Wn=q.tickIncrement(Wn,Ns,vr,xr)){if(_n&&No++,En.rangebreaks&&!vr){if(Wn=ba)break}if(Ta.length>Pa||Wn===Oo)break;Oo=Wn;var ss={value:Wn};_n?(Wo&&Wn!==(Wn|0)&&(ss.simpleLabel=!0),Ir>1&&No%Ir&&(ss.skipLabel=!0),Ta.push(ss)):(ss.minor=!0,Ai.push(ss))}}if(!Ai||Ai.length<2)xt=!1;else{var uo=(Ai[1].value-Ai[0].value)*(Hr?-1:1);hn(uo,ut.tickformat)||(xt=!1)}if(!xt)ki=Ta;else{var jn=Ta.concat(Ai);Ur&&Ta.length&&(jn=jn.slice(1)),jn=jn.sort(function(Vs,vl){return Vs.value-vl.value}).filter(function(Vs,vl,Ts){return vl===0||Vs.value!==Ts[vl-1].value});var Xn=jn.map(function(Vs,vl){return Vs.minor===void 0&&!Vs.skipLabel?vl:null}).filter(function(Vs){return Vs!==null});Xn.forEach(function(Vs){xt.map(function(vl){var Ts=Vs+vl;Ts>=0&&Ts-1;Gn--){if(Ta[Gn].drop){Ta.splice(Gn,1);continue}Ta[Gn].value=ri(Ta[Gn].value,ut);var il=ut.c2p(Ta[Gn].value);(zs?Ws>il-vs:Wsba||jsba&&(Ts.periodX=ba),jsxr&&bap)ut/=p,Cr=xr(10),Tt.dtick="M"+12*mr(ut,Cr,ot);else if(Ir>M)ut/=M,Tt.dtick="M"+mr(ut,1,Qe);else if(Ir>d){if(Tt.dtick=mr(ut,d,Tt._hasDayOfWeekBreaks?[1,2,7,14]:It),!Br){var Ur=q.getTickFormat(Tt),Hr=Tt.ticklabelmode==="period";Hr&&(Tt._rawTick0=Tt.tick0),/%[uVW]/.test(Ur)?Tt.tick0=e.dateTick0(Tt.calendar,2):Tt.tick0=e.dateTick0(Tt.calendar,1),Hr&&(Tt._dowTick0=Tt.tick0)}}else Ir>y?Tt.dtick=mr(ut,y,Qe):Ir>f?Tt.dtick=mr(ut,f,Pt):Ir>R?Tt.dtick=mr(ut,R,Pt):(Cr=xr(10),Tt.dtick=mr(ut,Cr,ot))}else if(Tt.type==="log"){Tt.tick0=0;var xt=e.simpleMap(Tt.range,Tt.r2l);if(Tt._isMinor&&(ut*=1.5),ut>.7)Tt.dtick=Math.ceil(ut);else if(Math.abs(xt[1]-xt[0])<1){var Xt=1.5*Math.abs((xt[1]-xt[0])/ut);ut=Math.abs(Math.pow(10,xt[1])-Math.pow(10,xt[0]))/Xt,Cr=xr(10),Tt.dtick="L"+mr(ut,Cr,ot)}else Tt.dtick=ut>.3?"D2":"D1"}else Tt.type==="category"||Tt.type==="multicategory"?(Tt.tick0=0,Tt.dtick=Math.ceil(Math.max(ut,1))):Za(Tt)?(Tt.tick0=0,Cr=1,Tt.dtick=mr(ut,Cr,kr)):(Tt.tick0=0,Cr=xr(10),Tt.dtick=mr(ut,Cr,ot));if(Tt.dtick===0&&(Tt.dtick=1),!x(Tt.dtick)&&typeof Tt.dtick!="string"){var vr=Tt.dtick;throw Tt.dtick=1,"ax.dtick error: "+String(vr)}};function qr(Tt){var ut=Tt.dtick;if(Tt._tickexponent=0,!x(ut)&&typeof ut!="string"&&(ut=1),(Tt.type==="category"||Tt.type==="multicategory")&&(Tt._tickround=null),Tt.type==="date"){var Br=Tt.r2l(Tt.tick0),Cr=Tt.l2r(Br).replace(/(^-|i)/g,""),xr=Cr.length;if(String(ut).charAt(0)==="M")xr>10||Cr.slice(5)!=="01-01"?Tt._tickround="d":Tt._tickround=+ut.slice(1)%12===0?"y":"m";else if(ut>=d&&xr<=10||ut>=d*15)Tt._tickround="d";else if(ut>=f&&xr<=16||ut>=y)Tt._tickround="M";else if(ut>=R&&xr<=19||ut>=f)Tt._tickround="S";else{var Ir=Tt.l2r(Br+ut).replace(/^-/,"").length;Tt._tickround=Math.max(xr,Ir)-20,Tt._tickround<0&&(Tt._tickround=4)}}else if(x(ut)||ut.charAt(0)==="L"){var Ur=Tt.range.map(Tt.r2d||Number);x(ut)||(ut=Number(ut.slice(1))),Tt._tickround=2-Math.floor(Math.log(ut)/Math.LN10+.01);var Hr=Math.max(Math.abs(Ur[0]),Math.abs(Ur[1])),xt=Math.floor(Math.log(Hr)/Math.LN10+.01),Xt=Tt.minexponent===void 0?3:Tt.minexponent;Math.abs(xt)>Xt&&(Pe(Tt.exponentformat)&&Tt.exponentformat!=="SI extended"&&!ft(xt)||Pe(Tt.exponentformat)&&Tt.exponentformat==="SI extended"&&!ct(xt)?Tt._tickexponent=3*Math.round((xt-1)/3):Tt._tickexponent=xt)}else Tt._tickround=null}q.tickIncrement=function(Tt,ut,Br,Cr){var xr=Br?-1:1;if(x(ut))return e.increment(Tt,xr*ut);var Ir=ut.charAt(0),Ur=xr*Number(ut.slice(1));if(Ir==="M")return e.incrementMonth(Tt,Ur,Cr);if(Ir==="L")return Math.log(Math.pow(10,Tt)+Ur)/Math.LN10;if(Ir==="D"){var Hr=ut==="D2"?Wt:qt,xt=Tt+xr*.01,Xt=e.roundUp(e.mod(xt,1),Hr,Br);return Math.floor(xt)+Math.log(v.round(Math.pow(10,Xt),1))/Math.LN10}throw"unrecognized dtick "+String(ut)},q.tickFirst=function(Tt,ut){var Br=Tt.r2l||Number,Cr=e.simpleMap(Tt.range,Br,void 0,void 0,ut),xr=Cr[1]=0&&Ai<=Tt._length?Ta:null};if(Ir&&e.isArrayOrTypedArray(Tt.ticktext)){var Or=e.simpleMap(Tt.range,Tt.r2l),ba=(Math.abs(Or[1]-Or[0])-(Tt._lBreaks||0))/1e4;for(Xt=0;Xt"+Hr;else{var Xt=pi(Tt),vr=Tt._trueSide||Tt.side;(!Xt&&vr==="top"||Xt&&vr==="bottom")&&(Ur+="
")}ut.text=Ur}function wt(Tt,ut,Br,Cr,xr){var Ir=Tt.dtick,Ur=ut.x,Hr=Tt.tickformat,xt=typeof Ir=="string"&&Ir.charAt(0);if(xr==="never"&&(xr=""),Cr&&xt!=="L"&&(Ir="L3",xt="L"),Hr||xt==="L")ut.text=Ct(Math.pow(10,Ur),Tt,xr,Cr);else if(x(Ir)||xt==="D"&&(Tt.minorloglabels==="complete"||e.mod(Ur+.01,1)<.1)){var Xt;Tt.minorloglabels==="complete"&&!(e.mod(Ur+.01,1)<.1)&&(Xt=!0,ut.fontSize*=.75);var vr=Math.pow(10,Ur).toExponential(0),Or=vr.split("e"),ba=+Or[1],Pa=Math.abs(ba),ya=Tt.exponentformat;ya==="power"||Pe(ya)&&ya!=="SI extended"&&ft(ba)||Pe(ya)&&ya==="SI extended"&&ct(ba)?(ut.text=Or[0],Pa>0&&(ut.text+="x10"),ut.text==="1x10"&&(ut.text="10"),ba!==0&&ba!==1&&(ut.text+=""+(ba>0?"":F)+Pa+""),ut.fontSize*=1.25):(ya==="e"||ya==="E")&&Pa>2?ut.text=Or[0]+ya+(ba>0?"+":F)+Pa:(ut.text=Ct(Math.pow(10,Ur),Tt,"","fakehover"),Ir==="D1"&&Tt._id.charAt(0)==="y"&&(ut.dy-=ut.fontSize/6))}else if(xt==="D")ut.text=Tt.minorloglabels==="none"?"":String(Math.round(Math.pow(10,e.mod(Ur,1)))),ut.fontSize*=.75;else throw"unrecognized dtick "+String(Ir);if(Tt.dtick==="D1"){var la=String(ut.text).charAt(0);(la==="0"||la==="1")&&(Tt._id.charAt(0)==="y"?ut.dx-=ut.fontSize/4:(ut.dy+=ut.fontSize/2,ut.dx+=(Tt.range[1]>Tt.range[0]?1:-1)*ut.fontSize*(Ur<0?.5:.25)))}}function Ne(Tt,ut){var Br=Tt._categories[Math.round(ut.x)];Br===void 0&&(Br=""),ut.text=String(Br)}function Ke(Tt,ut,Br){var Cr=Math.round(ut.x),xr=Tt._categories[Cr]||[],Ir=xr[1]===void 0?"":String(xr[1]),Ur=xr[0]===void 0?"":String(xr[0]);Br?ut.text=Ur+" - "+Ir:(ut.text=Ir,ut.text2=Ur)}function Te(Tt,ut,Br,Cr,xr){xr==="never"?xr="":Tt.showexponent==="all"&&Math.abs(ut.x/Tt.dtick)<1e-6&&(xr="hide"),ut.text=Ct(ut.x,Tt,xr,Cr)}function Ie(Tt,ut,Br,Cr,xr){if(Tt.thetaunit==="radians"&&!Br){var Ir=ut.x/180;if(Ir===0)ut.text="0";else{var Ur=Ve(Ir);if(Ur[1]>=100)ut.text=Ct(e.deg2rad(ut.x),Tt,xr,Cr);else{var Hr=ut.x<0;Ur[1]===1?Ur[0]===1?ut.text="\u03C0":ut.text=Ur[0]+"\u03C0":ut.text=["",Ur[0],"","\u2044","",Ur[1],"","\u03C0"].join(""),Hr&&(ut.text=F+ut.text)}}}else ut.text=Ct(ut.x,Tt,xr,Cr)}function Ve(Tt){function ut(Hr,xt){return Math.abs(Hr-xt)<=1e-6}function Br(Hr,xt){return ut(xt,0)?Hr:Br(xt,Hr%xt)}function Cr(Hr){for(var xt=1;!ut(Math.round(Hr*xt)/xt,Hr);)xt*=10;return xt}var xr=Cr(Tt),Ir=Tt*xr,Ur=Math.abs(Br(Ir,xr));return[Math.round(Ir/Ur),Math.round(xr/Ur)]}var Ce=["f","p","n","\u03BC","m","","k","M","G","T"],Ee=["q","r","y","z","a",...Ce,"P","E","Z","Y","R","Q"],Pe=Tt=>["SI","SI extended","B"].includes(Tt);function ft(Tt){return Tt>14||Tt<-15}function ct(Tt){return Tt>32||Tt<-30}function _t(Tt,ut){return Pe(ut)?!!(ut==="SI extended"&&ct(Tt)||ut!=="SI extended"&&ft(Tt)):!1}function Ct(Tt,ut,Br,Cr){var xr=Tt<0,Ir=ut._tickround,Ur=Br||ut.exponentformat||"B",Hr=ut._tickexponent,xt=q.getTickFormat(ut),Xt=ut.separatethousands;if(Cr){var vr={exponentformat:Ur,minexponent:ut.minexponent,dtick:ut.showexponent==="none"?ut.dtick:x(Tt)&&Math.abs(Tt)||1,range:ut.showexponent==="none"?ut.range.map(ut.r2d):[0,Tt||1]};qr(vr),Ir=(Number(vr._tickround)||0)+4,Hr=vr._tickexponent,ut.hoverformat&&(xt=ut.hoverformat)}if(xt)return ut._numFormat(xt)(Tt).replace(/-/g,F);var Or=Math.pow(10,-Ir)/2;if(Ur==="none"&&(Hr=0),Tt=Math.abs(Tt),Tt"+ya+"":Ur==="B"&&Hr===9?Tt+="B":Pe(Ur)&&(Tt+=Ur==="SI extended"?Ee[Hr/3+10]:Ce[Hr/3+5])}return xr?F+Tt:Tt}q.getTickFormat=function(Tt){var ut;function Br(xt){return typeof xt!="string"?xt:Number(xt.replace("M",""))*M}function Cr(xt,Xt){var vr=["L","D"];if(typeof xt==typeof Xt){if(typeof xt=="number")return xt-Xt;var Or=vr.indexOf(xt.charAt(0)),ba=vr.indexOf(Xt.charAt(0));return Or===ba?Number(xt.replace(/(L|D)/g,""))-Number(Xt.replace(/(L|D)/g,"")):Or-ba}else return typeof xt=="number"?1:-1}function xr(xt,Xt,vr){var Or=vr||function(ya){return ya},ba=Xt[0],Pa=Xt[1];return(!ba&&typeof ba!="number"||Or(ba)<=Or(xt))&&(!Pa&&typeof Pa!="number"||Or(Pa)>=Or(xt))}function Ir(xt,Xt){var vr=Xt[0]===null,Or=Xt[1]===null,ba=Cr(xt,Xt[0])>=0,Pa=Cr(xt,Xt[1])<=0;return(vr||ba)&&(Or||Pa)}var Ur,Hr;if(Tt.tickformatstops&&Tt.tickformatstops.length>0)switch(Tt.type){case"date":case"linear":{for(ut=0;ut=0&&xr.unshift(xr.splice(vr,1).shift())}});var Hr={false:{left:0,right:0}};return e.syncOrAsync(xr.map(function(xt){return function(){if(xt){var Xt=q.getFromId(Tt,xt);Br||(Br={}),Br.axShifts=Hr,Br.overlayingShiftedAx=Ur;var vr=q.drawOne(Tt,Xt,Br);return Xt._shiftPusher&&tn(Xt,Xt._fullDepth||0,Hr,!0),Xt._r=Xt.range.slice(),Xt._rl=e.simpleMap(Xt._r,Xt.r2l),vr}}}))},q.drawOne=function(Tt,ut,Br){Br=Br||{};var Cr=Br.axShifts||{},xr=Br.overlayingShiftedAx||[],Ir,Ur,Hr;ut.setScale();var xt=Tt._fullLayout,Xt=ut._id,vr=Xt.charAt(0),Or=q.counterLetter(Xt),ba=xt._plots[ut._mainSubplot],Pa=ut.zerolinelayer==="above traces";if(!ba)return;if(ut._shiftPusher=ut.autoshift||xr.indexOf(ut._id)!==-1||xr.indexOf(ut.overlaying)!==-1,ut._shiftPusher&ut.anchor==="free"){var ya=ut.linewidth/2||0;ut.ticks==="inside"&&(ya+=ut.ticklen),tn(ut,ya,Cr,!0),tn(ut,ut.shift||0,Cr,!1)}(Br.skipTitle!==!0||ut._shift===void 0)&&(ut._shift=on(ut,Cr));var la=ba[vr+"axislayer"],Ta=ut._mainLinePosition,Ai=Ta+=ut._shift,ki=ut._mainMirrorPosition,Ki=ut._vals=q.calcTicks(ut),_n=[ut.mirror,Ai,ki].join("_");for(Ir=0;Ir0?js.bottom-vl:0,Ts))));var su=0,Tc=0;if(ut._shiftPusher&&(su=Math.max(Ts,js.height>0?co==="l"?vl-js.left:js.right-vl:0),ut.title.text!==xt._dfltTitle[vr]&&(Tc=(ut._titleStandoff||0)+(ut._titleScoot||0),co==="l"&&(Tc+=Ca(ut))),ut._fullDepth=Math.max(su,Tc)),ut.automargin){us={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(vr==="x"){if(co==="b"?us[co]=ut._depth:(us[co]=ut._depth=Math.max(js.width>0?vl-js.top:0,Ts),du.reverse()),js.width>0){var Uc=js.right-(ut._offset+ut._length);Uc>0&&(us.xr=1,us.r=Uc);var Fs=ut._offset-js.left;Fs>0&&(us.xl=0,us.l=Fs)}}else if(co==="l"?(ut._depth=Math.max(js.height>0?vl-js.left:0,Ts),us[co]=ut._depth-Sf):(ut._depth=Math.max(js.height>0?js.right-vl:0,Ts),us[co]=ut._depth+Sf,du.reverse()),js.height>0){var dc=js.bottom-(ut._offset+ut._length);dc>0&&(us.yb=0,us.b=dc);var Hc=ut._offset-js.top;Hc>0&&(us.yt=1,us.t=Hc)}us[Or]=ut.anchor==="free"?ut.position:ut._anchorAxis.domain[du[0]],ut.title.text!==xt._dfltTitle[vr]&&(us[co]+=Ca(ut)+(ut.title.standoff||0)),ut.mirror&&ut.anchor!=="free"&&(As={x:0,y:0,r:0,l:0,t:0,b:0},As[Vs]=ut.linewidth,ut.mirror&&ut.mirror!==!0&&(As[Vs]+=Ts),ut.mirror===!0||ut.mirror==="ticks"?As[Or]=ut._anchorAxis.domain[du[1]]:(ut.mirror==="all"||ut.mirror==="allticks")&&(As[Or]=[ut._counterDomainMin,ut._counterDomainMax][du[1]]))}pu&&(Nl=E.getComponentMethod("rangeslider","autoMarginOpts")(Tt,ut)),typeof ut.automargin=="string"&&(ir(us,ut.automargin),ir(As,ut.automargin)),S.autoMargin(Tt,Jt(ut),us),S.autoMargin(Tt,Fr(ut),As),S.autoMargin(Tt,ta(ut),Nl)}),e.syncOrAsync(bo)}};function ir(Tt,ut){if(Tt){var Br=Object.keys($).reduce(function(Cr,xr){return ut.indexOf(xr)!==-1&&$[xr].forEach(function(Ir){Cr[Ir]=1}),Cr},{});Object.keys(Tt).forEach(function(Cr){Br[Cr]||(Cr.length===1?Tt[Cr]=0:delete Tt[Cr])})}}function rr(Tt,ut){var Br=[],Cr,xr=function(Ir,Ur){var Hr=Ir.xbnd[Ur];Hr!==null&&Br.push(e.extendFlat({},Ir,{x:Hr}))};if(ut.length){for(Cr=0;CrTt.range[1],Hr=Tt.ticklabelposition&&Tt.ticklabelposition.indexOf("inside")!==-1,xt=!Hr;if(Br){var Xt=Ur?-1:1;Br=Br*Xt}if(Cr){var vr=Tt.side,Or=Hr&&(vr==="top"||vr==="left")||xt&&(vr==="bottom"||vr==="right")?1:-1;Cr=Cr*Or}return Tt._id.charAt(0)==="x"?function(ba){return t(xr+Tt._offset+Tt.l2p(Da(ba))+Br,Ir+Cr)}:function(ba){return t(Ir+Cr,xr+Tt._offset+Tt.l2p(Da(ba))+Br)}};function Da(Tt){return Tt.periodX!==void 0?Tt.periodX:Tt.x}function Ia(Tt){var ut=Tt.ticklabelposition||"",Br=Tt.tickson||"",Cr=function(ya){return ut.indexOf(ya)!==-1},xr=Cr("top"),Ir=Cr("left"),Ur=Cr("right"),Hr=Cr("bottom"),xt=Cr("inside"),Xt=Br!=="boundaries"&&(Hr||Ir||xr||Ur);if(!Xt&&!xt)return[0,0];var vr=Tt.side,Or=Xt?(Tt.tickwidth||0)/2:0,ba=ee,Pa=Tt.tickfont?Tt.tickfont.size:12;return(Hr||xr)&&(Or+=Pa*fe,ba+=(Tt.linewidth||0)/2),(Ir||Ur)&&(Or+=(Tt.linewidth||0)/2,ba+=ee),xt&&vr==="top"&&(ba-=Pa*(1-fe)),(Ir||xr)&&(Or=-Or),(vr==="bottom"||vr==="right")&&(ba=-ba),[Xt?Or:0,xt?ba:0]}q.makeTickPath=function(Tt,ut,Br,Cr){Cr||(Cr={});var xr=Cr.minor;if(xr&&!Tt.minor)return"";var Ir=Cr.len!==void 0?Cr.len:xr?Tt.minor.ticklen:Tt.ticklen,Ur=Tt._id.charAt(0),Hr=(Tt.linewidth||1)/2;return Ur==="x"?"M0,"+(ut+Hr*Br)+"v"+Ir*Br:"M"+(ut+Hr*Br)+",0h"+Ir*Br},q.makeLabelFns=function(Tt,ut,Br){var Cr=Tt.ticklabelposition||"",xr=Tt.tickson||"",Ir=function(Oo){return Cr.indexOf(Oo)!==-1},Ur=Ir("top"),Hr=Ir("left"),xt=Ir("right"),Xt=Ir("bottom"),vr=xr!=="boundaries"&&(Xt||Hr||Ur||xt),Or=Ir("inside"),ba=Cr==="inside"&&Tt.ticks==="inside"||!Or&&Tt.ticks==="outside"&&xr!=="boundaries",Pa=0,ya=0,la=ba?Tt.ticklen:0;if(Or?la*=-1:vr&&(la=0),ba&&(Pa+=la,Br)){var Ta=e.deg2rad(Br);Pa=la*Math.cos(Ta)+1,ya=la*Math.sin(Ta)}Tt.showticklabels&&(ba||Tt.showline)&&(Pa+=.2*Tt.tickfont.size),Pa+=(Tt.linewidth||1)/2*(Or?-1:1);var Ai={labelStandoff:Pa,labelShift:ya},ki,Ki,_n,Rn,En=0,On=Tt.side,no=Tt._id.charAt(0),cn=Tt.tickangle,lo;if(no==="x")lo=!Or&&On==="bottom"||Or&&On==="top",Rn=lo?1:-1,Or&&(Rn*=-1),ki=ya*Rn,Ki=ut+Pa*Rn,_n=lo?1:-.2,Math.abs(cn)===90&&(Or?_n+=le:cn===-90&&On==="bottom"?_n=fe:cn===90&&On==="top"?_n=le:_n=.5,En=le/2*(cn/90)),Ai.xFn=function(Oo){return Oo.dx+ki+En*Oo.fontSize},Ai.yFn=function(Oo){return Oo.dy+Ki+Oo.fontSize*_n},Ai.anchorFn=function(Oo,Wn){if(vr){if(Hr)return"end";if(xt)return"start"}return!x(Wn)||Wn===0||Wn===180?"middle":Wn*Rn<0!==Or?"end":"start"},Ai.heightFn=function(Oo,Wn,No){return Wn<-60||Wn>60?-.5*No:Tt.side==="top"!==Or?-No:0};else if(no==="y"){if(lo=!Or&&On==="left"||Or&&On==="right",Rn=lo?1:-1,Or&&(Rn*=-1),ki=Pa,Ki=ya*Rn,_n=0,!Or&&Math.abs(cn)===90&&(cn===-90&&On==="left"||cn===90&&On==="right"?_n=fe:_n=.5),Or){var Wo=x(cn)?+cn:0;if(Wo!==0){var hs=e.deg2rad(Wo);En=Math.abs(Math.sin(hs))*fe*Rn,_n=0}}Ai.xFn=function(Oo){return Oo.dx+ut-(ki+Oo.fontSize*_n)*Rn+En*Oo.fontSize},Ai.yFn=function(Oo){return Oo.dy+Ki+Oo.fontSize*le},Ai.anchorFn=function(Oo,Wn){return x(Wn)&&Math.abs(Wn)===90?"middle":lo?"end":"start"},Ai.heightFn=function(Oo,Wn,No){return Tt.side==="right"&&(Wn*=-1),Wn<-30?-No:Wn<30?-.5*No:0}}return Ai};function qa(Tt){return[Tt.text,Tt.x,Tt.axInfo,Tt.font,Tt.fontSize,Tt.fontColor].join("_")}q.drawTicks=function(Tt,ut,Br){Br=Br||{};var Cr=ut._id+"tick",xr=[].concat(ut.minor&&ut.minor.ticks?Br.vals.filter(function(Ur){return Ur.minor&&!Ur.noTick}):[]).concat(ut.ticks?Br.vals.filter(function(Ur){return!Ur.minor&&!Ur.noTick}):[]),Ir=Br.layer.selectAll("path."+Cr).data(xr,qa);Ir.exit().remove(),Ir.enter().append("path").classed(Cr,1).classed("ticks",1).classed("crisp",Br.crisp!==!1).each(function(Ur){return a.stroke(v.select(this),Ur.minor?ut.minor.tickcolor:ut.tickcolor)}).style("stroke-width",function(Ur){return n.crispRound(Tt,Ur.minor?ut.minor.tickwidth:ut.tickwidth,1)+"px"}).attr("d",Br.path).style("display",null),Ra(ut,[B]),Ir.attr("transform",Br.transFn)},q.drawGrid=function(Tt,ut,Br){if(Br=Br||{},ut.tickmode!=="sync"){var Cr=ut._id+"grid",xr=ut.minor&&ut.minor.showgrid,Ir=xr?Br.vals.filter(function(Ai){return Ai.minor}):[],Ur=ut.showgrid?Br.vals.filter(function(Ai){return!Ai.minor}):[],Hr=Br.counterAxis;if(Hr&&q.shouldShowZeroLine(Tt,ut,Hr))for(var xt=ut.tickmode==="array",Xt=0;Xt=0;ya--){var la=ya?ba:Pa;if(la){var Ta=la.selectAll("path."+Cr).data(ya?Ur:Ir,qa);Ta.exit().remove(),Ta.enter().append("path").classed(Cr,1).classed("crisp",Br.crisp!==!1),Ta.attr("transform",Br.transFn).attr("d",Br.path).each(function(Ai){return a.stroke(v.select(this),Ai.minor?ut.minor.gridcolor:ut.gridcolor||"#ddd")}).style("stroke-dasharray",function(Ai){return n.dashStyle(Ai.minor?ut.minor.griddash:ut.griddash,Ai.minor?ut.minor.gridwidth:ut.gridwidth)}).style("stroke-width",function(Ai){return(Ai.minor?Or:ut._gw)+"px"}).style("display",null),typeof Br.path=="function"&&Ta.attr("d",Br.path)}}Ra(ut,[P,U])}},q.drawZeroLine=function(Tt,ut,Br){Br=Br||Br;var Cr=ut._id+"zl",xr=q.shouldShowZeroLine(Tt,ut,Br.counterAxis),Ir=Br.layer.selectAll("path."+Cr).data(xr?[{x:0,id:ut._id}]:[]);Ir.exit().remove(),Ir.enter().append("path").classed(Cr,1).classed("zl",1).classed("crisp",Br.crisp!==!1).each(function(){Br.layer.selectAll("path").sort(function(Ur,Hr){return j(Ur.id,Hr.id)})}),Ir.attr("transform",Br.transFn).attr("d",Br.path).call(a.stroke,ut.zerolinecolor||a.defaultLine).style("stroke-width",n.crispRound(Tt,ut.zerolinewidth,ut._gw||1)+"px").style("display",null),Ra(ut,[O])},q.drawLabels=function(Tt,ut,Br){Br=Br||{};var Cr=Tt._fullLayout,xr=ut._id,Ir=ut.zerolinelayer==="above traces",Ur=Br.cls||xr+"tick",Hr=Br.vals.filter(function(uo){return uo.text}),xt=Br.labelFns,Xt=Br.secondary?0:ut.tickangle,vr=(ut._prevTickAngles||{})[Ur],Or=Br.layer.selectAll("g."+Ur).data(ut.showticklabels?Hr:[],qa),ba=[];Or.enter().append("g").classed(Ur,1).append("text").attr("text-anchor","middle").each(function(uo){var jn=v.select(this),Xn=Tt._promises.length;jn.call(r.positionText,xt.xFn(uo),xt.yFn(uo)).call(n.font,{family:uo.font,size:uo.fontSize,color:uo.fontColor,weight:uo.fontWeight,style:uo.fontStyle,variant:uo.fontVariant,textcase:uo.fontTextcase,lineposition:uo.fontLineposition,shadow:uo.fontShadow}).text(uo.text).call(r.convertToTspans,Tt),Tt._promises[Xn]?ba.push(Tt._promises.pop().then(function(){Pa(jn,Xt)})):Pa(jn,Xt)}),Ra(ut,[X]),Or.exit().remove(),Br.repositionOnUpdate&&Or.each(function(uo){v.select(this).select("text").call(r.positionText,xt.xFn(uo),xt.yFn(uo))});function Pa(uo,jn){uo.each(function(Xn){var ls=v.select(this),Cs=ls.select(".text-math-group"),Ks=xt.anchorFn(Xn,jn),Xo=Br.transFn.call(ls.node(),Xn)+(x(jn)&&+jn!=0?" rotate("+jn+","+xt.xFn(Xn)+","+(xt.yFn(Xn)-Xn.fontSize/2)+")":""),Gi=r.lineCount(ls),Ln=V*Xn.fontSize,Us=xt.heightFn(Xn,x(jn)?+jn:0,(Gi-1)*Ln);if(Us&&(Xo+=t(0,Us)),Cs.empty()){var _s=ls.select("text");_s.attr({transform:Xo,"text-anchor":Ks}),_s.style("display",null),ut._adjustTickLabelsOverflow&&ut._adjustTickLabelsOverflow()}else{var Gn=n.bBox(Cs.node()).width,zs=Gn*{end:-.5,start:.5}[Ks];Cs.attr("transform",Xo+t(zs,0))}})}ut._adjustTickLabelsOverflow=function(){var uo=ut.ticklabeloverflow;if(!(!uo||uo==="allow")){var jn=uo.indexOf("hide")!==-1,Xn=ut._id.charAt(0)==="x",ls=0,Cs=Xn?Tt._fullLayout.width:Tt._fullLayout.height;if(uo.indexOf("domain")!==-1){var Ks=e.simpleMap(ut.range,ut.r2l);ls=ut.l2p(Ks[0])+ut._offset,Cs=ut.l2p(Ks[1])+ut._offset}var Xo=Math.min(ls,Cs),Gi=Math.max(ls,Cs),Ln=ut.side,Us=1/0,_s=-1/0;Or.each(function(Ws){var il=v.select(this),xn=il.select(".text-math-group");if(xn.empty()){var ko=n.bBox(il.node()),bo=0;Xn?(ko.right>Gi||ko.leftGi||ko.top+(ut.tickangle?0:Ws.fontSize/4)ut["_visibleLabelMin_"+Ks._id]?il.style("display","none"):Gi.K==="tick"&&!Xo&&il.node().style.display!=="none"&&il.style("display",null)})})})})},Pa(Or,vr+1?vr:Xt);function ya(){return ba.length&&Promise.all(ba)}var la=null;function Ta(){if(Pa(Or,Xt),Hr.length&&ut.autotickangles&&(ut.type!=="log"||String(ut.dtick).charAt(0)!=="D")){la=ut.autotickangles[0];var uo=0,jn=[],Xn,ls=1;Or.each(function(us){uo=Math.max(uo,us.fontSize);var As=ut.l2p(us.x),Nl=Yt(this),su=n.bBox(Nl.node());ls=Math.max(ls,r.lineCount(Nl)),jn.push({top:0,bottom:10,height:10,left:As-su.width/2,right:As+su.width/2+2,width:su.width+2})});var Cs=(ut.tickson==="boundaries"||ut.showdividers)&&!Br.secondary,Ks=Hr.length,Xo=Math.abs((Hr[Ks-1].x-Hr[0].x)*ut._m)/(Ks-1),Gi=Cs?Xo/2:Xo,Ln=Cs?ut.ticklen:uo*1.25*ls,Us=Math.sqrt(Math.pow(Gi,2)+Math.pow(Ln,2)),_s=Gi/Us,Gn=ut.autotickangles.map(function(us){return us*Math.PI/180}),zs=Gn.find(function(us){return Math.abs(Math.cos(us))<=_s});zs===void 0&&(zs=Gn.reduce(function(us,As){return Math.abs(Math.cos(us))as*No&&(hs=No,cn[no]=lo[no]=Oo[no])}var Ns=Math.abs(hs-Wo);Ns-Rn>0?(Ns-=Rn,Rn*=1+Rn/Ns):Rn=0,ut._id.charAt(0)!=="y"&&(Rn=-Rn),cn[On]=Ki.p2r(Ki.r2p(lo[On])+En*Rn),Ki.autorange==="min"||Ki.autorange==="max reversed"?(cn[0]=null,Ki._rangeInitial0=void 0,Ki._rangeInitial1=void 0):(Ki.autorange==="max"||Ki.autorange==="min reversed")&&(cn[1]=null,Ki._rangeInitial0=void 0,Ki._rangeInitial1=void 0),Cr._insideTickLabelsUpdaterange[Ki._name+".range"]=cn}var ss=e.syncOrAsync(Ai);return ss&&ss.then&&Tt._promises.push(ss),ss};function Wa(Tt,ut,Br){var Cr=ut._id+"divider",xr=Br.vals,Ir=Br.layer.selectAll("path."+Cr).data(xr,qa);Ir.exit().remove(),Ir.enter().insert("path",":first-child").classed(Cr,1).classed("crisp",1).call(a.stroke,ut.dividercolor).style("stroke-width",n.crispRound(Tt,ut.dividerwidth,1)+"px"),Ir.attr("transform",Br.transFn).attr("d",Br.path)}q.getPxPosition=function(Tt,ut){var Br=Tt._fullLayout._size,Cr=ut._id.charAt(0),xr=ut.side,Ir;if(ut.anchor!=="free"?Ir=ut._anchorAxis:Cr==="x"?Ir={_offset:Br.t+(1-(ut.position||0))*Br.h,_length:0}:Cr==="y"&&(Ir={_offset:Br.l+(ut.position||0)*Br.w+ut._shift,_length:0}),xr==="top"||xr==="left")return Ir._offset;if(xr==="bottom"||xr==="right")return Ir._offset+Ir._length};function Ca(Tt){var ut=Tt.title.font.size,Br=(Tt.title.text.match(r.BR_TAG_ALL)||[]).length;return Tt.title.hasOwnProperty("standoff")?ut*(fe+Br*V):Br?ut*(Br+1)*V:ut}function hi(Tt,ut){var Br=Tt._fullLayout,Cr=ut._id,xr=Cr.charAt(0),Ir=ut.title.font.size,Ur,Hr=(ut.title.text.match(r.BR_TAG_ALL)||[]).length;if(ut.title.hasOwnProperty("standoff"))ut.side==="bottom"||ut.side==="right"?Ur=ut._depth+ut.title.standoff+Ir*fe:(ut.side==="top"||ut.side==="left")&&(Ur=ut._depth+ut.title.standoff+Ir*(le+Hr*V));else{var xt=pi(ut);if(ut.type==="multicategory")Ur=ut._depth;else{var Xt=1.5*Ir;xt&&(Xt=.5*Ir,ut.ticks==="outside"&&(Xt+=ut.ticklen)),Ur=10+Xt+(ut.linewidth?ut.linewidth-1:0)}xt||(xr==="x"?Ur+=ut.side==="top"?Ir*(ut.showticklabels?1:0):Ir*(ut.showticklabels?1.5:.5):Ur+=ut.side==="right"?Ir*(ut.showticklabels?1:.5):Ir*(ut.showticklabels?.5:0))}var vr=q.getPxPosition(Tt,ut),Or,ba,Pa;xr==="x"?(ba=ut._offset+ut._length/2,Pa=ut.side==="top"?vr-Ur:vr+Ur):(Pa=ut._offset+ut._length/2,ba=ut.side==="right"?vr+Ur:vr-Ur,Or={rotate:"-90",offset:0});var ya;if(ut.type!=="multicategory"){var la=ut._selections[ut._id+"tick"];if(ya={selection:la,side:ut.side},la&&la.node()&&la.node().parentNode){var Ta=n.getTranslate(la.node().parentNode);ya.offsetLeft=Ta.x,ya.offsetTop=Ta.y}ut.title.hasOwnProperty("standoff")&&(ya.pad=0)}return ut._titleStandoff=Ur,o.draw(Tt,Cr+"title",{propContainer:ut,propName:ut._name+".title.text",placeholder:Br._dfltTitle[xr],avoid:ya,transform:Or,attributes:{x:ba,y:Pa,"text-anchor":"middle"}})}q.shouldShowZeroLine=function(Tt,ut,Br){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)||!Kt(Tt,ut,Br,Cr)||Ft(Tt,ut))},q.clipEnds=function(Tt,ut){return ut.filter(function(Br){return wi(Tt,Br.x)})};function wi(Tt,ut){var Br=Tt.l2p(ut);return Br>1&&Br1)for(xr=1;xr=xr.min&&Tt=z:/%L/.test(ut)?Tt>=L:/%[SX]/.test(ut)?Tt>=R:/%M/.test(ut)?Tt>=f:/%[HI]/.test(ut)?Tt>=y:/%p/.test(ut)?Tt>=u:/%[Aadejuwx]/.test(ut)?Tt>=d:/%[UVW]/.test(ut)?Tt>=b:/%[Bbm]/.test(ut)?Tt>=g:/%[q]/.test(ut)?Tt>=w:/%[Yy]/.test(ut)?Tt>=T:!0}}}),f5=Xe({"src/plots/cartesian/autorange_options_defaults.js"(Z,G){"use strict";G.exports=function(x,S,E){var e,t;if(E){var r=S==="reversed"||S==="min reversed"||S==="max reversed";e=E[r?1:0],t=E[r?0:1]}var o=x("autorangeoptions.minallowed",t===null?e:void 0),a=x("autorangeoptions.maxallowed",e===null?t:void 0);o===void 0&&x("autorangeoptions.clipmin"),a===void 0&&x("autorangeoptions.clipmax"),x("autorangeoptions.include")}}}),h5=Xe({"src/plots/cartesian/range_defaults.js"(Z,G){"use strict";var v=f5();G.exports=function(S,E,e,t){var r=E._template||{},o=E.type||r.type||"-";e("minallowed"),e("maxallowed");var a=e("range");if(!a){var n;!t.noInsiderange&&o!=="log"&&(n=e("insiderange"),n&&(n[0]===null||n[1]===null)&&(E.insiderange=!1,n=void 0),n&&(a=e("range",n)))}var i=E.getAutorangeDflt(a,t),s=e("autorange",i),h;a&&(a[0]===null&&a[1]===null||(a[0]===null||a[1]===null)&&(s==="reversed"||s===!0)||a[0]!==null&&(s==="min"||s==="max reversed")||a[1]!==null&&(s==="max"||s==="min reversed"))&&(a=void 0,delete E.range,E.autorange=!0,h=!0),h||(i=E.getAutorangeDflt(a,t),s=e("autorange",i)),s&&(v(e,s,a),(o==="linear"||o==="-")&&e("rangemode")),E.cleanRange()}}}),uz=Xe({"node_modules/mouse-event-offset/index.js"(Z,G){var v={left:0,top:0};G.exports=x;function x(E,e,t){e=e||E.currentTarget||E.srcElement,Array.isArray(t)||(t=[0,0]);var r=E.clientX||0,o=E.clientY||0,a=S(e);return t[0]=r-a.left,t[1]=o-a.top,t}function S(E){return E===window||E===document||E===document.body?v:E.getBoundingClientRect()}}}),b2=Xe({"node_modules/has-passive-events/index.js"(Z,G){"use strict";var v=a5();function x(){var S=!1;try{var E=Object.defineProperty({},"passive",{get:function(){S=!0}});window.addEventListener("test",null,E),window.removeEventListener("test",null,E)}catch{S=!1}return S}G.exports=v&&x()}}),cz=Xe({"src/components/dragelement/align.js"(Z,G){"use strict";G.exports=function(x,S,E,e,t){var r=(x-E)/(e-E),o=r+S/(e-E),a=(r+o)/2;return t==="left"||t==="bottom"?r:t==="center"||t==="middle"?a:t==="right"||t==="top"?o:r<2/3-a?r:o>4/3-a?o:a}}}),fz=Xe({"src/components/dragelement/cursor.js"(Z,G){"use strict";var v=sa(),x=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];G.exports=function(E,e,t,r){return t==="left"?E=0:t==="center"?E=1:t==="right"?E=2:E=v.constrain(Math.floor(E*3),0,2),r==="bottom"?e=0:r==="middle"?e=1:r==="top"?e=2:e=v.constrain(Math.floor(e*3),0,2),x[e][E]}}}),hz=Xe({"src/components/dragelement/unhover.js"(Z,G){"use strict";var v=Qy(),x=y2(),S=T_().getGraphDiv,E=w_(),e=G.exports={};e.wrapped=function(t,r,o){t=S(t),t._fullLayout&&x.clear(t._fullLayout._uid+E.HOVERID),e.raw(t,r,o)},e.raw=function(r,o){var a=r._fullLayout,n=r._hoverdata;o||(o={}),!(o.target&&!r._dragged&&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&&n&&r.emit("plotly_unhover",{event:o,points:n}))}}}),Ap=Xe({"src/components/dragelement/index.js"(Z,G){"use strict";var v=uz(),x=i5(),S=b2(),E=sa().removeElement,e=lh(),t=G.exports={};t.align=cz(),t.getCursor=fz();var r=hz();t.unhover=r.wrapped,t.unhoverRaw=r.raw,t.init=function(i){var s=i.gd,h=1,c=s._context.doubleClickDelay,m=i.element,p,T,l,_,w,A,M,g;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(R,L,z){return Math.abs(R)"u"&&typeof R.clientY>"u"&&(R.clientX=p,R.clientY=T),l=new Date().getTime(),l-s._mouseDownTimec&&(h=Math.max(h-1,1)),s._dragged)i.doneFn&&i.doneFn();else{var L;A.target===M?L=A:(L={target:M,srcElement:M,toElement:M},Object.keys(A).concat(Object.keys(A.__proto__)).forEach(z=>{var F=A[z];!L[z]&&typeof F!="function"&&(L[z]=F)})),i.clickFn&&i.clickFn(h,L),g||M.dispatchEvent(new MouseEvent("click",R))}s._dragging=!1,s._dragged=!1}};function o(){var n=document.createElement("div");n.className="dragcover";var i=n.style;return i.position="fixed",i.left=0,i.right=0,i.top=0,i.bottom=0,i.zIndex=999999999,i.background="none",document.body.appendChild(n),n}t.coverSlip=o;function a(n){return v(n.changedTouches?n.changedTouches[0]:n,document.body)}}}),Kd=Xe({"src/lib/setcursor.js"(Z,G){"use strict";G.exports=function(x,S){(x.attr("class")||"").split(" ").forEach(function(E){E.indexOf("cursor-")===0&&x.classed(E,!1)}),S&&x.classed("cursor-"+S,!0)}}}),pz=Xe({"src/lib/override_cursor.js"(Z,G){"use strict";var v=Kd(),x="data-savedcursor",S="!!";G.exports=function(e,t){var r=e.attr(x);if(t){if(!r){for(var o=(e.attr("class")||"").split(" "),a=0;aY.legend.length)for(var oe=Y.legend.length;oe(a==="legend"?1:0));if(z===!1&&(i[a]=void 0),!(z===!1&&!c.uirevision)&&(p("uirevision",i.uirevision),z!==!1)){p("borderwidth");var F=p("orientation"),N=p("yref"),O=p("xref"),P=F==="h",U=N==="paper",B=O==="paper",X,$,se,le="left";P?(X=0,v.getComponentMethod("rangeslider","isVisible")(n.xaxis)?U?($=1.1,se="bottom"):($=1,se="top"):U?($=-.1,se="top"):($=0,se="bottom")):($=1,se="auto",B?X=1.02:(X=1,le="right")),x.coerce(c,m,{x:{valType:"number",editType:"legend",min:B?-2:0,max:B?3:1,dflt:X}},"x"),x.coerce(c,m,{y:{valType:"number",editType:"legend",min:U?-2:0,max:U?3:1,dflt:$}},"y"),p("traceorder",d),r.isGrouped(i[a])&&p("tracegroupgap"),p("entrywidth"),p("entrywidthmode"),p("indentation"),p("itemsizing"),p("itemwidth"),p("itemclick"),p("itemdoubleclick"),p("groupclick"),p("xanchor",le),p("yanchor",se),p("maxheight"),p("valign"),x.noneOrAll(c,m,["x","y"]);var fe=p("title.text");if(fe){p("title.side",P?"left":"top");var V=x.extendFlat({},T,{size:x.bigFont(T.size)});x.coerceFont(p,"title.font",V);let Y=h>1;p("titleclick",Y?"toggle":!1),p("titledoubleclick",Y?"toggleothers":!1)}}}G.exports=function(n,i,s){var h,c=s.slice(),m=i.shapes;if(m)for(h=0;hz&&(L=z)}f[p][0]._groupMinRank=L,f[p][0]._preGroupSort=p}var F=function(X,$){return X[0]._groupMinRank-$[0]._groupMinRank||X[0]._preGroupSort-$[0]._preGroupSort},N=function(X,$){return X.trace.legendrank-$.trace.legendrank||X._preSort-$._preSort};for(f.forEach(function(X,$){X[0]._preGroupSort=$}),f.sort(F),p=0;p0)oe=Y.width;else return 0;return d?q:Math.min(oe,ee)};A.each(function(V){var Y=v.select(this),ee=S.ensureSingle(Y,"g","layers");ee.style("opacity",V[0].trace.opacity);var q=g.indentation,oe=g.valign,ae=V[0].lineHeight,j=V[0].height;if(oe==="middle"&&q===0||!ae||!j)ee.attr("transform",null);else{var Q={top:1,bottom:-1}[oe],re=Q*(.5*(ae-j+3))||0,ce=g.indentation;ee.attr("transform",E(ce,re))}var be=ee.selectAll("g.legendfill").data([V]);be.enter().append("g").classed("legendfill",!0);var Ae=ee.selectAll("g.legendlines").data([V]);Ae.enter().append("g").classed("legendlines",!0);var De=ee.selectAll("g.legendsymbols").data([V]);De.enter().append("g").classed("legendsymbols",!0),De.selectAll("g.legendpoints").data([V]).enter().append("g").classed("legendpoints",!0)}).each(fe).each(F).each(O).each(N).each(U).each(se).each($).each(L).each(z).each(B).each(X);function L(V){var Y=l(V),ee=Y.showFill,q=Y.showLine,oe=Y.showGradientLine,ae=Y.showGradientFill,j=Y.anyFill,Q=Y.anyLine,re=V[0],ce=re.trace,be,Ae,De=r(ce),ze=De.colorscale,Ze=De.reversescale,at=function(Oe){if(Oe.size())if(ee)e.fillGroupStyle(Oe,M,!0);else{var tt="legendfill-"+ce.uid;e.gradient(Oe,M,tt,T(Ze),ze,"fill")}},nt=function(Oe){if(Oe.size()){var tt="legendline-"+ce.uid;e.lineGroupStyle(Oe),e.gradient(Oe,M,tt,T(Ze),ze,"stroke")}},rt=o.hasMarkers(ce)||!j?"M5,0":Q?"M5,-2":"M5,-3",st=v.select(this),Me=st.select(".legendfill").selectAll("path").data(ee||ae?[V]:[]);if(Me.enter().append("path").classed("js-fill",!0),Me.exit().remove(),Me.attr("d",rt+"h"+u+"v6h-"+u+"z").call(at),q||oe){var ye=R(void 0,ce.line,m,h);Ae=S.minExtend(ce,{line:{width:ye}}),be=[S.minExtend(re,{trace:Ae})]}var he=st.select(".legendlines").selectAll("path").data(q||oe?[be]:[]);he.enter().append("path").classed("js-line",!0),he.exit().remove(),he.attr("d",rt+(oe?"l"+u+",0.0001":"h"+u)).call(q?e.lineGroupStyle:nt)}function z(V){var Y=l(V),ee=Y.anyFill,q=Y.anyLine,oe=Y.showLine,ae=Y.showMarker,j=V[0],Q=j.trace,re=!ae&&!q&&!ee&&o.hasText(Q),ce,be;function Ae(Me,ye,he,Oe){var tt=S.nestedProperty(Q,Me).get(),ot=S.isArrayOrTypedArray(tt)&&ye?ye(tt):tt;if(d&&ot&&Oe!==void 0&&(ot=Oe),he){if(othe[1])return he[1]}return ot}function De(Me){return j._distinct&&j.index&&Me[j.index]?Me[j.index]:Me[0]}if(ae||re||oe){var ze={},Ze={};if(ae){ze.mc=Ae("marker.color",De),ze.mx=Ae("marker.symbol",De),ze.mo=Ae("marker.opacity",S.mean,[.2,1]),ze.mlc=Ae("marker.line.color",De),ze.mlw=Ae("marker.line.width",S.mean,[0,5],c),ze.mld=Q._isShape?"solid":Ae("marker.line.dash",De),Ze.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var at=Ae("marker.size",S.mean,[2,16],s);ze.ms=at,Ze.marker.size=at}oe&&(Ze.line={width:Ae("line.width",De,[0,10],h)}),re&&(ze.tx="Aa",ze.tp=Ae("textposition",De),ze.ts=10,ze.tc=Ae("textfont.color",De),ze.tf=Ae("textfont.family",De),ze.tw=Ae("textfont.weight",De),ze.ty=Ae("textfont.style",De),ze.tv=Ae("textfont.variant",De),ze.tC=Ae("textfont.textcase",De),ze.tE=Ae("textfont.lineposition",De),ze.tS=Ae("textfont.shadow",De)),ce=[S.minExtend(j,ze)],be=S.minExtend(Q,Ze),be.selectedpoints=null,be.texttemplate=null}var nt=v.select(this).select("g.legendpoints"),rt=nt.selectAll("path.scatterpts").data(ae?ce:[]);rt.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",f),rt.exit().remove(),rt.call(e.pointStyle,be,M),ae&&(ce[0].mrc=3);var st=nt.selectAll("g.pointtext").data(re?ce:[]);st.enter().append("g").classed("pointtext",!0).append("text").attr("transform",f),st.exit().remove(),st.selectAll("text").call(e.textPointStyle,be,M)}function F(V){var Y=V[0].trace,ee=Y.type==="waterfall";if(V[0]._distinct&&ee){var q=V[0].trace[V[0].dir].marker;return V[0].mc=q.color,V[0].mlw=q.line.width,V[0].mlc=q.line.color,P(V,this,"waterfall")}var oe=[];Y.visible&&ee&&(oe=V[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(oe);ae.enter().append("path").classed("legendwaterfall",!0).attr("transform",f).style("stroke-miterlimit",1),ae.exit().remove(),ae.each(function(j){var Q=v.select(this),re=Y[j[0]].marker,ce=R(void 0,re.line,p,c);Q.attr("d",j[1]).style("stroke-width",ce+"px").call(t.fill,re.color),ce&&Q.call(t.stroke,re.line.color)})}function N(V){P(V,this)}function O(V){P(V,this,"funnel")}function P(V,Y,ee){var q=V[0].trace,oe=q.marker||{},ae=oe.line||{},j=oe.cornerradius?"M6,3a3,3,0,0,1-3,3H-3a3,3,0,0,1-3-3V-3a3,3,0,0,1,3-3H3a3,3,0,0,1,3,3Z":"M6,6H-6V-6H6Z",Q=ee?q.visible&&q.type===ee:x.traceIs(q,"bar"),re=v.select(Y).select("g.legendpoints").selectAll("path.legend"+ee).data(Q?[V]:[]);re.enter().append("path").classed("legend"+ee,!0).attr("d",j).attr("transform",f),re.exit().remove(),re.each(function(ce){var be=v.select(this),Ae=ce[0],De=R(Ae.mlw,oe.line,p,c);be.style("stroke-width",De+"px");var ze=Ae.mcc;if(!g._inHover&&"mc"in Ae){var Ze=r(oe),at=Ze.mid;at===void 0&&(at=(Ze.max+Ze.min)/2),ze=e.tryColorscale(oe,"")(at)}var nt=ze||Ae.mc||oe.color,rt=oe.pattern,st=e.getPatternAttr,Me=rt&&(st(rt.shape,0,"")||st(rt.path,0,""));if(Me){var ye=st(rt.bgcolor,0,null),he=st(rt.fgcolor,0,null),Oe=rt.fgopacity,tt=_(rt.size,8,10),ot=_(rt.solidity,.5,1),Qe="legend-"+q.uid;be.call(e.pattern,"legend",M,Qe,Me,tt,ot,ze,rt.fillmode,ye,he,Oe)}else be.call(t.fill,nt);De&&t.stroke(be,Ae.mlc||ae.color)})}function U(V){var Y=V[0].trace,ee=v.select(this).select("g.legendpoints").selectAll("path.legendbox").data(Y.visible&&x.traceIs(Y,"box-violin")?[V]:[]);ee.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",f),ee.exit().remove(),ee.each(function(){var q=v.select(this);if((Y.boxpoints==="all"||Y.points==="all")&&t.opacity(Y.fillcolor)===0&&t.opacity((Y.line||{}).color)===0){var oe=S.minExtend(Y,{marker:{size:d?s:S.constrain(Y.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});ee.call(e.pointStyle,oe,M)}else{var ae=R(void 0,Y.line,p,c);q.style("stroke-width",ae+"px").call(t.fill,Y.fillcolor),ae&&t.stroke(q,Y.line.color)}})}function B(V){var Y=V[0].trace,ee=v.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(Y.visible&&Y.type==="candlestick"?[V,V]:[]);ee.enter().append("path").classed("legendcandle",!0).attr("d",function(q,oe){return oe?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",f).style("stroke-miterlimit",1),ee.exit().remove(),ee.each(function(q,oe){var ae=v.select(this),j=Y[oe?"increasing":"decreasing"],Q=R(void 0,j.line,p,c);ae.style("stroke-width",Q+"px").call(t.fill,j.fillcolor),Q&&t.stroke(ae,j.line.color)})}function X(V){var Y=V[0].trace,ee=v.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(Y.visible&&Y.type==="ohlc"?[V,V]:[]);ee.enter().append("path").classed("legendohlc",!0).attr("d",function(q,oe){return oe?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",f).style("stroke-miterlimit",1),ee.exit().remove(),ee.each(function(q,oe){var ae=v.select(this),j=Y[oe?"increasing":"decreasing"],Q=R(void 0,j.line,p,c);ae.style("fill","none").call(e.dashLine,j.line.dash,Q),Q&&t.stroke(ae,j.line.color)})}function $(V){le(V,this,"pie")}function se(V){le(V,this,"funnelarea")}function le(V,Y,ee){var q=V[0],oe=q.trace,ae=ee?oe.visible&&oe.type===ee:x.traceIs(oe,ee),j=v.select(Y).select("g.legendpoints").selectAll("path.legend"+ee).data(ae?[V]:[]);if(j.enter().append("path").classed("legend"+ee,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",f),j.exit().remove(),j.size()){var Q=oe.marker||{},re=R(n(Q.line.width,q.pts),Q.line,p,c),ce="pieLike",be=S.minExtend(oe,{marker:{line:{width:re}}},ce),Ae=S.minExtend(q,{trace:be},ce);a(j,Ae,be,M)}}function fe(V){var Y=V[0].trace,ee,q=[];if(Y.visible)switch(Y.type){case"histogram2d":case"heatmap":q=[["M-15,-2V4H15V-2Z"]],ee=!0;break;case"choropleth":case"choroplethmapbox":case"choroplethmap":q=[["M-6,-6V6H6V-6Z"]],ee=!0;break;case"densitymapbox":case"densitymap":q=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],ee="radial";break;case"cone":q=[["M-6,2 A2,2 0 0,0 -6,6 V6L6,4Z"],["M-6,-6 A2,2 0 0,0 -6,-2 L6,-4Z"],["M-6,-2 A2,2 0 0,0 -6,2 L6,0Z"]],ee=!1;break;case"streamtube":q=[["M-6,2 A2,2 0 0,0 -6,6 H6 A2,2 0 0,1 6,2 Z"],["M-6,-6 A2,2 0 0,0 -6,-2 H6 A2,2 0 0,1 6,-6 Z"],["M-6,-2 A2,2 0 0,0 -6,2 H6 A2,2 0 0,1 6,-2 Z"]],ee=!1;break;case"surface":q=[["M-6,-6 A2,3 0 0,0 -6,0 H6 A2,3 0 0,1 6,-6 Z"],["M-6,1 A2,3 0 0,1 -6,6 H6 A2,3 0 0,0 6,0 Z"]],ee=!0;break;case"mesh3d":q=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],ee=!1;break;case"volume":q=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],ee=!0;break;case"isosurface":q=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],ee=!1;break}var oe=v.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(q);oe.enter().append("path").classed("legend3dandfriends",!0).attr("transform",f).style("stroke-miterlimit",1),oe.exit().remove(),oe.each(function(ae,j){var Q=v.select(this),re=r(Y),ce=re.colorscale,be=re.reversescale,Ae=function(at){if(at.size()){var nt="legendfill-"+Y.uid;e.gradient(at,M,nt,T(be,ee==="radial"),ce,"fill")}},De;if(ce){if(!ee){var Ze=ce.length;De=j===0?ce[be?Ze-1:0][1]:j===1?ce[be?0:Ze-1][1]:ce[Math.floor((Ze-1)/2)][1]}}else{var ze=Y.vertexcolor||Y.facecolor||Y.color;De=S.isArrayOrTypedArray(ze)?ze[j]||ze[0]:ze}Q.attr("d",ae[0]),De?Q.call(t.fill,De):Q.call(Ae)})}};function T(w,A){var M=A?"radial":"horizontal";return M+(w?"":"reversed")}function l(w){var A=w[0].trace,M=A.contours,g=o.hasLines(A),b=o.hasMarkers(A),d=A.visible&&A.fill&&A.fill!=="none",u=!1,y=!1;if(M){var f=M.coloring;f==="lines"?u=!0:g=f==="none"||f==="heatmap"||M.showlines,M.type==="constraint"?d=M._operation!=="=":(f==="fill"||f==="heatmap")&&(y=!0)}return{showMarker:b,showLine:g,showFill:d,showGradientLine:u,showGradientFill:y,anyLine:g||u,anyFill:d||y}}function _(w,A,M){return w&&S.isArrayOrTypedArray(w)?A:w>M?M:w}}}),y5=Xe({"src/components/legend/draw.js"(Z,G){"use strict";var v=Hn(),x=sa(),S=bc(),E=so(),e=Qy(),t=Ap(),r=es(),o=$n(),a=ou(),n=v5().handleItemClick,i=v5().handleTitleClick,s=m5(),h=uh(),c=h.LINE_SPACING,m=h.FROM_TL,p=h.FROM_BR,T=dz(),l=g5(),_=E_(),w=1,A=/^legend[0-9]*$/;G.exports=function(X,$){if($)g(X,$);else{var se=X._fullLayout,le=se._legends,fe=se._infolayer.selectAll('[class^="legend"]');fe.each(function(){var q=v.select(this),oe=q.attr("class"),ae=oe.split(" ")[0];ae.match(A)&&le.indexOf(ae)===-1&&q.remove()});for(var V=0;V1)}var re=se.hiddenlabels||[];if(!Y&&(!se.showlegend||!ee.length))return V.selectAll("."+le).remove(),se._topdefs.select("#"+fe).remove(),S.autoMargin(B,le);var ce=x.ensureSingle(V,"g",le,function(st){Y||st.attr("pointer-events","all")}),be=x.ensureSingleById(se._topdefs,"clipPath",fe,function(st){st.append("rect")}),Ae=x.ensureSingle(ce,"rect","bg",function(st){st.attr("shape-rendering","crispEdges")});Ae.call(o.stroke,$.bordercolor).call(o.fill,$.bgcolor).style("stroke-width",$.borderwidth+"px");var De=x.ensureSingle(ce,"g","scrollbox"),ze=$.title;$._titleWidth=0,$._titleHeight=0;var Ze;ze.text?(Ze=x.ensureSingle(De,"text",le+"titletext"),Ze.attr("text-anchor","start").call(r.font,ze.font).text(ze.text),L(Ze,De,B,$,w),!Y&&($.titleclick||$.titledoubleclick)&&R(De,B,$,le)):(De.selectAll("."+le+"titletext").remove(),De.selectAll("."+le+"titletoggle").remove());var at=x.ensureSingle(ce,"rect","scrollbar",function(st){st.attr(s.scrollBarEnterAttrs).call(o.fill,s.scrollBarColor)}),nt=De.selectAll("g.groups").data(ee);nt.enter().append("g").attr("class","groups"),nt.exit().remove();var rt=nt.selectAll("g.traces").data(x.identity);rt.enter().append("g").attr("class","traces"),rt.exit().remove(),rt.style("opacity",function(st){let Me=st[0],ye=Me.trace;if(Me.groupTitle){let he=ye.legendgroup,Oe=(se.shapes||[]).filter(function(ot){return ot.showlegend});return B._fullData.concat(Oe).some(function(ot){return ot.legendgroup===he&&(ot.legend||"legend")===le&&ot.visible===!0})?1:.5}return E.traceIs(ye,"pie-like")?re.indexOf(st[0].label)!==-1?.5:1:ye.visible==="legendonly"?.5:1}).each(function(){v.select(this).call(u,B,$)}).call(l,B,$).each(function(st){Y||st[0].groupTitle&&$.groupclick==="toggleitem"||v.select(this).call(f,B,le)}),x.syncOrAsync([S.previousPromises,function(){return N(B,nt,rt,$,De)},function(){var st=se._size,Me=$.borderwidth,ye=$.xref==="paper",he=$.yref==="paper";if(ze.text){let ct=(se.shapes||[]).filter(function(Ct){return Ct.showlegend}),_t=B._fullData.concat(ct).some(function(Ct){let ir=Ct.legend||"legend";var rr=Array.isArray(ir)?ir.includes(le):ir===le;return rr&&Ct.visible===!0});Ze.style("opacity",_t?1:.5)}if(!Y){var Oe,tt;ye?Oe=st.l+st.w*$.x-m[P($)]*$._width:Oe=se.width*$.x-m[P($)]*$._width,he?tt=st.t+st.h*(1-$.y)-m[U($)]*$._effHeight:tt=se.height*(1-$.y)-m[U($)]*$._effHeight;var ot=O(B,le,Oe,tt);if(ot)return;if(se.margin.autoexpand){var Qe=Oe,Pt=tt;Oe=ye?x.constrain(Oe,0,se.width-$._width):Qe,tt=he?x.constrain(tt,0,se.height-$._effHeight):Pt,Oe!==Qe&&x.log("Constrain "+le+".x to make legend fit inside graph"),tt!==Pt&&x.log("Constrain "+le+".y to make legend fit inside graph")}r.setTranslate(ce,Oe,tt)}if(at.on(".drag",null),ce.on("wheel",null),Y||$._height<=$._maxHeight||B._context.staticPlot){var It=$._effHeight;Y&&(It=$._height),Ae.attr({width:$._width-Me,height:It-Me,x:Me/2,y:Me/2}),r.setTranslate(De,0,0),be.select("rect").attr({width:$._width-2*Me,height:It-2*Me,x:Me,y:Me}),r.setClipUrl(De,fe,B),r.setRect(at,0,0,0,0),delete $._scrollY}else{var qt=Math.max(s.scrollBarMinHeight,$._effHeight*$._effHeight/$._height),Wt=$._effHeight-qt-2*s.scrollBarMargin,kr=$._height-$._effHeight,mr=Wt/kr,qr=Math.min($._scrollY||0,kr);Ae.attr({width:$._width-2*Me+s.scrollBarWidth+s.scrollBarMargin,height:$._effHeight-Me,x:Me/2,y:Me/2}),be.select("rect").attr({width:$._width-2*Me+s.scrollBarWidth+s.scrollBarMargin,height:$._effHeight-2*Me,x:Me,y:Me+qr}),r.setClipUrl(De,fe,B),Ve(qr,qt,mr),ce.on("wheel",function(){qr=x.constrain($._scrollY+v.event.deltaY/kr*Wt,0,kr),Ve(qr,qt,mr),qr!==0&&qr!==kr&&v.event.preventDefault()});var Sr,Rr,wt,Ne=function(ct,_t,Ct){var ir=(Ct-_t)/mr+ct;return x.constrain(ir,0,kr)},Ke=function(ct,_t,Ct){var ir=(_t-Ct)/mr+ct;return x.constrain(ir,0,kr)},Te=v.behavior.drag().on("dragstart",function(){var ct=v.event.sourceEvent;ct.type==="touchstart"?Sr=ct.changedTouches[0].clientY:Sr=ct.clientY,wt=qr}).on("drag",function(){var ct=v.event.sourceEvent;ct.buttons===2||ct.ctrlKey||(ct.type==="touchmove"?Rr=ct.changedTouches[0].clientY:Rr=ct.clientY,qr=Ne(wt,Sr,Rr),Ve(qr,qt,mr))});at.call(Te);var Ie=v.behavior.drag().on("dragstart",function(){var ct=v.event.sourceEvent;ct.type==="touchstart"&&(Sr=ct.changedTouches[0].clientY,wt=qr)}).on("drag",function(){var ct=v.event.sourceEvent;ct.type==="touchmove"&&(Rr=ct.changedTouches[0].clientY,qr=Ke(wt,Sr,Rr),Ve(qr,qt,mr))});De.call(Ie)}function Ve(ct,_t,Ct){$._scrollY=B._fullLayout[le]._scrollY=ct,r.setTranslate(De,0,-ct),r.setRect(at,$._width,s.scrollBarMargin+ct*Ct,s.scrollBarWidth,_t),be.select("rect").attr("y",Me+ct)}if(B._context.edits.legendPosition){var Ce,Ee,Pe,ft;ce.classed("cursor-move",!0),t.init({element:ce.node(),gd:B,prepFn:function(ct){if(ct.target!==at.node()){var _t=r.getTranslate(ce);Pe=_t.x,ft=_t.y}},moveFn:function(ct,_t){if(Pe!==void 0&&ft!==void 0){var Ct=Pe+ct,ir=ft+_t;r.setTranslate(ce,Ct,ir),Ce=t.align(Ct,$._width,st.l,st.l+st.w,$.xanchor),Ee=t.align(ir+$._height,-$._height,st.t+st.h,st.t,$.yanchor)}},doneFn:function(){if(Ce!==void 0&&Ee!==void 0){var ct={};ct[le+".x"]=Ce,ct[le+".y"]=Ee,E.call("_guiRelayout",B,ct)}},clickFn:function(ct,_t){var Ct=V.selectAll("g.traces").filter(function(){var ir=this.getBoundingClientRect();return _t.clientX>=ir.left&&_t.clientX<=ir.right&&_t.clientY>=ir.top&&_t.clientY<=ir.bottom});Ct.size()>0&&d(B,$,Ct,ct,_t)}})}}],B)}}function b(B,X,$){var se=B[0],le=se.width,fe=X.entrywidthmode,V=se.trace.legendwidth||X.entrywidth;return fe==="fraction"?X._maxWidth*V:$+(V||le)}function d(B,X,$,se,le){var fe=B._fullLayout,V=$.data()[0][0].trace,Y=X.itemclick,ee=X.itemdoubleclick,q={event:le,node:$.node(),curveNumber:V.index,expandedIndex:V.index,data:B.data,layout:B.layout,frames:B._transitionData._frames,config:B._context,fullData:B._fullData,fullLayout:fe};V._group&&(q.group=V._group),E.traceIs(V,"pie-like")&&(q.label=$.datum()[0].label);var oe=e.triggerHandler(B,"plotly_legendclick",q);if(se===1){if(oe===!1)return;X._clickTimeout=setTimeout(function(){B._fullLayout&&Y&&n($,B,X,Y)},B._context.doubleClickDelay)}else if(se===2){X._clickTimeout&&clearTimeout(X._clickTimeout),B._legendMouseDownTime=0;var ae=e.triggerHandler(B,"plotly_legenddoubleclick",q);ae!==!1&&oe!==!1&&ee&&n($,B,X,ee)}}function u(B,X,$){var se=_.getId($),le=B.data()[0][0],fe=le.trace,V=E.traceIs(fe,"pie-like"),Y=!$._inHover&&X._context.edits.legendText&&!V,ee=$._maxNameLength,q,oe;le.groupTitle?(q=le.groupTitle.text,oe=le.groupTitle.font):(oe=$.font,$.entries?q=le.text:(q=V?le.label:fe.name,fe._meta&&(q=x.templateString(q,fe._meta))));var ae=x.ensureSingle(B,"text",se+"text");ae.attr("text-anchor","start").call(r.font,oe).text(Y?y(q,ee):q);var j=$.indentation+$.itemwidth+s.itemGap*2;a.positionText(ae,j,0),Y?ae.call(a.makeEditable,{gd:X,text:q}).call(L,B,X,$).on("edit",function(Q){this.text(y(Q,ee)).call(L,B,X,$);var re=le.trace._fullInput||{},ce={};return ce.name=Q,re._isShape?E.call("_guiRelayout",X,"shapes["+fe.index+"].name",ce.name):E.call("_guiRestyle",X,ce,fe.index)}):L(ae,B,X,$)}function y(B,X){var $=Math.max(4,X);if(B&&B.trim().length>=$/2)return B;B=B||"";for(var se=$-B.length;se>0;se--)B+=" ";return B}function f(B,X,$){var se=X._context.doubleClickDelay,le,fe=1,V=x.ensureSingle(B,"rect",$+"toggle",function(Y){X._context.staticPlot||Y.style("cursor","pointer").attr("pointer-events","all"),Y.call(o.fill,"rgba(0,0,0,0)")});X._context.staticPlot||(V.on("mousedown",function(){le=new Date().getTime(),le-X._legendMouseDownTimese&&(fe=Math.max(fe-1,1)),d(X,Y,B,fe,v.event)}}))}function R(B,X,$,se){if(X._fullData.some(function(q){let oe=q.legend||"legend";return(Array.isArray(oe)?oe.includes(se):oe===se)&&E.traceIs(q,"pie-like")}))return;let fe=X._context.doubleClickDelay;var V,Y=1;let ee=x.ensureSingle(B,"rect",se+"titletoggle",function(q){X._context.staticPlot||q.style("cursor","pointer").attr("pointer-events","all"),q.call(o.fill,"rgba(0,0,0,0)")});X._context.staticPlot||(ee.on("mousedown",function(){V=new Date().getTime(),V-X._legendMouseDownTimefe&&(Y=Math.max(Y-1,1));let q={event:v.event,legendId:se,data:X.data,layout:X.layout,fullData:X._fullData,fullLayout:X._fullLayout};if(Y===1&&$.titleclick){if(e.triggerHandler(X,"plotly_legendtitleclick",q)===!1)return;$._titleClickTimeout=setTimeout(function(){X._fullLayout&&i(X,$,$.titleclick)},fe)}else Y===2&&($._titleClickTimeout&&clearTimeout($._titleClickTimeout),X._legendMouseDownTime=0,e.triggerHandler(X,"plotly_legendtitledoubleclick",q)!==!1&&$.titledoubleclick&&i(X,$,$.titledoubleclick))}))}function L(B,X,$,se,le){se._inHover&&B.attr("data-notex",!0),a.convertToTspans(B,$,function(){z(X,$,se,le)})}function z(B,X,$,se){var le=B.data()[0][0],fe=le&&le.trace.showlegend;if(Array.isArray(fe)&&(fe=fe[le.i]!==!1),!$._inHover&&le&&!fe){B.remove();return}var V=B.select("g[class*=math-group]"),Y=V.node(),ee=_.getId($);$||($=X._fullLayout[ee]);var q=$.borderwidth,oe;se===w?oe=$.title.font:le.groupTitle?oe=le.groupTitle.font:oe=$.font;var ae=oe.size*c,j,Q;if(Y){var re=r.bBox(Y);j=re.height,Q=re.width,se===w?r.setTranslate(V,q,q+j*.75):r.setTranslate(V,0,j*.25)}else{var ce="."+ee+(se===w?"title":"")+"text",be=B.select(ce),Ae=a.lineCount(be),De=be.node();if(j=ae*Ae,Q=De?r.bBox(De).width:0,se===w)$.title.side==="left"&&(Q+=s.itemGap*2),a.positionText(be,q+s.titlePad,q+ae);else{var ze=s.itemGap*2+$.indentation+$.itemwidth;le.groupTitle&&(ze=s.itemGap,Q-=$.indentation+$.itemwidth),a.positionText(be,ze,-ae*((Ae-1)/2-.3))}}se===w?($._titleWidth=Q,$._titleHeight=j):(le.lineHeight=ae,le.height=Math.max(j,16)+3,le.width=Q)}function F(B){var X=0,$=0,se=B.title.side;return se&&(se.indexOf("left")!==-1&&(X=B._titleWidth),se.indexOf("top")!==-1&&($=B._titleHeight)),[X,$]}function N(B,X,$,se,le){var fe=B._fullLayout,V=_.getId(se);se||(se=fe[V]);var Y=fe._size,ee=_.isVertical(se),q=_.isGrouped(se),oe=se.entrywidthmode==="fraction",ae=se.borderwidth,j=2*ae,Q=s.itemGap,re=se.indentation+se.itemwidth+Q*2,ce=2*(ae+Q),be=U(se),Ae=se.y<0||se.y===0&&be==="top",De=se.y>1||se.y===1&&be==="bottom",ze=se.tracegroupgap,Ze={};let{orientation:at,yref:nt}=se,{maxheight:rt}=se,st=Ae||De||at!=="v"||nt!=="paper";rt||(rt=st?.5:1);let Me=st?fe.height:Y.h;se._maxHeight=Math.max(rt>1?rt:rt*Me,30);var ye=0;se._width=0,se._height=0;var he=F(se);if(ee)$.each(function(ct){var _t=ct[0].height;r.setTranslate(this,ae+he[0],ae+he[1]+se._height+_t/2+Q),se._height+=_t,se._width=Math.max(se._width,ct[0].width)}),ye=re+se._width,se._width+=Q+re+j,se._height+=ce,q&&(X.each(function(ct,_t){r.setTranslate(this,0,_t*se.tracegroupgap)}),se._height+=(se._lgroupsLength-1)*se.tracegroupgap);else{var Oe=P(se),tt=se.x<0||se.x===0&&Oe==="right",ot=se.x>1||se.x===1&&Oe==="left",Qe=De||Ae,Pt=fe.width/2;se._maxWidth=Math.max(tt?Qe&&Oe==="left"?Y.l+Y.w:Pt:ot?Qe&&Oe==="right"?Y.r+Y.w:Pt:Y.w,2*re);var It=0,qt=0;$.each(function(ct){var _t=b(ct,se,re);It=Math.max(It,_t),qt+=_t}),ye=null;var Wt=0;if(q){var kr=0,mr=0,qr=0;X.each(function(){var ct=0,_t=0;v.select(this).selectAll("g.traces").each(function(ir){var rr=b(ir,se,re),er=ir[0].height;r.setTranslate(this,he[0],he[1]+ae+Q+er/2+_t),_t+=er,ct=Math.max(ct,rr),Ze[ir[0].trace.legendgroup]=ct});var Ct=ct+Q;mr>0&&Ct+ae+mr>se._maxWidth?(Wt=Math.max(Wt,mr),mr=0,qr+=kr+ze,kr=_t):kr=Math.max(kr,_t),r.setTranslate(this,mr,qr),mr+=Ct}),se._width=Math.max(Wt,mr)+ae,se._height=qr+kr+ce}else{var Sr=$.size(),Rr=qt+j+(Sr-1)*Q=se._maxWidth&&(Wt=Math.max(Wt,Te),Ne=0,Ke+=wt,se._height+=wt,wt=0),r.setTranslate(this,he[0]+ae+Ne,he[1]+ae+Ke+_t/2+Q),Te=Ne+Ct+Q,Ne+=ir,wt=Math.max(wt,_t)}),Rr?(se._width=Ne+j,se._height=wt+ce):(se._width=Math.max(Wt,Te)+j,se._height+=wt+ce)}}se._width=Math.ceil(Math.max(se._width+he[0],se._titleWidth+2*(ae+s.titlePad))),se._height=Math.ceil(Math.max(se._height+he[1],se._titleHeight+2*(ae+s.itemGap))),se._effHeight=Math.min(se._height,se._maxHeight);var Ie=B._context.edits,Ve=Ie.legendText||Ie.legendPosition;$.each(function(ct){var _t=v.select(this).select("."+V+"toggle"),Ct=ct[0].height,ir=ct[0].trace.legendgroup,rr=b(ct,se,re);q&&ir!==""&&(rr=Ze[ir]);var er=Ve?re:ye||rr;!ee&&!oe&&(er+=Q/2),r.setRect(_t,0,-Ct/2,er,Ct)});var Ce=le.select("."+V+"titletext");Ce.node()&&M(Ce,se,ae);var Ee=le.select("."+V+"titletoggle");if(Ee.size()&&Ce.node()){var Pe=Ce.attr("x")||0,ft=s.titlePad;r.setRect(Ee,Pe-ft,ae,se._titleWidth+2*ft,se._titleHeight+2*ft)}}function O(B,X,$,se){var le=B._fullLayout,fe=le[X],V=P(fe),Y=U(fe),ee=fe.xref==="paper",q=fe.yref==="paper";B._fullLayout._reservedMargin[X]={};var oe=fe.y<.5?"b":"t",ae=fe.x<.5?"l":"r",j={r:le.width-$,l:$+fe._width,b:le.height-se,t:se+fe._effHeight};if(ee&&q)return S.autoMargin(B,X,{x:fe.x,y:fe.y,l:fe._width*m[V],r:fe._width*p[V],b:fe._effHeight*p[Y],t:fe._effHeight*m[Y]});ee?B._fullLayout._reservedMargin[X][oe]=j[oe]:q||fe.orientation==="v"?B._fullLayout._reservedMargin[X][ae]=j[ae]:B._fullLayout._reservedMargin[X][oe]=j[oe]}function P(B){return x.isRightAnchor(B)?"right":x.isCenterAnchor(B)?"center":"left"}function U(B){return x.isBottomAnchor(B)?"bottom":x.isMiddleAnchor(B)?"middle":"top"}}}),_5=Xe({"src/components/fx/hover.js"(Z){"use strict";var G=Hn(),v=rs(),x=Ch(),S=sa(),E=S.pushUnique,e=S.strTranslate,t=S.strRotate,r=Qy(),o=ou(),a=pz(),n=es(),i=$n(),s=Ap(),h=Go(),c=lh().zindexSeparator,m=so(),p=$p(),T=w_(),l=d5(),_=y5(),w=T.YANGLE,A=Math.PI*w/180,M=1/Math.sin(A),g=Math.cos(A),b=Math.sin(A),d=T.HOVERARROWSIZE,u=T.HOVERTEXTPAD,y={box:!0,ohlc:!0,violin:!0,candlestick:!0},f={scatter:!0,scattergl:!0,splom:!0};function R(j,Q){return j.distance-Q.distance}Z.hover=function(Q,re,ce,be){Q=S.getGraphDiv(Q);var Ae=re.target;S.throttle(Q._fullLayout._uid+T.HOVERID,T.HOVERMINTIME,function(){L(Q,re,ce,be,Ae)})},Z.loneHover=function(Q,re){var ce=!0;Array.isArray(Q)||(ce=!1,Q=[Q]);var be=re.gd,Ae=q(be),De=oe(be),ze=Q.map(function(Oe){var tt=Oe._x0||Oe.x0||Oe.x||0,ot=Oe._x1||Oe.x1||Oe.x||0,Qe=Oe._y0||Oe.y0||Oe.y||0,Pt=Oe._y1||Oe.y1||Oe.y||0,It=Oe.eventData;if(It){var qt=Math.min(tt,ot),Wt=Math.max(tt,ot),kr=Math.min(Qe,Pt),mr=Math.max(Qe,Pt),qr=Oe.trace;if(m.traceIs(qr,"gl3d")){var Sr=be._fullLayout[qr.scene]._scene.container,Rr=Sr.offsetLeft,wt=Sr.offsetTop;qt+=Rr,Wt+=Rr,kr+=wt,mr+=wt}It.bbox={x0:qt+De,x1:Wt+De,y0:kr+Ae,y1:mr+Ae},re.inOut_bbox&&re.inOut_bbox.push(It.bbox)}else It=!1;return{color:Oe.color||i.defaultLine,x0:Oe.x0||Oe.x||0,x1:Oe.x1||Oe.x||0,y0:Oe.y0||Oe.y||0,y1:Oe.y1||Oe.y||0,xLabel:Oe.xLabel,yLabel:Oe.yLabel,zLabel:Oe.zLabel,text:Oe.text,name:Oe.name,idealAlign:Oe.idealAlign,borderColor:Oe.borderColor,fontFamily:Oe.fontFamily,fontSize:Oe.fontSize,fontColor:Oe.fontColor,fontWeight:Oe.fontWeight,fontStyle:Oe.fontStyle,fontVariant:Oe.fontVariant,nameLength:Oe.nameLength,textAlign:Oe.textAlign,trace:Oe.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:Oe.hovertemplate||!1,hovertemplateLabels:Oe.hovertemplateLabels||!1,eventData:It}}),Ze=!1,at=N(ze,{gd:be,hovermode:"closest",rotateLabels:Ze,bgColor:re.bgColor||i.background,container:G.select(re.container),outerContainer:re.outerContainer||re.container}),nt=at.hoverLabels,rt=5,st=0,Me=0;nt.sort(function(Oe,tt){return Oe.y0-tt.y0}).each(function(Oe,tt){var ot=Oe.y0-Oe.by/2;ot-rtWt[0]._length||Wa<0||Wa>kr[0]._length)return s.unhoverRaw(j,Q)}if(Q.pointerX=qa+Wt[0]._offset,Q.pointerY=Wa+kr[0]._offset,"xval"in Q?Te=p.flat(Ae,Q.xval):Te=p.p2c(Wt,qa),"yval"in Q?Ie=p.flat(Ae,Q.yval):Ie=p.p2c(kr,Wa),!v(Te[0])||!v(Ie[0]))return S.warn("Fx.hover failed",Q,j),s.unhoverRaw(j,Q)}var wi=1/0;function Kt(cn,lo){for(Ce=0;Ceer&&(Ne.splice(0,er),wi=Ne[0].distance),rt&&wt!==0&&Ne.length===0){rr.distance=wt,rr.index=!1;var No=Pe._module.hoverPoints(rr,Ct,ir,"closest",{hoverLayer:ze._hoverlayer});if(No&&(No=No.filter(function(Xn){return Xn.spikeDistance<=wt})),No&&No.length){var as,Ns=No.filter(function(Xn){return Xn.xa.showspikes&&Xn.xa.spikesnap!=="hovered data"});if(Ns.length){var ss=Ns[0];v(ss.x0)&&v(ss.y0)&&(as=Yt(ss),(!Lr.vLinePoint||Lr.vLinePoint.spikeDistance>as.spikeDistance)&&(Lr.vLinePoint=as))}var uo=No.filter(function(Xn){return Xn.ya.showspikes&&Xn.ya.spikesnap!=="hovered data"});if(uo.length){var jn=uo[0];v(jn.x0)&&v(jn.y0)&&(as=Yt(jn),(!Lr.hLinePoint||Lr.hLinePoint.spikeDistance>as.spikeDistance)&&(Lr.hLinePoint=as))}}}}}Kt();function Ft(cn,lo,Wo){for(var hs=null,Oo=1/0,Wn,No=0;Nocn.trace.index===tn.trace.index):Ne=[tn];var on=Ne.length,hn=ee("x",tn,ze),Tt=ee("y",tn,ze);Kt(hn,Tt);var ut=[],Br={},Cr=0,xr=function(cn){var lo=y[cn.trace.type]?z(cn):cn.trace.index;if(!Br[lo])Cr++,Br[lo]=Cr,ut.push(cn);else{var Wo=Br[lo]-1,hs=ut[Wo];Wo>0&&Math.abs(cn.distance)on-1;Ir--)xr(Ne[Ir]);Ne=ut,ra()}var Ur=j._hoverdata,Hr=[],xt=q(j),Xt=oe(j);for(let cn of Ne){var vr=p.makeEventData(cn,cn.trace,cn.cd);if(cn.hovertemplate!==!1){var Or=!1;cn.cd[cn.index]&&cn.cd[cn.index].ht&&(Or=cn.cd[cn.index].ht),cn.hovertemplate=Or||cn.trace.hovertemplate||!1}if(cn.xa&&cn.ya){var ba=cn.x0+cn.xa._offset,Pa=cn.x1+cn.xa._offset,ya=cn.y0+cn.ya._offset,la=cn.y1+cn.ya._offset,Ta=Math.min(ba,Pa),Ai=Math.max(ba,Pa),ki=Math.min(ya,la),Ki=Math.max(ya,la);vr.bbox={x0:Ta+Xt,x1:Ai+Xt,y0:ki+xt,y1:Ki+xt}}cn.eventData=[vr],Hr.push(vr)}j._hoverdata=Hr;var _n=st==="y"&&(Ke.length>1||Ne.length>1)||st==="closest"&&fa&&Ne.length>1,Rn=i.combine(ze.plot_bgcolor||i.background,ze.paper_bgcolor),En=N(Ne,{gd:j,hovermode:st,rotateLabels:_n,bgColor:Rn,container:ze._hoverlayer,outerContainer:ze._paper.node(),commonLabelOpts:ze.hoverlabel,hoverdistance:ze.hoverdistance}),On=En.hoverLabels;if(p.isUnifiedHover(st)||(P(On,_n,ze,En.commonLabelBoundingBox),X(On,_n,ze._invScaleX,ze._invScaleY)),be&&be.tagName){var no=m.getComponentMethod("annotations","hasClickToShow")(j,Hr);a(G.select(be),no?"pointer":"")}!be||ce||!le(j,Q,Ur)||(Ur&&j.emit("plotly_unhover",{event:Q,points:Ur}),j.emit("plotly_hover",{event:Q,points:j._hoverdata,xaxes:Wt,yaxes:kr,xvals:Te,yvals:Ie}))}function z(j){return[j.trace.index,j.index,j.x0,j.y0,j.name,j.attr,j.xa?j.xa._id:"",j.ya?j.ya._id:""].join(",")}var F=/([\s\S]*)<\/extra>/;function N(j,Q){var re=Q.gd,ce=re._fullLayout,be=Q.hovermode,Ae=Q.rotateLabels,De=Q.bgColor,ze=Q.container,Ze=Q.outerContainer,at=Q.commonLabelOpts||{};if(j.length===0)return[[]];var nt=Q.fontFamily||T.HOVERFONT,rt=Q.fontSize||T.HOVERFONTSIZE,st=Q.fontWeight||ce.font.weight,Me=Q.fontStyle||ce.font.style,ye=Q.fontVariant||ce.font.variant,he=Q.fontTextcase||ce.font.textcase,Oe=Q.fontLineposition||ce.font.lineposition,tt=Q.fontShadow||ce.font.shadow,ot=j[0],Qe=ot.xa,Pt=ot.ya,It=be.charAt(0),qt=It+"Label",Wt=ot[qt];if(Wt===void 0&&Qe.type==="multicategory")for(var kr=0;krce.width-xt&&(Xt=ce.width-xt),tn.attr("d","M"+(Ir-Xt)+",0L"+(Ir-Xt+d)+","+Hr+d+"H"+xt+"v"+Hr+(u*2+xr.height)+"H"+-xt+"V"+Hr+d+"H"+(Ir-Xt-d)+"Z"),Ir=Xt,Ce.minX=Ir-xt,Ce.maxX=Ir+xt,Qe.side==="top"?(Ce.minY=Ur-(u*2+xr.height),Ce.maxY=Ur-u):(Ce.minY=Ur+u,Ce.maxY=Ur+(u*2+xr.height))}else{var vr,Or,ba;Pt.side==="right"?(vr="start",Or=1,ba="",Ir=Qe._offset+Qe._length):(vr="end",Or=-1,ba="-",Ir=Qe._offset),Ur=Pt._offset+(ot.y0+ot.y1)/2,on.attr("text-anchor",vr),tn.attr("d","M0,0L"+ba+d+","+d+"V"+(u+xr.height/2)+"h"+ba+(u*2+xr.width)+"V-"+(u+xr.height/2)+"H"+ba+d+"V-"+d+"Z"),Ce.minY=Ur-(u+xr.height/2),Ce.maxY=Ur+(u+xr.height/2),Pt.side==="right"?(Ce.minX=Ir+d,Ce.maxX=Ir+d+(u*2+xr.width)):(Ce.minX=Ir-d-(u*2+xr.width),Ce.maxX=Ir-d);var Pa=xr.height/2,ya=qr-xr.top-Pa,la="clip"+ce._uid+"commonlabel"+Pt._id,Ta;if(Irtn.hoverinfo!=="none");if(Ra.length===0)return[];var Ee=ce.hoverlabel,Pe=Ee.font,ft=Ra[0],ct=((be==="x unified"?ft.xa:ft.ya).unifiedhovertitle||{}).text,_t=ct?S.hovertemplateString({data:be==="x unified"?[{xa:ft.xa,x:ft.xVal}]:[{ya:ft.ya,y:ft.yVal}],fallback:ft.trace.hovertemplatefallback,locale:ce._d3locale,template:ct}):Wt,Ct={showlegend:!0,legend:{title:{text:_t,font:Pe},font:Pe,bgcolor:Ee.bgcolor,bordercolor:Ee.bordercolor,borderwidth:1,tracegroupgap:7,traceorder:ce.legend?ce.legend.traceorder:void 0,orientation:"v"}},ir={font:Pe};l(Ct,ir,re._fullData);var rr=ir.legend;rr.entries=[];for(var er=0;er=0?Za=ra:ca+hi=0?Za=ca:Ba+hi=0?ri=Fr:ta+wi=0?ri=ta:$a+wi=0,(Ra.idealAlign==="top"||!Ki)&&_n?(ba-=ya/2,Ra.anchor="end"):Ki?(ba+=ya/2,Ra.anchor="start"):Ra.anchor="middle",Ra.crossPos=ba;else{if(Ra.pos=ba,Ki=Or+Pa/2+ki<=Sr,_n=Or-Pa/2-ki>=0,(Ra.idealAlign==="left"||!Ki)&&_n)Or-=Pa/2,Ra.anchor="end";else if(Ki)Or+=Pa/2,Ra.anchor="start";else{Ra.anchor="middle";var Rn=ki/2,En=Or+Rn-Sr,On=Or-Rn;En>0&&(Or-=En),On<0&&(Or+=-On)}Ra.crossPos=Or}Ur.attr("text-anchor",Ra.anchor),xt&&Hr.attr("text-anchor",Ra.anchor),tn.attr("transform",e(Or,ba)+(Ae?t(w):""))}),{hoverLabels:pi,commonLabelBoundingBox:Ce}}function O(j,Q,re,ce,be,Ae){var De,ze,Ze="",at="";j.nameOverride!==void 0&&(j.name=j.nameOverride),j.name&&(j.trace._meta&&(j.name=S.templateString(j.name,j.trace._meta)),Ze=V(j.name,j.nameLength));var nt=re.charAt(0),rt=nt==="x"?"y":"x";j.zLabel!==void 0?(j.xLabel!==void 0&&(at+="x: "+j.xLabel+"
"),j.yLabel!==void 0&&(at+="y: "+j.yLabel+"
"),j.trace.type!=="choropleth"&&j.trace.type!=="choroplethmapbox"&&j.trace.type!=="choroplethmap"&&(at+=(at?"z: ":"")+j.zLabel)):Q&&j[nt+"Label"]===be?at=j[rt+"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),Ae&&at===""&&!j.hovertemplate&&(Ze===""&&Ae.remove(),at=Ze),(ze=(De=j.trace)==null?void 0:De.hoverlabel)!=null&&ze.split&&(j.hovertemplate="");let{hovertemplate:st=!1}=j;if(st){let Me=j.hovertemplateLabels||j;j[nt+"Label"]!==be&&(Me[nt+"other"]=Me[nt+"Val"],Me[nt+"otherLabel"]=Me[nt+"Label"]),at=S.hovertemplateString({data:[j.eventData[0]||{},j.trace._meta],fallback:j.trace.hovertemplatefallback,labels:Me,locale:ce._d3locale,template:st}),at=at.replace(F,(ye,he)=>(Ze=V(he,j.nameLength),""))}return[at,Ze]}function P(j,Q,re,ce){var be=Q?"xa":"ya",Ae=Q?"ya":"xa",De=0,ze=1,Ze=j.size(),at=new Array(Ze),nt=0,rt=ce.minX,st=ce.maxX,Me=ce.minY,ye=ce.maxY,he=function(Te){return Te*re._invScaleX},Oe=function(Te){return Te*re._invScaleY};j.each(function(Te){var Ie=Te[be],Ve=Te[Ae],Ce=Ie._id.charAt(0)==="x",Ee=Ie.range;nt===0&&Ee&&Ee[0]>Ee[1]!==Ce&&(ze=-1);var Pe=0,ft=Ce?re.width:re.height;if(re.hovermode==="x"||re.hovermode==="y"){var ct=U(Te,Q),_t=Te.anchor,Ct=_t==="end"?-1:1,ir,rr;if(_t==="middle")ir=Te.crossPos+(Ce?Oe(ct.y-Te.by/2):he(Te.bx/2+Te.tx2width/2)),rr=ir+(Ce?Oe(Te.by):he(Te.bx));else if(Ce)ir=Te.crossPos+Oe(d+ct.y)-Oe(Te.by/2-d),rr=ir+Oe(Te.by);else{var er=he(Ct*d+ct.x),Lr=er+he(Ct*Te.bx);ir=Te.crossPos+Math.min(er,Lr),rr=Te.crossPos+Math.max(er,Lr)}Ce?Me!==void 0&&ye!==void 0&&Math.min(rr,ye)-Math.max(ir,Me)>1&&(Ve.side==="left"?(Pe=Ve._mainLinePosition,ft=re.width):ft=Ve._mainLinePosition):rt!==void 0&&st!==void 0&&Math.min(rr,st)-Math.max(ir,rt)>1&&(Ve.side==="top"?(Pe=Ve._mainLinePosition,ft=re.height):ft=Ve._mainLinePosition)}at[nt++]=[{datum:Te,traceIndex:Te.trace.index,dp:0,pos:Te.pos,posref:Te.posref,size:Te.by*(Ce?M:1)/2,pmin:Pe,pmax:ft}]}),at.sort(function(Te,Ie){return Te[0].posref-Ie[0].posref||ze*(Ie[0].traceIndex-Te[0].traceIndex)});var tt,ot,Qe,Pt,It,qt,Wt;function kr(Te){var Ie=Te[0],Ve=Te[Te.length-1];if(ot=Ie.pmin-Ie.pos-Ie.dp+Ie.size,Qe=Ve.pos+Ve.dp+Ve.size-Ie.pmax,ot>.01){for(It=Te.length-1;It>=0;It--)Te[It].dp+=ot;tt=!1}if(!(Qe<.01)){if(ot<-.01){for(It=Te.length-1;It>=0;It--)Te[It].dp-=Qe;tt=!1}if(tt){var Ce=0;for(Pt=0;PtIe.pmax&&Ce++;for(Pt=Te.length-1;Pt>=0&&!(Ce<=0);Pt--)qt=Te[Pt],qt.pos>Ie.pmax-1&&(qt.del=!0,Ce--);for(Pt=0;Pt=0;It--)Te[It].dp-=Qe;for(Pt=Te.length-1;Pt>=0&&!(Ce<=0);Pt--)qt=Te[Pt],qt.pos+qt.dp+qt.size>Ie.pmax&&(qt.del=!0,Ce--)}}}for(;!tt&&De<=Ze;){for(De++,tt=!0,Pt=0;Pt.01){for(It=qr.length-1;It>=0;It--)qr[It].dp+=ot;for(mr.push.apply(mr,qr),at.splice(Pt+1,1),Wt=0,It=mr.length-1;It>=0;It--)Wt+=mr[It].dp;for(Qe=Wt/mr.length,It=mr.length-1;It>=0;It--)mr[It].dp-=Qe;tt=!1}else Pt++}at.forEach(kr)}for(Pt=at.length-1;Pt>=0;Pt--){var wt=at[Pt];for(It=wt.length-1;It>=0;It--){var Ne=wt[It],Ke=Ne.datum;Ke.offset=Ne.dp,Ke.del=Ne.del}}}function U(j,Q){var re=0,ce=j.offset;return Q&&(ce*=-b,re=j.offset*g),{x:re,y:ce}}function B(j){var Q={start:1,end:-1,middle:0}[j.anchor],re=Q*(d+u),ce=re+Q*(j.txwidth+u),be=j.anchor==="middle";return be&&(re-=j.tx2width/2,ce+=j.txwidth/2+u),{alignShift:Q,textShiftX:re,text2ShiftX:ce}}function X(j,Q,re,ce){var be=function(De){return De*re},Ae=function(De){return De*ce};j.each(function(De){var ze=G.select(this);if(De.del)return ze.remove();var Ze=ze.select("text.nums"),at=De.anchor,nt=at==="end"?-1:1,rt=B(De),st=U(De,Q),Me=st.x,ye=st.y,he=at==="middle",Oe="hoverlabel"in De.trace?De.trace.hoverlabel.showarrow:!0,tt;he?tt="M-"+be(De.bx/2+De.tx2width/2)+","+Ae(ye-De.by/2)+"h"+be(De.bx)+"v"+Ae(De.by)+"h-"+be(De.bx)+"Z":Oe?tt="M0,0L"+be(nt*d+Me)+","+Ae(d+ye)+"v"+Ae(De.by/2-d)+"h"+be(nt*De.bx)+"v-"+Ae(De.by)+"H"+be(nt*d+Me)+"V"+Ae(ye-d)+"Z":tt="M"+be(nt*d+Me)+","+Ae(ye-De.by/2)+"h"+be(nt*De.bx)+"v"+Ae(De.by)+"h"+be(-nt*De.bx)+"Z",ze.select("path").attr("d",tt);var ot=Me+rt.textShiftX,Qe=ye+De.ty0-De.by/2+u,Pt=De.textAlign||"auto";Pt!=="auto"&&(Pt==="left"&&at!=="start"?(Ze.attr("text-anchor","start"),ot=he?-De.bx/2-De.tx2width/2+u:-De.bx-u):Pt==="right"&&at!=="end"&&(Ze.attr("text-anchor","end"),ot=he?De.bx/2-De.tx2width/2-u:De.bx+u)),Ze.call(o.positionText,be(ot),Ae(Qe)),De.tx2width&&(ze.select("text.name").call(o.positionText,be(rt.text2ShiftX+rt.alignShift*u+Me),Ae(ye+De.ty0-De.by/2+u)),ze.select("rect").call(n.setRect,be(rt.text2ShiftX+(rt.alignShift-1)*De.tx2width/2+Me),Ae(ye-De.by/2-1),be(De.tx2width),Ae(De.by+2)))})}function $(j,Q){var re=j.index,ce=j.trace||{},be=j.cd[0],Ae=j.cd[re]||{};function De(st){return st||v(st)&&st===0}var ze=Array.isArray(re)?function(st,Me){var ye=S.castOption(be,re,st);return De(ye)?ye:S.extractOption({},ce,"",Me)}:function(st,Me){return S.extractOption(Ae,ce,st,Me)};function Ze(st,Me,ye){var he=ze(Me,ye);De(he)&&(j[st]=he)}if(Ze("hoverinfo","hi","hoverinfo"),Ze("bgcolor","hbg","hoverlabel.bgcolor"),Ze("borderColor","hbc","hoverlabel.bordercolor"),Ze("fontFamily","htf","hoverlabel.font.family"),Ze("fontSize","hts","hoverlabel.font.size"),Ze("fontColor","htc","hoverlabel.font.color"),Ze("fontWeight","htw","hoverlabel.font.weight"),Ze("fontStyle","hty","hoverlabel.font.style"),Ze("fontVariant","htv","hoverlabel.font.variant"),Ze("nameLength","hnl","hoverlabel.namelength"),Ze("textAlign","hta","hoverlabel.align"),j.posref=Q==="y"||Q==="closest"&&ce.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,ce.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,ce.yhoverformat),j.yVal=j.ya.c2d(j.yLabelVal)),j.zLabelVal!==void 0&&j.zLabel===void 0&&(j.zLabel=String(j.zLabelVal)),!isNaN(j.xerr)&&!(j.xa.type==="log"&&j.xerr<=0)){var at=h.tickText(j.xa,j.xa.c2l(j.xerr),"hover").text;j.xerrneg!==void 0?j.xLabel+=" +"+at+" / -"+h.tickText(j.xa,j.xa.c2l(j.xerrneg),"hover").text:j.xLabel+=" \xB1 "+at,Q==="x"&&(j.distance+=1)}if(!isNaN(j.yerr)&&!(j.ya.type==="log"&&j.yerr<=0)){var nt=h.tickText(j.ya,j.ya.c2l(j.yerr),"hover").text;j.yerrneg!==void 0?j.yLabel+=" +"+nt+" / -"+h.tickText(j.ya,j.ya.c2l(j.yerrneg),"hover").text:j.yLabel+=" \xB1 "+nt,Q==="y"&&(j.distance+=1)}var rt=j.hoverinfo||j.trace.hoverinfo;return rt&&rt!=="all"&&(rt=Array.isArray(rt)?rt:rt.split("+"),rt.indexOf("x")===-1&&(j.xLabel=void 0),rt.indexOf("y")===-1&&(j.yLabel=void 0),rt.indexOf("z")===-1&&(j.zLabel=void 0),rt.indexOf("text")===-1&&(j.text=void 0),rt.indexOf("name")===-1&&(j.name=void 0)),j}function se(j,Q,re){var ce=re.container,be=re.fullLayout,Ae=be._size,De=re.event,ze=!!Q.hLinePoint,Ze=!!Q.vLinePoint,at,nt;if(ce.selectAll(".spikeline").remove(),!!(Ze||ze)){var rt=i.combine(be.plot_bgcolor,be.paper_bgcolor);if(ze){var st=Q.hLinePoint,Me,ye;at=st&&st.xa,nt=st&&st.ya;var he=nt.spikesnap;he==="cursor"?(Me=De.pointerX,ye=De.pointerY):(Me=at._offset+st.x,ye=nt._offset+st.y);var Oe=x.readability(st.color,rt)<1.5?i.contrast(rt):st.color,tt=nt.spikemode,ot=nt.spikethickness,Qe=nt.spikecolor||Oe,Pt=h.getPxPosition(j,nt),It,qt;if(tt.indexOf("toaxis")!==-1||tt.indexOf("across")!==-1){if(tt.indexOf("toaxis")!==-1&&(It=Pt,qt=Me),tt.indexOf("across")!==-1){var Wt=nt._counterDomainMin,kr=nt._counterDomainMax;nt.anchor==="free"&&(Wt=Math.min(Wt,nt.position),kr=Math.max(kr,nt.position)),It=Ae.l+Wt*Ae.w,qt=Ae.l+kr*Ae.w}ce.insert("line",":first-child").attr({x1:It,x2:qt,y1:ye,y2:ye,"stroke-width":ot,stroke:Qe,"stroke-dasharray":n.dashStyle(nt.spikedash,ot)}).classed("spikeline",!0).classed("crisp",!0),ce.insert("line",":first-child").attr({x1:It,x2:qt,y1:ye,y2:ye,"stroke-width":ot+2,stroke:rt}).classed("spikeline",!0).classed("crisp",!0)}tt.indexOf("marker")!==-1&&ce.insert("circle",":first-child").attr({cx:Pt+(nt.side!=="right"?ot:-ot),cy:ye,r:ot,fill:Qe}).classed("spikeline",!0)}if(Ze){var mr=Q.vLinePoint,qr,Sr;at=mr&&mr.xa,nt=mr&&mr.ya;var Rr=at.spikesnap;Rr==="cursor"?(qr=De.pointerX,Sr=De.pointerY):(qr=at._offset+mr.x,Sr=nt._offset+mr.y);var wt=x.readability(mr.color,rt)<1.5?i.contrast(rt):mr.color,Ne=at.spikemode,Ke=at.spikethickness,Te=at.spikecolor||wt,Ie=h.getPxPosition(j,at),Ve,Ce;if(Ne.indexOf("toaxis")!==-1||Ne.indexOf("across")!==-1){if(Ne.indexOf("toaxis")!==-1&&(Ve=Ie,Ce=Sr),Ne.indexOf("across")!==-1){var Ee=at._counterDomainMin,Pe=at._counterDomainMax;at.anchor==="free"&&(Ee=Math.min(Ee,at.position),Pe=Math.max(Pe,at.position)),Ve=Ae.t+(1-Pe)*Ae.h,Ce=Ae.t+(1-Ee)*Ae.h}ce.insert("line",":first-child").attr({x1:qr,x2:qr,y1:Ve,y2:Ce,"stroke-width":Ke,stroke:Te,"stroke-dasharray":n.dashStyle(at.spikedash,Ke)}).classed("spikeline",!0).classed("crisp",!0),ce.insert("line",":first-child").attr({x1:qr,x2:qr,y1:Ve,y2:Ce,"stroke-width":Ke+2,stroke:rt}).classed("spikeline",!0).classed("crisp",!0)}Ne.indexOf("marker")!==-1&&ce.insert("circle",":first-child").attr({cx:qr,cy:Ie-(at.side!=="top"?Ke:-Ke),r:Ke,fill:Te}).classed("spikeline",!0)}}}function le(j,Q,re){if(!re||re.length!==j._hoverdata.length)return!0;for(var ce=re.length-1;ce>=0;ce--){var be=re[ce],Ae=j._hoverdata[ce];if(be.curveNumber!==Ae.curveNumber||String(be.pointNumber)!==String(Ae.pointNumber)||String(be.pointNumbers)!==String(Ae.pointNumbers)||be.binNumber!==Ae.binNumber)return!0}return!1}function fe(j,Q){return!Q||Q.vLinePoint!==j._spikepoints.vLinePoint||Q.hLinePoint!==j._spikepoints.hLinePoint}function V(j,Q){return o.plainText(j||"",{len:Q,allowedTags:["br","sub","sup","b","i","em","s","u"]})}function Y(j,Q){for(var re=Q.charAt(0),ce=[],be=[],Ae=[],De=0;Dej.offsetTop+j.clientTop,oe=j=>j.offsetLeft+j.clientLeft;function ae(j,Q){var re=j._fullLayout,ce=Q.getBoundingClientRect(),be=ce.left,Ae=ce.top,De=be+ce.width,ze=Ae+ce.height,Ze=S.apply3DTransform(re._invTransform)(be,Ae),at=S.apply3DTransform(re._invTransform)(De,ze),nt=Ze[0],rt=Ze[1],st=at[0],Me=at[1];return{x:nt,y:rt,width:st-nt,height:Me-rt,top:Math.min(rt,Me),left:Math.min(nt,st),right:Math.max(nt,st),bottom:Math.max(rt,Me)}}}}),k_=Xe({"src/components/fx/hoverlabel_defaults.js"(Z,G){"use strict";var v=sa(),x=$n(),S=$p().isUnifiedHover;G.exports=function(e,t,r,o){o=o||{};var a=t.legend;function n(i){o.font[i]||(o.font[i]=a?t.legend.font[i]:t.font[i])}t&&S(t.hovermode)&&(o.font||(o.font={}),n("size"),n("family"),n("color"),n("weight"),n("style"),n("variant"),a?(o.bgcolor||(o.bgcolor=x.combine(t.legend.bgcolor,t.paper_bgcolor)),o.bordercolor||(o.bordercolor=t.legend.bordercolor)):o.bgcolor||(o.bgcolor=t.paper_bgcolor)),r("hoverlabel.bgcolor",o.bgcolor),r("hoverlabel.bordercolor",o.bordercolor),r("hoverlabel.namelength",o.namelength),r("hoverlabel.showarrow",o.showarrow),v.coerceFont(r,"hoverlabel.font",o.font),r("hoverlabel.align",o.align)}}}),mz=Xe({"src/components/fx/layout_global_defaults.js"(Z,G){"use strict";var v=sa(),x=k_(),S=Zm();G.exports=function(e,t){function r(o,a){return v.coerce(e,t,S,o,a)}x(e,t,r)}}}),gz=Xe({"src/components/fx/defaults.js"(Z,G){"use strict";var v=sa(),x=Ky(),S=k_();G.exports=function(e,t,r,o){function a(i,s){return v.coerce(e,t,x,i,s)}var n=v.extendFlat({},o.hoverlabel);t.hovertemplate&&(n.namelength=-1),S(e,t,a,n)}}}),x5=Xe({"src/components/fx/hovermode_defaults.js"(Z,G){"use strict";var v=sa(),x=Zm();G.exports=function(E,e){function t(r,o){return e[r]!==void 0?e[r]:v.coerce(E,e,x,r,o)}return t("clickmode"),t("hoversubplots"),t("hovermode")}}}),yz=Xe({"src/components/fx/layout_defaults.js"(Z,G){"use strict";var v=sa(),x=Zm(),S=x5(),E=k_();G.exports=function(t,r){function o(m,p){return v.coerce(t,r,x,m,p)}var a=S(t,r);a&&(o("hoverdistance"),o("spikedistance"));var n=o("dragmode");n==="select"&&o("selectdirection");var i=r._has("mapbox"),s=r._has("map"),h=r._has("geo"),c=r._basePlotModules.length;r.dragmode==="zoom"&&((i||s||h)&&c===1||(i||s)&&h&&c===2)&&(r.dragmode="pan"),E(t,r,o),v.coerceFont(o,"hoverlabel.grouptitlefont",r.hoverlabel.font)}}}),_z=Xe({"src/components/fx/calc.js"(Z,G){"use strict";var v=sa(),x=so();G.exports=function(e){var t=e.calcdata,r=e._fullLayout;function o(h){return function(c){return v.coerceHoverinfo({hoverinfo:c},{_module:h._module},r)}}for(var a=0;a"," plotly-logomark"," "," "," "," "," "," "," "," "," "," "," "," "," ",""].join("")}}}}),T2=Xe({"src/components/shapes/draw_newshape/constants.js"(Z,G){"use strict";var v=32;G.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=Xe({"src/components/selections/helpers.js"(Z,G){"use strict";var v=sa().strTranslate;function x(t,r){switch(t.type){case"log":return t.p2d(r);case"date":return t.p2r(r,0,t.calendar);default:return t.p2r(r)}}function S(t,r){switch(t.type){case"log":return t.d2p(r);case"date":return t.r2p(r,0,t.calendar);default:return t.r2p(r)}}function E(t){var r=t._id.charAt(0)==="y"?1:0;return function(o){return x(t,o[r])}}function e(t){return v(t.xaxis._offset,t.yaxis._offset)}G.exports={p2r:x,r2p:S,axValue:E,getTransform:e}}}),r0=Xe({"src/components/shapes/draw_newshape/helpers.js"(Z){"use strict";var G=M_(),v=T2(),x=v.CIRCLE_SIDES,S=v.SQRT2,E=A2(),e=E.p2r,t=E.r2p,r=[0,3,4,5,6,1,2],o=[0,3,4,1,2];Z.writePaths=function(i){var s=i.length;if(!s)return"M0,0Z";for(var h="",c=0;c0&&_{let s=i.charAt(0),h=a[s].drawn!==void 0;return n+(h?1:0)},0)},Z.getDataToPixel=function(e,t,r,o,a){var n=e._fullLayout._size,i;if(t)if(a==="domain")i=function(h){return t._length*(o?1-h:h)+t._offset};else{var s=Z.shapePositionToRange(t);i=function(h){var c=E(t,r);return t._offset+t.r2p(s(h,!0))+c},t.type==="date"&&(i=Z.decodeDate(i))}else o?i=function(h){return n.t+n.h*(1-h)}:i=function(h){return n.l+n.w*h};return i},Z.getPixelToData=function(e,t,r,o){var a=e._fullLayout._size,n;if(t)if(o==="domain")n=function(s){var h=(s-t._offset)/t._length;return r?1-h:h};else{var i=Z.rangeToShapePosition(t);n=function(s){return i(t.p2r(s-t._offset))}}else r?n=function(s){return 1-(s-a.t)/a.h}:n=function(s){return(s-a.l)/a.w};return n},Z.roundPositionForSharpStrokeRendering=function(e,t){var r=Math.round(t%2)===1,o=Math.round(e);return r?o+.5:o},Z.makeShapesOptionsAndPlotinfo=function(e,t){var r=e._fullLayout.shapes[t]||{},o=e._fullLayout._plots[r.xref+r.yref],a=!!o;return a?o._hadPlotinfo=!0:(o={},r.xref&&r.xref!=="paper"&&(o.xaxis=e._fullLayout[r.xref+"axis"]),r.yref&&r.yref!=="paper"&&(o.yaxis=e._fullLayout[r.yref+"axis"])),o.xsizemode=r.xsizemode,o.ysizemode=r.ysizemode,o.xanchor=r.xanchor,o.yanchor=r.yanchor,{options:r,plotinfo:o}},Z.makeSelectionsOptionsAndPlotinfo=function(e,t){var r=e._fullLayout.selections[t]||{},o=e._fullLayout._plots[r.xref+r.yref],a=!!o;return a?o._hadPlotinfo=!0:(o={},r.xref&&(o.xaxis=e._fullLayout[r.xref+"axis"]),r.yref&&(o.yaxis=e._fullLayout[r.yref+"axis"])),{options:r,plotinfo:o}},Z.getPathString=function(e,t){let r=t.type,o=x.getRefType(t.xref),a=x.getRefType(t.yref),n=e._fullLayout._size;var i,s,h,c,m,p,T,l,_,w,A,M;function g(z,F,N,O){var P;if(z)if(F==="domain")O?P=function(U){return z._offset+z._length*(1-U)}:P=function(U){return z._offset+z._length*U};else{let U=Z.shapePositionToRange(z);P=function(B){return z._offset+z.r2p(U(B,!0))},N==="path"&&z.type==="date"&&(P=Z.decodeDate(P))}else O?P=function(U){return n.t+n.h*(1-U)}:P=function(U){return n.l+n.w*U};return P}if(o==="array"?(T=[],i=t.xref.map(function(z){return x.getFromId(e,z)}),T=t.xref.map(function(z,F){return g(i[F],x.getRefType(z),r,!1)})):(i=x.getFromId(e,t.xref),T=g(i,o,r,!1)),a==="array"?(l=[],s=t.yref.map(function(z){return x.getFromId(e,z)}),l=t.yref.map(function(z,F){return g(s[F],x.getRefType(z),r,!0)})):(s=x.getFromId(e,t.yref),l=g(s,a,r,!0)),r==="path")return S(t,T,l);if(o==="array")h=E(i[0],t.x0shift),c=E(i[1],t.x1shift),_=T[0](t.x0)+h,w=T[1](t.x1)+c;else if(h=E(i,t.x0shift),c=E(i,t.x1shift),t.xsizemode==="pixel"){let z=T(t.xanchor);_=z+t.x0+h,w=z+t.x1+c}else _=T(t.x0)+h,w=T(t.x1)+c;if(a==="array")m=E(s[0],t.y0shift),p=E(s[1],t.y1shift),A=l[0](t.y0)+m,M=l[1](t.y1)+p;else if(m=E(s,t.y0shift),p=E(s,t.y1shift),t.ysizemode==="pixel"){let z=l(t.yanchor);A=z-t.y0+m,M=z-t.y1+p}else A=l(t.y0)+m,M=l(t.y1)+p;if(r==="line")return"M"+_+","+A+"L"+w+","+M;if(r==="rect")return"M"+_+","+A+"H"+w+"V"+M+"H"+_+"Z";var b=(_+w)/2,d=(A+M)/2,u=Math.abs(b-_),y=Math.abs(d-A),f="A"+u+","+y,R=b+u+","+d,L=b+","+(d-y);return"M"+R+f+" 0 1,1 "+L+f+" 0 0,1 "+R+"Z"};function S(e,t,r){let o=e.path,a=e.xsizemode,n=e.ysizemode,i=e.xanchor,s=e.yanchor,h=Array.isArray(e.xref),c=Array.isArray(e.yref);var m=0,p=0;return o.replace(G.segmentRE,function(T){var l=0,_=T.charAt(0),w=G.paramIsX[_],A=G.paramIsY[_],M=G.numParams[_];let g=w.drawn!==void 0,b=A.drawn!==void 0,d=h?t[m]:t,u=c?r[p]:r;var y=T.slice(1).replace(G.paramRE,function(f){return w[l]?a==="pixel"?f=d(i)+Number(f):f=d(f):A[l]&&(n==="pixel"?f=u(s)-Number(f):f=u(f)),l++,l>M&&(f="X"),f});return l>M&&(y=y.replace(/[\s,]*X.*/,""),v.log("Ignoring extra params in segment "+T)),g&&m++,b&&p++,_+y})}function E(e,t){t=t||0;var r=0;return t&&e&&(e.type==="category"||e.type==="multicategory")&&(r=(e.r2p(1)-e.r2p(0))*t),r}}}),w5=Xe({"src/components/shapes/display_labels.js"(Z,G){"use strict";var v=sa(),x=Go(),S=ou(),E=es(),e=r0().readPaths,t=a0(),r=t.getPathString,o=v2(),a=uh().FROM_TL;G.exports=function(h,c,m,p){if(p.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=x.getFromId(h,m.yref);let j=Array.isArray(m.xref),Q=Array.isArray(m.yref);for(var A in o){var M=typeof o[A]=="function",g=!j||o.simpleXVariables.includes(A),b=!Q||o.simpleYVariables.includes(A);if(M&&g&&b){var d=o[A](m,_,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":c},y=m.label.font,f={"data-notex":1},R=p.append("g").attr(u).classed("shape-label",!0),L=R.append("text").attr(f).classed("shape-label-text",!0).text(T),z,F,N,O;if(m.path){var P=r(h,m),U=e(P,h);z=1/0,N=1/0,F=-1/0,O=-1/0;for(var B=0;B=s?p=h-m:p=m-h,-180/Math.PI*Math.atan2(p,T)}function i(s,h,c,m,p,T,l){var _=p.label.textposition,w=p.label.textangle,A=p.label.padding,M=p.type,g=Math.PI/180*T,b=Math.sin(g),d=Math.cos(g),u=p.label.xanchor,y=p.label.yanchor,f,R,L,z;if(M==="line"){_==="start"?(f=s,R=h):_==="end"?(f=c,R=m):(f=(s+c)/2,R=(h+m)/2),u==="auto"&&(_==="start"?w==="auto"?c>s?u="left":cs?u="right":cs?u="right":cs?u="left":c1&&!(rt.length===2&&rt[1][0]==="Z")&&(V===0&&(rt[0][0]="M"),f[fe]=rt,N(),O())}}function ce(rt,st){if(rt===2){fe=+st.srcElement.getAttribute("data-i"),V=+st.srcElement.getAttribute("data-j");var Me=f[fe];!T(Me)&&!l(Me)&&re()}}function be(rt){se=[];for(var st=0;stE.getFromId(f,se)).filter(Boolean);if(!B.length)return U?[z.t,z.t+z.h]:[z.l,z.l+z.w];let X=B.map(function(se){return se._offset}),$=B.map(function(se){return se._offset+se._length});return[Math.min(...X),Math.max(...$)]}let N=F(R,!1),O=F(L,!0);return{x:N[0],y:O[0],width:N[1]-N[0],height:O[1]-O[0]}}function g(f,R,L,z,F,N){var O=10,P=10,U=L.xsizemode==="pixel",B=L.ysizemode==="pixel",X=L.type==="line",$=L.type==="path",se=N.modifyItem,le,fe,V,Y,ee,q,oe,ae,j,Q,re,ce,be,Ae,De,ze=v.select(R.node().parentNode),Ze=E.getFromId(f,L.xref),at=E.getRefType(L.xref),nt=E.getFromId(f,L.yref),rt=E.getRefType(L.yref),st=L.x0shift,Me=L.x1shift,ye=L.y0shift,he=L.y1shift,Oe=function(Ve,Ce){var Ee=m.getDataToPixel(f,Ze,Ce,!1,at);return Ee(Ve)},tt=function(Ve,Ce){var Ee=m.getDataToPixel(f,nt,Ce,!0,rt);return Ee(Ve)},ot=m.getPixelToData(f,Ze,!1,at),Qe=m.getPixelToData(f,nt,!0,rt),Pt=Wt(),It={element:Pt.node(),gd:f,prepFn:qr,doneFn:Sr,clickFn:Rr},qt;s.init(It),Pt.node().onmousemove=mr;function Wt(){return X?kr():R}function kr(){var Ve=10,Ce=Math.max(L.line.width,Ve),Ee=F.append("g").attr("data-index",z).attr("drag-helper",!0);Ee.append("path").attr("d",R.attr("d")).style({cursor:"move","stroke-width":Ce,"stroke-opacity":"0"});var Pe={"fill-opacity":"0"},ft=Math.max(Ce/2,Ve);return Ee.append("circle").attr({"data-line-point":"start-point",cx:U?Oe(L.xanchor)+L.x0:Oe(L.x0,st),cy:B?tt(L.yanchor)-L.y0:tt(L.y0,ye),r:ft}).style(Pe).classed("cursor-grab",!0),Ee.append("circle").attr({"data-line-point":"end-point",cx:U?Oe(L.xanchor)+L.x1:Oe(L.x1,Me),cy:B?tt(L.yanchor)-L.y1:tt(L.y1,he),r:ft}).style(Pe).classed("cursor-grab",!0),Ee}function mr(Ve){if(l(f)){qt=null;return}if(X)Ve.target.tagName==="path"?qt="move":qt=Ve.target.attributes["data-line-point"].value==="start-point"?"resize-over-start-point":"resize-over-end-point";else{var Ce=It.element.getBoundingClientRect(),Ee=Ce.right-Ce.left,Pe=Ce.bottom-Ce.top,ft=Ve.clientX-Ce.left,ct=Ve.clientY-Ce.top,_t=!$&&Ee>O&&Pe>P&&!Ve.shiftKey?s.getCursor(ft/Ee,1-ct/Pe):"move";h(R,_t),qt=_t.split("-")[0]}}function qr(Ve){l(f)||(U&&(ee=Oe(L.xanchor)),B&&(q=tt(L.yanchor)),L.type==="path"?De=L.path:(le=U?L.x0:Oe(L.x0),fe=B?L.y0:tt(L.y0),V=U?L.x1:Oe(L.x1),Y=B?L.y1:tt(L.y1)),leY?(oe=fe,re="y0",ae=Y,ce="y1"):(oe=Y,re="y1",ae=fe,ce="y0"),mr(Ve),Ke(F,L),Ie(R,L,f),It.moveFn=qt==="move"?wt:Ne,It.altKey=Ve.altKey)}function Sr(){l(f)||(h(R),Te(F),A(R,f,L),x.call("_guiRelayout",f,N.getUpdateObj()))}function Rr(){l(f)||Te(F)}function wt(Ve,Ce){if(L.type==="path"){var Ee=function(ct){return ct},Pe=Ee,ft=Ee;U?se("xanchor",L.xanchor=ot(ee+Ve)):(Pe=function(_t){return ot(Oe(_t)+Ve)},Ze&&Ze.type==="date"&&(Pe=m.encodeDate(Pe))),B?se("yanchor",L.yanchor=Qe(q+Ce)):(ft=function(_t){return Qe(tt(_t)+Ce)},nt&&nt.type==="date"&&(ft=m.encodeDate(ft))),se("path",L.path=b(De,Pe,ft))}else U?se("xanchor",L.xanchor=ot(ee+Ve)):(se("x0",L.x0=ot(le+Ve)),se("x1",L.x1=ot(V+Ve))),B?se("yanchor",L.yanchor=Qe(q+Ce)):(se("y0",L.y0=Qe(fe+Ce)),se("y1",L.y1=Qe(Y+Ce)));R.attr("d",p(f,L)),Ke(F,L),r(f,z,L,ze)}function Ne(Ve,Ce){if($){var Ee=function(hi){return hi},Pe=Ee,ft=Ee;U?se("xanchor",L.xanchor=ot(ee+Ve)):(Pe=function(wi){return ot(Oe(wi)+Ve)},Ze&&Ze.type==="date"&&(Pe=m.encodeDate(Pe))),B?se("yanchor",L.yanchor=Qe(q+Ce)):(ft=function(wi){return Qe(tt(wi)+Ce)},nt&&nt.type==="date"&&(ft=m.encodeDate(ft))),se("path",L.path=b(De,Pe,ft))}else if(X){if(qt==="resize-over-start-point"){var ct=le+Ve,_t=B?fe-Ce:fe+Ce;se("x0",L.x0=U?ct:ot(ct)),se("y0",L.y0=B?_t:Qe(_t))}else if(qt==="resize-over-end-point"){var Ct=V+Ve,ir=B?Y-Ce:Y+Ce;se("x1",L.x1=U?Ct:ot(Ct)),se("y1",L.y1=B?ir:Qe(ir))}}else{var rr=function(hi){return qt.indexOf(hi)!==-1},er=rr("n"),Lr=rr("s"),fa=rr("w"),Da=rr("e"),Ia=er?oe+Ce:oe,qa=Lr?ae+Ce:ae,Wa=fa?j+Ve:j,Ca=Da?Q+Ve:Q;B&&(er&&(Ia=oe-Ce),Lr&&(qa=ae-Ce)),(!B&&qa-Ia>P||B&&Ia-qa>P)&&(se(re,L[re]=B?Ia:Qe(Ia)),se(ce,L[ce]=B?qa:Qe(qa))),Ca-Wa>O&&(se(be,L[be]=U?Wa:ot(Wa)),se(Ae,L[Ae]=U?Ca:ot(Ca)))}R.attr("d",p(f,L)),Ke(F,L),r(f,z,L,ze)}function Ke(Ve,Ce){(U||B)&&Ee();function Ee(){var Pe=Ce.type!=="path",ft=Ve.selectAll(".visual-cue").data([0]),ct=1;ft.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":ct}).classed("visual-cue",!0);var _t=Oe(U?Ce.xanchor:S.midRange(Pe?[Ce.x0,Ce.x1]:m.extractPathCoords(Ce.path,c.paramIsX))),Ct=tt(B?Ce.yanchor:S.midRange(Pe?[Ce.y0,Ce.y1]:m.extractPathCoords(Ce.path,c.paramIsY)));if(_t=m.roundPositionForSharpStrokeRendering(_t,ct),Ct=m.roundPositionForSharpStrokeRendering(Ct,ct),U&&B){var ir="M"+(_t-1-ct)+","+(Ct-1-ct)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";ft.attr("d",ir)}else if(U){var rr="M"+(_t-1-ct)+","+(Ct-9-ct)+"v18 h2 v-18 Z";ft.attr("d",rr)}else{var er="M"+(_t-9-ct)+","+(Ct-1-ct)+"h18 v2 h-18 Z";ft.attr("d",er)}}}function Te(Ve){Ve.selectAll(".visual-cue").remove()}function Ie(Ve,Ce,Ee){var Pe=Ce.xref,ft=Ce.yref,ct=E.getFromId(Ee,Pe),_t=E.getFromId(Ee,ft),Ct="";Pe!=="paper"&&!ct.autorange&&(Ct+=Pe),ft!=="paper"&&!_t.autorange&&(Ct+=ft),n.setClipUrl(Ve,Ct?"clip"+Ee._fullLayout._uid+Ct:null,Ee)}}function b(f,R,L){return f.replace(c.segmentRE,function(z){var F=0,N=z.charAt(0),O=c.paramIsX[N],P=c.paramIsY[N],U=c.numParams[N],B=z.slice(1).replace(c.paramRE,function(X){return F>=U||(O[F]?X=R(X):P[F]&&(X=L(X)),F++),X});return N+B})}function d(f,R){if(_(f)){var L=R.node(),z=+L.getAttribute("data-index");if(z>=0){if(z===f._fullLayout._activeShapeIndex){u(f);return}f._fullLayout._activeShapeIndex=z,f._fullLayout._deactivateShape=u,T(f)}}}function u(f){if(_(f)){var R=f._fullLayout._activeShapeIndex;R>=0&&(o(f),delete f._fullLayout._activeShapeIndex,T(f))}}function y(f){if(_(f)){o(f);var R=f._fullLayout._activeShapeIndex,L=(f.layout||{}).shapes||[];if(R1?(le=["toggleHover"],fe=["resetViews"]):u?(se=["zoomInGeo","zoomOutGeo"],le=["hoverClosestGeo"],fe=["resetGeo"]):d?(le=["hoverClosest3d"],fe=["resetCameraDefault3d","resetCameraLastSave3d"]):L?(se=["zoomInMapbox","zoomOutMapbox"],le=["toggleHover"],fe=["resetViewMapbox"]):z?(se=["zoomInMap","zoomOutMap"],le=["toggleHover"],fe=["resetViewMap"]):y?le=["hoverClosestPie"]:O?(le=["hoverClosestCartesian","hoverCompareCartesian"],fe=["resetViewSankey"]):le=["toggleHover"],b&&le.push("toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"),(s(T)||U)&&(le=[]),b&&!P&&(se=["zoomIn2d","zoomOut2d","autoScale2d"],fe[0]!=="resetViews"&&(fe=["resetScale2d"])),d?V=["zoom3d","pan3d","orbitRotation","tableRotation"]:b&&!P||R?V=["zoom2d","pan2d"]:L||z||u?V=["pan2d"]:F&&(V=["zoom2d"]),i(T)&&V.push("select2d","lasso2d");var Y=[],ee=function(j){Y.indexOf(j)===-1&&le.indexOf(j)!==-1&&Y.push(j)};if(Array.isArray(M)){for(var q=[],oe=0;oew?T.slice(w):l.slice(_))+A}function h(m,p){for(var T=p._size,l=T.h/T.w,_={},w=Object.keys(m),A=0;At*R&&!N)){for(w=0;wV&&rele&&(le=re);var be=(le-se)/(2*fe);u/=be,se=g.l2r(se),le=g.l2r(le),g.range=g._input.range=B=O[1]||X[1]<=O[0])&&$[0]P[0])return!0}return!1}function A(O){var P=O._fullLayout,U=P._size,B=U.p,X=n.list(O,"",!0),$,se,le,fe,V,Y;if(P._paperdiv.style({width:O._context.responsive&&P.autosize&&!O._context._hasZeroWidth&&!O.layout.width?"100%":P.width+"px",height:O._context.responsive&&P.autosize&&!O._context._hasZeroHeight&&!O.layout.height?"100%":P.height+"px"}).selectAll(".main-svg").call(r.setSize,P.width,P.height),O._context.setBackground(O,P.paper_bgcolor),Z.drawMainTitle(O),a.manage(O),!P._has("cartesian"))return x.previousPromises(O);function ee(Te,Ie,Ve){var Ce=Te._lw/2;if(Te._id.charAt(0)==="x"){if(Ie){if(Ve==="top")return Ie._offset-B-Ce}else return U.t+U.h*(1-(Te.position||0))+Ce%1;return Ie._offset+Ie._length+B+Ce}if(Ie){if(Ve==="right")return Ie._offset+Ie._length+B+Ce}else return U.l+U.w*(Te.position||0)+Ce%1;return Ie._offset-B-Ce}for($=0;$0){f(O,$,V,fe),le.attr({x:se,y:$,"text-anchor":B,dy:z(P.yanchor)}).call(E.positionText,se,$);var Y=(P.text.match(E.BR_TAG_ALL)||[]).length;if(Y){var ee=i.LINE_SPACING*Y+i.MID_SHIFT;P.y===0&&(ee=-ee),le.selectAll(".line").each(function(){var Q=+this.getAttribute("dy").slice(0,-2)-ee+"em";this.setAttribute("dy",Q)})}var q=G.select(O).selectAll(".gtitle-subtitle");if(q.node()){var oe=le.node().getBBox(),ae=oe.y+oe.height,j=ae+o.SUBTITLE_PADDING_EM*P.subtitle.font.size;q.attr({x:se,y:j,"text-anchor":B,dy:z(P.yanchor)}).call(E.positionText,se,j)}}}};function d(O,P,U,B,X){var $=P.yref==="paper"?O._fullLayout._size.h:O._fullLayout.height,se=S.isTopAnchor(P)?B:B-X,le=U==="b"?$-se:se;return S.isTopAnchor(P)&&U==="t"||S.isBottomAnchor(P)&&U==="b"?!1:le.5?"t":"b",se=O._fullLayout.margin[$],le=0;return P.yref==="paper"?le=U+P.pad.t+P.pad.b:P.yref==="container"&&(le=u($,B,X,O._fullLayout.height,U)+P.pad.t+P.pad.b),le>se?le:0}function f(O,P,U,B){var X="title.automargin",$=O._fullLayout.title,se=$.y>.5?"t":"b",le={x:$.x,y:$.y,t:0,b:0},fe={};$.yref==="paper"&&d(O,$,se,P,B)?le[se]=U:$.yref==="container"&&(fe[se]=U,O._fullLayout._reservedMargin[X]=fe),x.allowAutoMargin(O,X),x.autoMargin(O,X,le)}function R(O,P){var U=O.title,B=O._size,X=0;switch(P===p?X=U.pad.l:P===l&&(X=-U.pad.r),U.xref){case"paper":return B.l+B.w*U.x+X;case"container":default:return O.width*U.x+X}}function L(O,P){var U=O.title,B=O._size,X=0;if(P==="0em"||!P?X=-U.pad.b:P===i.CAP_SHIFT+"em"&&(X=U.pad.t),U.y==="auto")return B.t/2;switch(U.yref){case"paper":return B.t+B.h-B.h*U.y+X;case"container":default:return O.height-O.height*U.y+X}}function z(O){return O==="top"?i.CAP_SHIFT+.3+"em":O==="bottom"?"-0.3em":i.MID_SHIFT+"em"}function F(O){var P=O.title,U=T;return S.isRightAnchor(P)?U=l:S.isLeftAnchor(P)&&(U=p),U}function N(O){var P=O.title,U="0em";return S.isTopAnchor(P)?U=i.CAP_SHIFT+"em":S.isMiddleAnchor(P)&&(U=i.MID_SHIFT+"em"),U}Z.doTraceStyle=function(O){var P=O.calcdata,U=[],B;for(B=0;B=0;F--){var N=M.append("path").attr(b).style("opacity",F?.1:d).call(E.stroke,y).call(E.fill,u).call(e.dashLine,F?"solid":R,F?4+f:f);if(s(N,p,_),L){var O=t(p.layout,"selections",_);N.style({cursor:"move"});var P={element:N.node(),plotinfo:w,gd:p,editHelpers:O,isActiveSelection:!0},U=v(g,p);x(U,N,P)}else N.style("pointer-events",F?"all":"none");z[F]=N}var B=z[0],X=z[1];X.node().addEventListener("click",function(){return h(p,B)})}}function s(p,T,l){var _=l.xref+l.yref;e.setClipUrl(p,"clip"+T._fullLayout._uid+_,T)}function h(p,T){if(n(p)){var l=T.node(),_=+l.getAttribute("data-index");if(_>=0){if(_===p._fullLayout._activeSelectionIndex){m(p);return}p._fullLayout._activeSelectionIndex=_,p._fullLayout._deactivateSelection=m,a(p)}}}function c(p){if(n(p)){var T=p._fullLayout.selections.length-1;p._fullLayout._activeSelectionIndex=T,p._fullLayout._deactivateSelection=m,a(p)}}function m(p){if(n(p)){var T=p._fullLayout._activeSelectionIndex;T>=0&&(S(p),delete p._fullLayout._activeSelectionIndex,a(p))}}}}),Az=Xe({"node_modules/polybooljs/lib/build-log.js"(Z,G){function v(){var x,S=0,E=!1;function e(t,r){return x.list.push({type:t,data:r?JSON.parse(JSON.stringify(r)):void 0}),x}return x={list:[],segmentId:function(){return S++},checkIntersection:function(t,r){return e("check",{seg1:t,seg2:r})},segmentChop:function(t,r){return e("div_seg",{seg:t,pt:r}),e("chop",{seg:t,pt:r})},statusRemove:function(t){return e("pop_seg",{seg:t})},segmentUpdate:function(t){return e("seg_update",{seg:t})},segmentNew:function(t,r){return e("new_seg",{seg:t,primary:r})},segmentRemove:function(t){return e("rem_seg",{seg:t})},tempStatus:function(t,r,o){return e("temp_status",{seg:t,above:r,below:o})},rewind:function(t){return e("rewind",{seg:t})},status:function(t,r,o){return e("status",{seg:t,above:r,below:o})},vert:function(t){return t===E?x:(E=t,e("vert",{x:t}))},log:function(t){return typeof t!="string"&&(t=JSON.stringify(t,!1," ")),e("log",{txt:t})},reset:function(){return e("reset")},selected:function(t){return e("selected",{segs:t})},chainStart:function(t){return e("chain_start",{seg:t})},chainRemoveHead:function(t,r){return e("chain_rem_head",{index:t,pt:r})},chainRemoveTail:function(t,r){return e("chain_rem_tail",{index:t,pt:r})},chainNew:function(t,r){return e("chain_new",{pt1:t,pt2:r})},chainMatch:function(t){return e("chain_match",{index:t})},chainClose:function(t){return e("chain_close",{index:t})},chainAddHead:function(t,r){return e("chain_add_head",{index:t,pt:r})},chainAddTail:function(t,r){return e("chain_add_tail",{index:t,pt:r})},chainConnect:function(t,r){return e("chain_con",{index1:t,index2:r})},chainReverse:function(t){return e("chain_rev",{index:t})},chainJoin:function(t,r){return e("chain_join",{index1:t,index2:r})},done:function(){return e("done")}},x}G.exports=v}}),Sz=Xe({"node_modules/polybooljs/lib/epsilon.js"(Z,G){function v(x){typeof x!="number"&&(x=1e-10);var S={epsilon:function(E){return typeof E=="number"&&(x=E),x},pointAboveOrOnLine:function(E,e,t){var r=e[0],o=e[1],a=t[0],n=t[1],i=E[0],s=E[1];return(a-r)*(s-o)-(n-o)*(i-r)>=-x},pointBetween:function(E,e,t){var r=E[1]-e[1],o=t[0]-e[0],a=E[0]-e[0],n=t[1]-e[1],i=a*o+r*n;if(i-x)},pointsSameX:function(E,e){return Math.abs(E[0]-e[0])x!=a-r>x&&(o-s)*(r-h)/(a-h)+s-t>x&&(n=!n),o=s,a=h}return n}};return S}G.exports=v}}),Mz=Xe({"node_modules/polybooljs/lib/linked-list.js"(Z,G){var v={create:function(){var x={root:{root:!0,next:null},exists:function(S){return!(S===null||S===x.root)},isEmpty:function(){return x.root.next===null},getHead:function(){return x.root.next},insertBefore:function(S,E){for(var e=x.root,t=x.root.next;t!==null;){if(E(t)){S.prev=t.prev,S.next=t,t.prev.next=S,t.prev=S;return}e=t,t=t.next}e.next=S,S.prev=e,S.next=null},findTransition:function(S){for(var E=x.root,e=x.root.next;e!==null&&!S(e);)E=e,e=e.next;return{before:E===x.root?null:E,after:e,insert:function(t){return t.prev=E,t.next=e,E.next=t,e!==null&&(e.prev=t),t}}}};return x},node:function(x){return x.prev=null,x.next=null,x.remove=function(){x.prev.next=x.next,x.next&&(x.next.prev=x.prev),x.prev=null,x.next=null},x}};G.exports=v}}),Ez=Xe({"node_modules/polybooljs/lib/intersecter.js"(Z,G){var v=Mz();function x(S,E,e){function t(T,l){return{id:e?e.segmentId():-1,start:T,end:l,myFill:{above:null,below:null},otherFill:null}}function r(T,l,_){return{id:e?e.segmentId():-1,start:T,end:l,myFill:{above:_.myFill.above,below:_.myFill.below},otherFill:null}}var o=v.create();function a(T,l,_,w,A,M){var g=E.pointsCompare(l,A);return g!==0?g:E.pointsSame(_,M)?0:T!==w?T?1:-1:E.pointAboveOrOnLine(_,w?A:M,w?M:A)?1:-1}function n(T,l){o.insertBefore(T,function(_){var w=a(T.isStart,T.pt,l,_.isStart,_.pt,_.other.pt);return w<0})}function i(T,l){var _=v.node({isStart:!0,pt:T.start,seg:T,primary:l,other:null,status:null});return n(_,T.end),_}function s(T,l,_){var w=v.node({isStart:!1,pt:l.end,seg:l,primary:_,other:T,status:null});T.other=w,n(w,T.pt)}function h(T,l){var _=i(T,l);return s(_,T,l),_}function c(T,l){e&&e.segmentChop(T.seg,l),T.other.remove(),T.seg.end=l,T.other.pt=l,n(T.other,T.pt)}function m(T,l){var _=r(l,T.seg.end,T.seg);return c(T,l),h(_,T.primary)}function p(T,l){var _=v.create();function w(O,P){var U=O.seg.start,B=O.seg.end,X=P.seg.start,$=P.seg.end;return E.pointsCollinear(U,X,$)?E.pointsCollinear(B,X,$)||E.pointAboveOrOnLine(B,X,$)?1:-1:E.pointAboveOrOnLine(U,X,$)?1:-1}function A(O){return _.findTransition(function(P){var U=w(O,P.ev);return U>0})}function M(O,P){var U=O.seg,B=P.seg,X=U.start,$=U.end,se=B.start,le=B.end;e&&e.checkIntersection(U,B);var fe=E.linesIntersect(X,$,se,le);if(fe===!1){if(!E.pointsCollinear(X,$,se)||E.pointsSame(X,le)||E.pointsSame($,se))return!1;var V=E.pointsSame(X,se),Y=E.pointsSame($,le);if(V&&Y)return P;var ee=!V&&E.pointBetween(X,se,le),q=!Y&&E.pointBetween($,se,le);if(V)return q?m(P,$):m(O,le),P;ee&&(Y||(q?m(P,$):m(O,le)),m(P,X))}else fe.alongA===0&&(fe.alongB===-1?m(O,se):fe.alongB===0?m(O,fe.pt):fe.alongB===1&&m(O,le)),fe.alongB===0&&(fe.alongA===-1?m(P,X):fe.alongA===0?m(P,fe.pt):fe.alongA===1&&m(P,$));return!1}for(var g=[];!o.isEmpty();){var b=o.getHead();if(e&&e.vert(b.pt[0]),b.isStart){let O=function(){if(y){var P=M(b,y);if(P)return P}return f?M(b,f):!1};var d=O;e&&e.segmentNew(b.seg,b.primary);var u=A(b),y=u.before?u.before.ev:null,f=u.after?u.after.ev:null;e&&e.tempStatus(b.seg,y?y.seg:!1,f?f.seg:!1);var R=O();if(R){if(S){var L;b.seg.myFill.below===null?L=!0:L=b.seg.myFill.above!==b.seg.myFill.below,L&&(R.seg.myFill.above=!R.seg.myFill.above)}else R.seg.otherFill=b.seg.myFill;e&&e.segmentUpdate(R.seg),b.other.remove(),b.remove()}if(o.getHead()!==b){e&&e.rewind(b.seg);continue}if(S){var L;b.seg.myFill.below===null?L=!0:L=b.seg.myFill.above!==b.seg.myFill.below,f?b.seg.myFill.below=f.seg.myFill.above:b.seg.myFill.below=T,L?b.seg.myFill.above=!b.seg.myFill.below:b.seg.myFill.above=b.seg.myFill.below}else if(b.seg.otherFill===null){var z;f?b.primary===f.primary?z=f.seg.otherFill.above:z=f.seg.myFill.above:z=b.primary?l:T,b.seg.otherFill={above:z,below:z}}e&&e.status(b.seg,y?y.seg:!1,f?f.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(_.exists(F.prev)&&_.exists(F.next)&&M(F.prev.ev,F.next.ev),e&&e.statusRemove(F.ev.seg),F.remove(),!b.primary){var N=b.seg.myFill;b.seg.myFill=b.seg.otherFill,b.seg.otherFill=N}g.push(b.seg)}o.getHead().remove()}return e&&e.done(),g}return S?{addRegion:function(T){for(var l,_=T[T.length-1],w=0;wr!=m>r&&t<(c-s)*(r-h)/(m-h)+s;p&&(o=!o)}return o}}}),I_=Xe({"src/lib/polygon.js"(Z,G){"use strict";var v=d2().dot,x=Hs().BADNUM,S=G.exports={};S.tester=function(e){var t=e.slice(),r=t[0][0],o=r,a=t[0][1],n=a,i;for((t[t.length-1][0]!==t[0][0]||t[t.length-1][1]!==t[0][1])&&t.push(t[0]),i=1;io||A===x||An||_&&h(l))}function m(l,_){var w=l[0],A=l[1];if(w===x||wo||A===x||An)return!1;var M=t.length,g=t[0][0],b=t[0][1],d=0,u,y,f,R,L;for(u=1;uMath.max(y,g)||A>Math.max(f,b)))if(Ai||Math.abs(v(m,h))>o)return!0;return!1},S.filter=function(e,t){var r=[e[0]],o=0,a=0;function n(s){e.push(s);var h=r.length,c=o;r.splice(a+1);for(var m=c+1;m1){var i=e.pop();n(i)}return{addPt:n,raw:e,filtered:r}}}}),Rz=Xe({"src/components/selections/constants.js"(Z,G){"use strict";G.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}}}),Dz=Xe({"src/components/selections/select.js"(Z,G){"use strict";var v=Pz(),x=Iz(),S=so(),E=es().dashStyle,e=$n(),t=rf(),r=$p().makeEventData,o=Jd(),a=o.freeMode,n=o.rectMode,i=o.drawMode,s=o.openMode,h=o.selectMode,c=a0(),m=L_(),p=M2(),T=$m().clearOutline,l=r0(),_=l.handleEllipse,w=l.readPaths,A=S2().newShapes,M=b5(),g=k5().activateLastSelection,b=sa(),d=b.sorterAsc,u=I_(),y=y2(),f=ef().getFromId,R=C_(),L=P_().redrawReglTraces,z=Rz(),F=z.MINSELECT,N=u.filter,O=u.tester,P=A2(),U=P.p2r,B=P.axValue,X=P.getTransform;function $(Ne){return Ne.subplot!==void 0}function se(Ne,Ke,Te,Ie,Ve){var Ce=!$(Ie),Ee=a(Ve),Pe=n(Ve),ft=s(Ve),ct=i(Ve),_t=h(Ve),Ct=Ve==="drawline",ir=Ve==="drawcircle",rr=Ct||ir,er=Ie.gd,Lr=er._fullLayout,fa=_t&&Lr.newselection.mode==="immediate"&&Ce,Da=Lr._zoomlayer,Ia=Ie.element.getBoundingClientRect(),qa=Ie.plotinfo,Wa=X(qa),Ca=Ke-Ia.left,hi=Te-Ia.top;Lr._calcInverseTransform(er);var wi=b.apply3DTransform(Lr._invTransform)(Ca,hi);Ca=wi[0],hi=wi[1];var Kt=Lr._invScaleX,Ft=Lr._invScaleY,Yt=Ca,Jt=hi,Fr="M"+Ca+","+hi,ta=Ie.xaxes[0],ra=Ie.yaxes[0],ca=ta._length,Ba=ra._length,$a=Ne.altKey&&!(i(Ve)&&ft),Za,ri,pi,Ra,tn,on,hn;q(Ne,er,Ie),Ee&&(Za=N([[Ca,hi]],z.BENDPX));var Tt=Da.selectAll("path.select-outline-"+qa.id).data([1]),ut=ct?Lr.newshape:Lr.newselection;ct&&(Ie.hasText=ut.label.text||ut.label.texttemplate);var Br=ct&&!ft?ut.fillcolor:"rgba(0,0,0,0)",Cr=ut.line.color||(Ce?e.contrast(er._fullLayout.plot_bgcolor):"#7f7f7f");Tt.enter().append("path").attr("class","select-outline select-outline-"+qa.id).style({opacity:ct?ut.opacity/2:1,"stroke-dasharray":E(ut.line.dash,ut.line.width),"stroke-width":ut.line.width+"px","shape-rendering":"crispEdges"}).call(e.stroke,Cr).call(e.fill,Br).attr("fill-rule","evenodd").classed("cursor-move",!!ct).attr("transform",Wa).attr("d",Fr+"Z");var xr=Da.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&&Ie.hasText){var Ir=Da.select(".label-temp");Ir.empty()&&(Ir=Da.append("g").classed("label-temp",!0).classed("select-outline",!0).style({opacity:.8}))}var Ur=Lr._uid+z.SELECTID,Hr=[],xt=re(er,Ie.xaxes,Ie.yaxes,Ie.subplot);fa&&!Ne.shiftKey&&(Ie._clearSubplotSelections=function(){if(Ce){var vr=ta._id,Or=ra._id;ot(er,vr,Or,xt);for(var ba=(er.layout||{}).selections||[],Pa=[],ya=!1,la=0;la=0){er._fullLayout._deactivateShape(er);return}if(!ct){var ba=Lr.clickmode;y.done(Ur).then(function(){if(y.clear(Ur),vr===2){for(Tt.remove(),tn=0;tn-1&&le(Or,er,Ie.xaxes,Ie.yaxes,Ie.subplot,Ie,Tt),ba==="event"&&Rr(er,void 0);t.click(er,Or,qa.id)}).catch(b.error)}},Ie.doneFn=function(){xr.remove(),y.done(Ur).then(function(){y.clear(Ur),!fa&&Ra&&Ie.selectionDefs&&(Ra.subtract=$a,Ie.selectionDefs.push(Ra),Ie.mergedPolygons.length=0,[].push.apply(Ie.mergedPolygons,pi)),(fa||ct)&&j(Ie,fa),Ie.doneFnCompleted&&Ie.doneFnCompleted(Hr),_t&&Rr(er,hn)}).catch(b.error)}}function le(Ne,Ke,Te,Ie,Ve,Ce,Ee){var Pe=Ke._hoverdata,ft=Ke._fullLayout,ct=ft.clickmode,_t=ct.indexOf("event")>-1,Ct=[],ir,rr,er,Lr,fa,Da,Ia,qa,Wa,Ca;if(be(Pe)){q(Ne,Ke,Ce),ir=re(Ke,Te,Ie,Ve);var hi=Ae(Pe,ir),wi=hi.pointNumbers.length>0;if(wi?ze(ir,hi):Ze(ir)&&(Ia=De(hi))){for(Ee&&Ee.remove(),Ca=0;Ca=0}function ae(Ne){return Ne._fullLayout._activeSelectionIndex>=0}function j(Ne,Ke){var Te=Ne.dragmode,Ie=Ne.plotinfo,Ve=Ne.gd;oe(Ve)&&Ve._fullLayout._deactivateShape(Ve),ae(Ve)&&Ve._fullLayout._deactivateSelection(Ve);var Ce=Ve._fullLayout,Ee=Ce._zoomlayer,Pe=i(Te),ft=h(Te);if(Pe||ft){var ct=Ee.selectAll(".select-outline-"+Ie.id);if(ct&&Ve._fullLayout._outlining){var _t;Pe&&(_t=A(ct,Ne)),_t&&S.call("_guiRelayout",Ve,{shapes:_t});var Ct;ft&&!$(Ne)&&(Ct=M(ct,Ne)),Ct&&(Ve._fullLayout._noEmitSelectedAtStart=!0,S.call("_guiRelayout",Ve,{selections:Ct}).then(function(){Ke&&g(Ve)})),Ve._fullLayout._outlining=!1}}Ie.selection={},Ie.selection.selectionDefs=Ne.selectionDefs=[],Ie.selection.mergedPolygons=Ne.mergedPolygons=[]}function Q(Ne){return Ne._id}function re(Ne,Ke,Te,Ie){if(!Ne.calcdata)return[];var Ve=[],Ce=Ke.map(Q),Ee=Te.map(Q),Pe,ft,ct;for(ct=0;ct0,Ce=Ve?Ie[0]:Te;return Ke.selectedpoints?Ke.selectedpoints.indexOf(Ce)>-1:!1}function ze(Ne,Ke){var Te=[],Ie,Ve,Ce,Ee;for(Ee=0;Ee0&&Te.push(Ie);if(Te.length===1&&(Ce=Te[0]===Ke.searchInfo,Ce&&(Ve=Ke.searchInfo.cd[0].trace,Ve.selectedpoints.length===Ke.pointNumbers.length))){for(Ee=0;Ee1||(Ke+=Ie.selectedpoints.length,Ke>1)))return!1;return Ke===1}function at(Ne,Ke,Te){var Ie;for(Ie=0;Ie-1&&Ke;if(!Ee&&Ke){var vr=Pt(Ne,!0);if(vr.length){var Or=vr[0].xref,ba=vr[0].yref;if(Or&&ba){var Pa=Wt(vr),ya=mr([f(Ne,Or,"x"),f(Ne,ba,"y")]);ya(Hr,Pa)}}Ne._fullLayout._noEmitSelectedAtStart?Ne._fullLayout._noEmitSelectedAtStart=!1:Xt&&Rr(Ne,Hr),ir._reselect=!1}if(!Ee&&ir._deselect){var la=ir._deselect;Pe=la.xref,ft=la.yref,tt(Pe,ft,_t)||ot(Ne,Pe,ft,Ie),Xt&&(Hr.points.length?Rr(Ne,Hr):wt(Ne)),ir._deselect=!1}return{eventData:Hr,selectionTesters:Te}}function Oe(Ne){var Ke=Ne.calcdata;if(Ke)for(var Te=0;Te=0){Br._fullLayout._deactivateShape(Br);return}var Cr=Br._fullLayout.clickmode;if(Y(Br),Tt===2&&!Me&&ri(),st)Cr.indexOf("select")>-1&&d(ut,Br,ot,Qe,be.id,_t),Cr.indexOf("event")>-1&&i.click(Br,ut,be.id);else if(Tt===1&&Me){var xr=at?he:ye,Ir=at==="s"||nt==="w"?0:1,Ur=xr._name+".range["+Ir+"]",Hr=P(xr,Ir),xt="left",Xt="middle";if(xr.fixedrange)return;at?(Xt=at==="n"?"top":"bottom",xr.side==="right"&&(xt="right")):nt==="e"&&(xt="right"),Br._context.showAxisRangeEntryBoxes&&v.select(ct).call(o.makeEditable,{gd:Br,immediate:!0,background:Br._fullLayout.paper_bgcolor,text:String(Hr),fill:xr.tickfont?xr.tickfont.color:"#444",horizontalAlign:xt,verticalAlign:Xt}).on("edit",function(vr){var Or=xr.d2r(vr);Or!==void 0&&t.call("_guiRelayout",Br,Ur,Or)})}}c.init(_t);var rr,er,Lr,fa,Da,Ia,qa,Wa,Ca,hi;function wi(Tt,ut,Br){var Cr=ct.getBoundingClientRect();rr=ut-Cr.left,er=Br-Cr.top,ce._fullLayout._calcInverseTransform(ce);var xr=x.apply3DTransform(ce._fullLayout._invTransform)(rr,er);rr=xr[0],er=xr[1],Lr={l:rr,r:rr,w:0,t:er,b:er,h:0},fa=ce._hmpixcount?ce._hmlumcount/ce._hmpixcount:E(ce._fullLayout.plot_bgcolor).getLuminance(),Da="M0,0H"+qt+"V"+Wt+"H0V0",Ia=!1,qa="xy",hi=!1,Wa=se(rt,fa,Pt,It,Da),Ca=le(rt,Pt,It)}function Kt(Tt,ut){if(ce._transitioningWithDuration)return!1;var Br=Math.max(0,Math.min(qt,Ce*Tt+rr)),Cr=Math.max(0,Math.min(Wt,Ee*ut+er)),xr=Math.abs(Br-rr),Ir=Math.abs(Cr-er);Lr.l=Math.min(rr,Br),Lr.r=Math.max(rr,Br),Lr.t=Math.min(er,Cr),Lr.b=Math.max(er,Cr);function Ur(){qa="",Lr.r=Lr.l,Lr.t=Lr.b,Ca.attr("d","M0,0Z")}if(kr.isSubplotConstrained)xr>R||Ir>R?(qa="xy",xr/qt>Ir/Wt?(Ir=xr*Wt/qt,er>Cr?Lr.t=er-Ir:Lr.b=er+Ir):(xr=Ir*qt/Wt,rr>Br?Lr.l=rr-xr:Lr.r=rr+xr),Ca.attr("d",ae(Lr))):Ur();else if(mr.isSubplotConstrained)if(xr>R||Ir>R){qa="xy";var Hr=Math.min(Lr.l/qt,(Wt-Lr.b)/Wt),xt=Math.max(Lr.r/qt,(Wt-Lr.t)/Wt);Lr.l=Hr*qt,Lr.r=xt*qt,Lr.b=(1-Hr)*Wt,Lr.t=(1-xt)*Wt,Ca.attr("d",ae(Lr))}else Ur();else!Sr||Ir0){var vr;if(mr.isSubplotConstrained||!qr&&Sr.length===1){for(vr=0;vr1&&(Ur.maxallowed!==void 0&&wt===(Ur.range[0]1&&(Hr.maxallowed!==void 0&&Ne===(Hr.range[0]=0?Math.min(ce,.9):1/(1/Math.max(ce,-.3)+3.222))}function $(ce,be,Ae){return ce?ce==="nsew"?Ae?"":be==="pan"?"move":"crosshair":ce.toLowerCase()+"-resize":"pointer"}function se(ce,be,Ae,De,ze){return ce.append("path").attr("class","zoombox").style({fill:be>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",r(Ae,De)).attr("d",ze+"Z")}function le(ce,be,Ae){return ce.append("path").attr("class","zoombox-corners").style({fill:a.background,stroke:a.defaultLine,"stroke-width":1,opacity:0}).attr("transform",r(be,Ae)).attr("d","M0,0Z")}function fe(ce,be,Ae,De,ze,Ze){ce.attr("d",De+"M"+Ae.l+","+Ae.t+"v"+Ae.h+"h"+Ae.w+"v-"+Ae.h+"h-"+Ae.w+"Z"),V(ce,be,ze,Ze)}function V(ce,be,Ae,De){Ae||(ce.transition().style("fill",De>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),be.transition().style("opacity",1).duration(200))}function Y(ce){v.select(ce).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function ee(ce){L&&ce.data&&ce._context.showTips&&(x.notifier(x._(ce,"Double-click to zoom back out"),"long"),L=!1)}function q(ce,be){return"M"+(ce.l-.5)+","+(be-R-.5)+"h-3v"+(2*R+1)+"h3ZM"+(ce.r+.5)+","+(be-R-.5)+"h3v"+(2*R+1)+"h-3Z"}function oe(ce,be){return"M"+(be-R-.5)+","+(ce.t-.5)+"v-3h"+(2*R+1)+"v3ZM"+(be-R-.5)+","+(ce.b+.5)+"v3h"+(2*R+1)+"v-3Z"}function ae(ce){var be=Math.floor(Math.min(ce.b-ce.t,ce.r-ce.l,R)/2);return"M"+(ce.l-3.5)+","+(ce.t-.5+be)+"h3v"+-be+"h"+be+"v-3h-"+(be+3)+"ZM"+(ce.r+3.5)+","+(ce.t-.5+be)+"h-3v"+-be+"h"+-be+"v-3h"+(be+3)+"ZM"+(ce.r+3.5)+","+(ce.b+.5-be)+"h-3v"+be+"h"+-be+"v3h"+(be+3)+"ZM"+(ce.l-3.5)+","+(ce.b+.5-be)+"h3v"+be+"h"+be+"v3h-"+(be+3)+"Z"}function j(ce,be,Ae,De,ze){for(var Ze=!1,at={},nt={},rt,st,Me,ye,he=(ze||{}).xaHash,Oe=(ze||{}).yaHash,tt=0;tt1&&x.warn("Full array edits are incompatible with other edits",h);var w=n[""][""];if(t(w))a.set(null);else if(Array.isArray(w))a.set(w);else return x.warn("Unrecognized full array edit value",h,w),!0;return T?!1:(c(l,_),m(o),!0)}var A=Object.keys(n).map(Number).sort(S),M=a.get(),g=M||[],b=s(_,h).get(),d=[],u=-1,y=g.length,f,R,L,z,F,N,O,P;for(f=0;fg.length-(O?0:1)){x.warn("index out of range",h,L);continue}if(N!==void 0)F.length>1&&x.warn("Insertion & removal are incompatible with edits to the same index.",h,L),t(N)?d.push(L):O?(N==="add"&&(N={}),g.splice(L,0,N),b&&b.splice(L,0,{})):x.warn("Unrecognized full object edit value",h,L,N),u===-1&&(u=L);else for(R=0;R=0;f--)g.splice(d[f],1),b&&b.splice(d[f],1);if(g.length?M||a.set(g):a.set(null),T)return!1;if(c(l,_),p!==v){var U;if(u===-1)U=A;else{for(y=Math.max(g.length,y),U=[],f=0;f=u));f++)U.push(L);for(f=u;f0&&x.log("Clearing previous rejected promises from queue."),l._promises=[]},Z.cleanLayout=function(l){var _,w;l||(l={}),l.xaxis1&&(l.xaxis||(l.xaxis=l.xaxis1),delete l.xaxis1),l.yaxis1&&(l.yaxis||(l.yaxis=l.yaxis1),delete l.yaxis1),l.scene1&&(l.scene||(l.scene=l.scene1),delete l.scene1);var A=(S.subplotsRegistry.cartesian||{}).attrRegex,M=(S.subplotsRegistry.polar||{}).attrRegex,g=(S.subplotsRegistry.ternary||{}).attrRegex,b=(S.subplotsRegistry.gl3d||{}).attrRegex,d=Object.keys(l);for(_=0;_3?(O.x=1.02,O.xanchor="left"):O.x<-2&&(O.x=-.02,O.xanchor="right"),O.y>3?(O.y=1.02,O.yanchor="bottom"):O.y<-2&&(O.y=-.02,O.yanchor="top")),l.dragmode==="rotate"&&(l.dragmode="orbit"),e.clean(l),l.template&&l.template.layout&&Z.cleanLayout(l.template.layout),l};function n(l,_,w=!1){var A=l[_],M=_.charAt(0);w&&Array.isArray(A)||A&&A!=="paper"&&(l[_]=t(A,M,!0))}Z.cleanData=function(l){for(var _=0;_0)return l.slice(0,_)}Z.hasParent=function(l,_){for(var w=p(_);w;){if(w in l)return!0;w=p(w)}return!1},Z.clearAxisTypes=function(l,_,w){for(var A=0;A<_.length;A++)for(var M=l._fullData[A],g=0;g<3;g++){var b=r(l,M,a[g]);if(b&&b.type!=="log"){var d=b._name,u=b._id.slice(1);if(u.slice(0,5)==="scene"){if(w[u]!==void 0)continue;d=u+"."+d}var y=d+".type";w[d]===void 0&&w[y]===void 0&&x.nestedProperty(l.layout,y).set(null)}}};var T=(l,_)=>{let w=(...A)=>A.every(M=>x.isPlainObject(M))||A.every(M=>Array.isArray(M));if([l,_].every(A=>Array.isArray(A))){if(l.length!==_.length)return!1;for(let A=0;Ax.isPlainObject(A))){if(Object.keys(l).length!==Object.keys(_).length)return!1;for(let A in l){if(A.startsWith("_"))continue;let M=l[A],g=_[A];if(M!==g&&!(w(M,g)?T(M,g):!1))return!1}return!0}return!1};Z.collectionsAreEqual=T}}),k2=Xe({"src/plot_api/plot_api.js"(Z){"use strict";var G=Hn(),v=rs(),x=i5(),S=sa(),E=S.nestedProperty,e=Qy(),t=iz(),r=so(),o=e1(),a=bc(),n=Go(),i=h5(),s=Wh(),h=es(),c=$n(),m=I5().initInteractions,p=vd(),T=Af().clearOutline,l=X0().dfltConfig,_=Bz(),w=Nz(),A=P_(),M=pc(),g=lh().AX_NAME_PATTERN,b=0,d=5;function u(Te,Ie,Ve,Ce){var Ee;if(Te=S.getGraphDiv(Te),e.init(Te),S.isPlainObject(Ie)){var Pe=Ie;Ie=Pe.data,Ve=Pe.layout,Ce=Pe.config,Ee=Pe.frames}var ft=e.triggerHandler(Te,"plotly_beforeplot",[Ie,Ve,Ce]);if(ft===!1)return Promise.reject();!Ie&&!Ve&&!S.isPlotDiv(Te)&&S.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",Te);function ct(){if(Ee)return Z.addFrames(Te,Ee)}z(Te,Ce),Ve||(Ve={}),G.select(Te).classed("js-plotly-plot",!0),h.makeTester(),Array.isArray(Te._promises)||(Te._promises=[]);var _t=(Te.data||[]).length===0&&Array.isArray(Ie);Array.isArray(Ie)&&(w.cleanData(Ie),_t?Te.data=Ie:Te.data.push.apply(Te.data,Ie),Te.empty=!1),(!Te.layout||_t)&&(Te.layout=w.cleanLayout(Ve)),a.supplyDefaults(Te);var Ct=Te._fullLayout,ir=Ct._has("cartesian");Ct._replotting=!0,(_t||Ct._shouldCreateBgLayer)&&(Ke(Te),Ct._shouldCreateBgLayer&&delete Ct._shouldCreateBgLayer),h.initGradients(Te),h.initPatterns(Te),_t&&n.saveShowSpikeInitial(Te);var rr=!Te.calcdata||Te.calcdata.length!==(Te._fullData||[]).length;rr&&a.doCalcdata(Te);for(var er=0;er=Te.data.length||Ee<-Te.data.length)throw new Error(Ve+" must be valid indices for gd.data.");if(Ie.indexOf(Ee,Ce+1)>-1||Ee>=0&&Ie.indexOf(-Te.data.length+Ee)>-1||Ee<0&&Ie.indexOf(Te.data.length+Ee)>-1)throw new Error("each index in "+Ve+" must be unique.")}}function U(Te,Ie,Ve){if(!Array.isArray(Te.data))throw new Error("gd.data must be an array.");if(typeof Ie>"u")throw new Error("currentIndices is a required argument.");if(Array.isArray(Ie)||(Ie=[Ie]),P(Te,Ie,"currentIndices"),typeof Ve<"u"&&!Array.isArray(Ve)&&(Ve=[Ve]),typeof Ve<"u"&&P(Te,Ve,"newIndices"),typeof Ve<"u"&&Ie.length!==Ve.length)throw new Error("current and new indices must be of equal length.")}function B(Te,Ie,Ve){var Ce,Ee;if(!Array.isArray(Te.data))throw new Error("gd.data must be an array.");if(typeof Ie>"u")throw new Error("traces must be defined.");for(Array.isArray(Ie)||(Ie=[Ie]),Ce=0;Ce"u")throw new Error("indices must be an integer or array of integers");P(Te,Ve,"indices");for(var Pe in Ie){if(!Array.isArray(Ie[Pe])||Ie[Pe].length!==Ve.length)throw new Error("attribute "+Pe+" must be an array of length equal to indices array length");if(Ee&&(!(Pe in Ce)||!Array.isArray(Ce[Pe])||Ce[Pe].length!==Ie[Pe].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 $(Te,Ie,Ve,Ce){var Ee=S.isPlainObject(Ce),Pe=[],ft,ct,_t,Ct,ir;Array.isArray(Ve)||(Ve=[Ve]),Ve=O(Ve,Te.data.length-1);for(var rr in Ie)for(var er=0;er=0&&ir=0&&ir"u")return Ct=Z.redraw(Te),t.add(Te,Ee,ft,Pe,ct),Ct;Array.isArray(Ve)||(Ve=[Ve]);try{U(Te,Ce,Ve)}catch(ir){throw Te.data.splice(Te.data.length-Ie.length,Ie.length),ir}return t.startSequence(Te),t.add(Te,Ee,ft,Pe,ct),Ct=Z.moveTraces(Te,Ce,Ve),t.stopSequence(Te),Ct}function ee(Te,Ie){Te=S.getGraphDiv(Te);var Ve=[],Ce=Z.addTraces,Ee=ee,Pe=[Te,Ve,Ie],ft=[Te,Ie],ct,_t;if(typeof Ie>"u")throw new Error("indices must be an integer or array of integers.");for(Array.isArray(Ie)||(Ie=[Ie]),P(Te,Ie,"indices"),Ie=O(Ie,Te.data.length-1),Ie.sort(S.sorterDes),ct=0;ct"u")for(Ve=[],Ct=0;Ct0&&typeof Yt.parts[ta]!="string";)ta--;var ra=Yt.parts[ta],ca=Yt.parts[ta-1]+"."+ra,Ba=Yt.parts.slice(0,ta).join("."),$a=E(Te.layout,Ba).get(),Za=E(Ce,Ba).get(),ri=Yt.get();if(Jt!==void 0){qa[Ft]=Jt,Wa[Ft]=ra==="reverse"?Jt:ae(ri);var pi=o.getLayoutValObject(Ce,Yt.parts);if(pi&&pi.impliedEdits&&Jt!==null)for(var Ra in pi.impliedEdits)Ca(S.relativeAttr(Ft,Ra),pi.impliedEdits[Ra]);if(["width","height"].indexOf(Ft)!==-1)if(Jt){Ca("autosize",null);var tn=Ft==="height"?"width":"height";Ca(tn,Ce[tn])}else Ce[Ft]=Te._initialAutoSize[Ft];else if(Ft==="autosize")Ca("width",Jt?null:Ce.width),Ca("height",Jt?null:Ce.height);else if(ca.match(ze))Kt(ca),E(Ce,Ba+"._inputRange").set(null);else if(ca.match(Ze)){Kt(ca),E(Ce,Ba+"._inputRange").set(null);var on=E(Ce,Ba).get();on._inputDomain&&(on._input.domain=on._inputDomain.slice())}else ca.match(at)&&E(Ce,Ba+"._inputDomain").set(null);if(ra==="type"){wi=$a;var hn=Za.type==="linear"&&Jt==="log",Tt=Za.type==="log"&&Jt==="linear";if(hn||Tt){if(!wi||!wi.range)Ca(Ba+".autorange",!0);else if(Za.autorange)hn&&(wi.range=wi.range[1]>wi.range[0]?[1,2]:[2,1]);else{var ut=wi.range[0],Br=wi.range[1];hn?(ut<=0&&Br<=0&&Ca(Ba+".autorange",!0),ut<=0?ut=Br/1e6:Br<=0&&(Br=ut/1e6),Ca(Ba+".range[0]",Math.log(ut)/Math.LN10),Ca(Ba+".range[1]",Math.log(Br)/Math.LN10)):(Ca(Ba+".range[0]",Math.pow(10,ut)),Ca(Ba+".range[1]",Math.pow(10,Br)))}Array.isArray(Ce._subplots.polar)&&Ce._subplots.polar.length&&Ce[Yt.parts[0]]&&Yt.parts[1]==="radialaxis"&&delete Ce[Yt.parts[0]]._subplot.viewInitial["radialaxis.range"],r.getComponentMethod("annotations","convertCoords")(Te,Za,Jt,Ca),r.getComponentMethod("images","convertCoords")(Te,Za,Jt,Ca)}else Ca(Ba+".autorange",!0),Ca(Ba+".range",null);E(Ce,Ba+"._inputRange").set(null)}else if(ra.match(g)){var Cr=E(Ce,Ft).get(),xr=(Jt||{}).type;(!xr||xr==="-")&&(xr="linear"),r.getComponentMethod("annotations","convertCoords")(Te,Cr,xr,Ca),r.getComponentMethod("images","convertCoords")(Te,Cr,xr,Ca)}var Ir=_.containerArrayMatch(Ft);if(Ir){ir=Ir.array,rr=Ir.index;var Ur=Ir.property,Hr=pi||{editType:"calc"};rr!==""&&Ur===""&&(_.isAddVal(Jt)?Wa[Ft]=null:_.isRemoveVal(Jt)?Wa[Ft]=(E(Ve,ir).get()||[])[rr]:S.warn("unrecognized full object value",Ie)),M.update(Ia,Hr),Ct[ir]||(Ct[ir]={});var xt=Ct[ir][rr];xt||(xt=Ct[ir][rr]={}),xt[Ur]=Jt,delete Ie[Ft]}else ra==="reverse"?($a.range?$a.range.reverse():(Ca(Ba+".autorange",!0),$a.range=[1,0]),Za.autorange?Ia.calc=!0:Ia.plot=!0):(Ft==="dragmode"&&(Jt===!1&&ri!==!1||Jt!==!1&&ri===!1)||Ce._has("scatter-like")&&Ce._has("regl")&&Ft==="dragmode"&&(Jt==="lasso"||Jt==="select")&&!(ri==="lasso"||ri==="select")?Ia.plot=!0:pi?M.update(Ia,pi):Ia.calc=!0,Yt.set(Jt))}}for(ir in Ct){var Xt=_.applyContainerArrayChanges(Te,Pe(Ve,ir),Ct[ir],Ia,Pe);Xt||(Ia.plot=!0)}for(var vr in hi){wi=n.getFromId(Te,vr);var Or=wi&&wi._constraintGroup;if(Or){Ia.calc=!0;for(var ba in Or)hi[ba]||(n.getFromId(Te,ba)._constraintShrinkable=!0)}}(rt(Te)||Ie.height||Ie.width)&&(Ia.plot=!0);var Pa=Ce.shapes;for(rr=0;rr1;)if(Ce.pop(),Ve=E(Ie,Ce.join(".")+".uirevision").get(),Ve!==void 0)return Ve;return Ie.uirevision}function ot(Te,Ie){for(var Ve=0;Ve[Ba,Te._ev.listeners(Ba)]);Pe=Z.newPlot(Te,Ie,Ve,Ce).then(()=>{for(let[Ba,$a]of ca)$a.forEach(Za=>Te.on(Ba,Za));return Z.react(Te,Ie,Ve,Ce)})}else{Te.data=Ie||[],w.cleanData(Te.data),Te.layout=Ve||{},w.cleanLayout(Te.layout),It(Te.data,Te.layout,ct,_t),a.supplyDefaults(Te,{skipUpdateCalc:!0});var rr=Te._fullData,er=Te._fullLayout,Lr=er.datarevision===void 0,fa=er.transition,Da=kr(Te,_t,er,Lr,fa),Ia=Da.newDataRevision,qa=Wt(Te,ct,rr,Lr,fa,Ia);if(rt(Te)&&(Da.layoutReplot=!0),qa.calc||Da.calc){Te.calcdata=void 0;for(var Wa=Object.getOwnPropertyNames(er),Ca=0;Ca(ir||Te.emit("plotly_react",{config:Ce,data:Ie,layout:Ve}),Te))}function Wt(Te,Ie,Ve,Ce,Ee,Pe){var ft=Ie.length===Ve.length;if(!Ee&&!ft)return{fullReplot:!0,calc:!0};var ct=M.traceFlags();ct.arrays={},ct.nChanges=0,ct.nChangesAnim=0;var _t,Ct;function ir(Lr){var fa=o.getTraceValObject(Ct,Lr);return!Ct._module.animatable&&fa.anim&&(fa.anim=!1),fa}var rr={getValObject:ir,flags:ct,immutable:Ce,transition:Ee,newDataRevision:Pe,gd:Te},er={};for(_t=0;_t=Ee.length?Ee[0]:Ee[Ct]:Ee}function ct(Ct){return Array.isArray(Pe)?Ct>=Pe.length?Pe[0]:Pe[Ct]:Pe}function _t(Ct,ir){var rr=0;return function(){if(Ct&&++rr===ir)return Ct()}}return new Promise(function(Ct,ir){function rr(){if(Ce._frameQueue.length!==0){for(;Ce._frameQueue.length;){var ra=Ce._frameQueue.pop();ra.onInterrupt&&ra.onInterrupt()}Te.emit("plotly_animationinterrupted",[])}}function er(ra){if(ra.length!==0){for(var ca=0;caCe._timeToNext&&fa()};ra()}var Ia=0;function qa(ra){return Array.isArray(Ee)?Ia>=Ee.length?ra.transitionOpts=Ee[Ia]:ra.transitionOpts=Ee[0]:ra.transitionOpts=Ee,Ia++,ra}var Wa,Ca,hi=[],wi=Ie==null,Kt=Array.isArray(Ie),Ft=!wi&&!Kt&&S.isPlainObject(Ie);if(Ft)hi.push({type:"object",data:qa(S.extendFlat({},Ie))});else if(wi||["string","number"].indexOf(typeof Ie)!==-1)for(Wa=0;Wa0&&FrFr)&&ta.push(Ca);hi=ta}}hi.length>0?er(hi):(Te.emit("plotly_animated"),Ct())})}function Sr(Te,Ie,Ve){if(Te=S.getGraphDiv(Te),Ie==null)return Promise.resolve();if(!S.isPlotDiv(Te))throw new Error("This element is not a Plotly plot: "+Te+". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/");var Ce,Ee,Pe,ft,ct=Te._transitionData._frames,_t=Te._transitionData._frameHash;if(!Array.isArray(Ie))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+Ie);var Ct=ct.length+Ie.length*2,ir=[],rr={};for(Ce=Ie.length-1;Ce>=0;Ce--)if(S.isPlainObject(Ie[Ce])){var er=Ie[Ce].name,Lr=(_t[er]||rr[er]||{}).name,fa=Ie[Ce].name,Da=_t[Lr]||rr[Lr];Lr&&fa&&typeof fa=="number"&&Da&&bYt.index?-1:Ft.index=0;Ce--){if(Ee=ir[Ce].frame,typeof Ee.name=="number"&&S.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!Ee.name)for(;_t[Ee.name="frame "+Te._transitionData._counter++];);if(_t[Ee.name]){for(Pe=0;Pe=0;Ve--)Ce=Ie[Ve],Pe.push({type:"delete",index:Ce}),ft.unshift({type:"insert",index:Ce,value:Ee[Ce]});var ct=a.modifyFrames,_t=a.modifyFrames,Ct=[Te,ft],ir=[Te,Pe];return t&&t.add(Te,ct,Ct,_t,ir),a.modifyFrames(Te,Pe)}function wt(Te){Te=S.getGraphDiv(Te);var Ie=Te._fullLayout||{},Ve=Te._fullData||[];return a.cleanPlot([],{},Ve,Ie),a.purge(Te),e.purge(Te),Ie._container&&Ie._container.remove(),delete Te._context,Te}function Ne(Te){var Ie=Te._fullLayout,Ve=Te.getBoundingClientRect();if(!S.equalDomRects(Ve,Ie._lastBBox)){var Ce=Ie._invTransform=S.inverseTransformMatrix(S.getFullTransformMatrix(Te));Ie._invScaleX=Math.sqrt(Ce[0][0]*Ce[0][0]+Ce[0][1]*Ce[0][1]+Ce[0][2]*Ce[0][2]),Ie._invScaleY=Math.sqrt(Ce[1][0]*Ce[1][0]+Ce[1][1]*Ce[1][1]+Ce[1][2]*Ce[1][2]),Ie._lastBBox=Ve}}function Ke(Te){var Ie=G.select(Te),Ve=Te._fullLayout;if(Ve._calcInverseTransform=Ne,Ve._calcInverseTransform(Te),Ve._container=Ie.selectAll(".plot-container").data([0]),Ve._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0).style({width:"100%",height:"100%"}),Ve._paperdiv=Ve._container.selectAll(".svg-container").data([0]),Ve._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),Ve._glcontainer=Ve._paperdiv.selectAll(".gl-container").data([{}]),Ve._glcontainer.enter().append("div").classed("gl-container",!0),Ve._paperdiv.selectAll(".main-svg").remove(),Ve._paperdiv.select(".modebar-container").remove(),Ve._paper=Ve._paperdiv.insert("svg",":first-child").classed("main-svg",!0),Ve._toppaper=Ve._paperdiv.append("svg").classed("main-svg",!0),Ve._modebardiv=Ve._paperdiv.append("div"),delete Ve._modeBar,Ve._hoverpaper=Ve._paperdiv.append("svg").classed("main-svg",!0),!Ve._uid){var Ce={};G.selectAll("defs").each(function(){this.id&&(Ce[this.id.split("-")[1]]=1)}),Ve._uid=S.randstr(Ce)}Ve._paperdiv.selectAll(".main-svg").attr(p.svgAttrs),Ve._defs=Ve._paper.append("defs").attr("id","defs-"+Ve._uid),Ve._clips=Ve._defs.append("g").classed("clips",!0),Ve._topdefs=Ve._toppaper.append("defs").attr("id","topdefs-"+Ve._uid),Ve._topclips=Ve._topdefs.append("g").classed("clips",!0),Ve._bgLayer=Ve._paper.append("g").classed("bglayer",!0),Ve._draggers=Ve._paper.append("g").classed("draglayer",!0);var Ee=Ve._paper.append("g").classed("layer-below",!0);Ve._imageLowerLayer=Ee.append("g").classed("imagelayer",!0),Ve._shapeLowerLayer=Ee.append("g").classed("shapelayer",!0),Ve._cartesianlayer=Ve._paper.append("g").classed("cartesianlayer",!0),Ve._polarlayer=Ve._paper.append("g").classed("polarlayer",!0),Ve._smithlayer=Ve._paper.append("g").classed("smithlayer",!0),Ve._ternarylayer=Ve._paper.append("g").classed("ternarylayer",!0),Ve._geolayer=Ve._paper.append("g").classed("geolayer",!0),Ve._funnelarealayer=Ve._paper.append("g").classed("funnelarealayer",!0),Ve._pielayer=Ve._paper.append("g").classed("pielayer",!0),Ve._iciclelayer=Ve._paper.append("g").classed("iciclelayer",!0),Ve._treemaplayer=Ve._paper.append("g").classed("treemaplayer",!0),Ve._sunburstlayer=Ve._paper.append("g").classed("sunburstlayer",!0),Ve._indicatorlayer=Ve._toppaper.append("g").classed("indicatorlayer",!0),Ve._glimages=Ve._paper.append("g").classed("glimages",!0);var Pe=Ve._toppaper.append("g").classed("layer-above",!0);Ve._imageUpperLayer=Pe.append("g").classed("imagelayer",!0),Ve._shapeUpperLayer=Pe.append("g").classed("shapelayer",!0),Ve._selectionLayer=Ve._toppaper.append("g").classed("selectionlayer",!0),Ve._infolayer=Ve._toppaper.append("g").classed("infolayer",!0),Ve._menulayer=Ve._toppaper.append("g").classed("menulayer",!0),Ve._zoomlayer=Ve._toppaper.append("g").classed("zoomlayer",!0),Ve._hoverlayer=Ve._hoverpaper.append("g").classed("hoverlayer",!0),Ve._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),Te.emit("plotly_framework")}Z.animate=qr,Z.addFrames=Sr,Z.deleteFrames=Rr,Z.addTraces=Y,Z.deleteTraces=ee,Z.extendTraces=fe,Z.moveTraces=q,Z.prependTraces=V,Z.newPlot=N,Z._doPlot=u,Z.purge=wt,Z.react=qt,Z.redraw=F,Z.relayout=be,Z.restyle=oe,Z.setPlotConfig=f,Z.update=st,Z._guiRelayout=Me(be),Z._guiRestyle=Me(oe),Z._guiUpdate=Me(st),Z._storeDirectGUIEdit=re}}),Yv=Xe({"src/snapshot/helpers.js"(Z){"use strict";var G=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(){G.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,E){if(E==="svg")return new window.Blob([S],{type:"image/svg+xml;charset=utf-8"});if(E==="full-json")return new window.Blob([S],{type:"application/json;charset=utf-8"});var e=x(window.atob(S));return new window.Blob([e],{type:"image/"+E})},Z.octetStream=function(S){document.location.href="data:application/octet-stream"+S};function x(S){for(var E=S.length,e=new ArrayBuffer(E),t=new Uint8Array(e),r=0;r")!==-1?"":s.html(c).text()});return s.remove(),h}function n(i){return i.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")}G.exports=function(s,h,c){var m=s._fullLayout,p=m._paper,T=m._toppaper,l=m.width,_=m.height,w;p.insert("rect",":first-child").call(S.setRect,0,0,l,_).call(E.fill,m.paper_bgcolor);var A=m._basePlotModules||[];for(w=0;w1&&M.push(s("object","layout"))),x.supplyDefaults(g);for(var u=g._fullData,y=b.length,f=0;fR.length&&A.push(s("unused",M,y.concat(R.length)));var P=R.length,U=Array.isArray(O);U&&(P=Math.min(P,O.length));var B,X,$,se,le;if(L.dimensions===2)for(X=0;XR[X].length&&A.push(s("unused",M,y.concat(X,R[X].length)));var fe=R[X].length;for(B=0;B<(U?Math.min(fe,O[X].length):fe);B++)$=U?O[X][B]:O,se=f[X][B],le=R[X][B],v.validate(se,$)?le!==se&&le!==+se&&A.push(s("dynamic",M,y.concat(X,B),se,le)):A.push(s("value",M,y.concat(X,B),se))}else A.push(s("array",M,y.concat(X),f[X]));else for(X=0;XF?A.push({code:"unused",traceType:f,templateCount:z,dataCount:F}):F>z&&A.push({code:"reused",traceType:f,templateCount:z,dataCount:F})}}function N(O,P){for(var U in O)if(U.charAt(0)!=="_"){var B=O[U],X=s(O,U,P);v(B)?(Array.isArray(O)&&B._template===!1&&B.templateitemname&&A.push({code:"missing",path:X,templateitemname:B.templateitemname}),N(B,X)):Array.isArray(B)&&h(B)&&N(B,X)}}if(N({data:g,layout:M},""),A.length)return A.map(c)};function h(m){for(var p=0;p=0;c--){var m=e[c];if(m.type==="scatter"&&m.xaxis===s.xaxis&&m.yaxis===s.yaxis){m.opacity=void 0;break}}}}}}}),Wz=Xe({"src/traces/scatter/layout_defaults.js"(Z,G){"use strict";var v=sa(),x=_2();G.exports=function(S,E){function e(r,o){return v.coerce(S,E,x,r,o)}var t=E.barmode==="group";E.scattermode==="group"&&e("scattergap",t?E.bargap:.2)}}}),tv=Xe({"src/plots/cartesian/align_period.js"(Z,G){"use strict";var v=rs(),x=sa(),S=x.dateTime2ms,E=x.incrementMonth,e=Hs(),t=e.ONEAVGMONTH;G.exports=function(o,a,n,i){if(a.type!=="date")return{vals:i};var s=o[n+"periodalignment"];if(!s)return{vals:i};var h=o[n+"period"],c;if(v(h)){if(h=+h,h<=0)return{vals:i}}else if(typeof h=="string"&&h.charAt(0)==="M"){var m=+h.substring(1);if(m>0&&Math.round(m)===m)c=m;else return{vals:i}}for(var p=a.calendar,T=s==="start",l=s==="end",_=o[n+"period0"],w=S(_,p)||0,A=[],M=[],g=[],b=i.length,d=0;du;)R=E(R,-c,p);for(;R<=u;)R=E(R,c,p);f=E(R,-c,p)}else{for(y=Math.round((u-w)/h),R=w+y*h;R>u;)R-=h;for(;R<=u;)R+=h;f=R-h}A[d]=T?f:l?R:(f+R)/2,M[d]=f,g[d]=R}return{vals:A,starts:M,ends:g}}}}),Fd=Xe({"src/traces/scatter/colorscale_calc.js"(Z,G){"use strict";var v=wp().hasColorscale,x=Tp(),S=Fu();G.exports=function(e,t){S.hasLines(t)&&v(t,"line")&&x(e,t,{vals:t.line.color,containerStr:"line",cLetter:"c"}),S.hasMarkers(t)&&(v(t,"marker")&&x(e,t,{vals:t.marker.color,containerStr:"marker",cLetter:"c"}),v(t,"marker.line")&&x(e,t,{vals:t.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}}}),Av=Xe({"src/traces/scatter/arrays_to_calcdata.js"(Z,G){"use strict";var v=sa();G.exports=function(S,E){for(var e=0;eN&&f[P].gap;)P--;for(B=f[P].s,O=f.length-1;O>P;O--)f[O].s=B;for(;Nse+X||!v($))}for(var fe=0;feP(B))):P(F.text);let U=F.outsidetextfont.size*a*O+o;return{ppadplus:N.some(B=>B.s<0)?U:0,ppadminus:N.some(B=>B.s>=0)?U:0}}return{ppadplus:void 0,ppadminus:void 0}}function R(F,N,O,P){for(var U=z(P),B=0;Bz[p]&&p0?e:t)/(p._m*_*(p._m>0?e:t)))),Ct*=1e3}if(ir===S){if(l&&(ir=p.c2p(_t.y,!0)),ir===S)return!1;ir*=1e3}return[Ct,ir]}function Q(ct,_t,Ct,ir){var rr=Ct-ct,er=ir-_t,Lr=.5-ct,fa=.5-_t,Da=rr*rr+er*er,Ia=rr*Lr+er*fa;if(Ia>0&&Ia1||Math.abs(Lr.y-Ct[0][1])>1)&&(Lr=[Lr.x,Lr.y],ir&&Ae(Lr,ct)Ze||ct[1]nt)return[a(ct[0],ze,Ze),a(ct[1],at,nt)]}function Pt(ct,_t){if(ct[0]===_t[0]&&(ct[0]===ze||ct[0]===Ze)||ct[1]===_t[1]&&(ct[1]===at||ct[1]===nt))return!0}function It(ct,_t){var Ct=[],ir=Qe(ct),rr=Qe(_t);return ir&&rr&&Pt(ir,rr)||(ir&&Ct.push(ir),rr&&Ct.push(rr)),Ct}function qt(ct,_t,Ct){return function(ir,rr){var er=Qe(ir),Lr=Qe(rr),fa=[];if(er&&Lr&&Pt(er,Lr))return fa;er&&fa.push(er),Lr&&fa.push(Lr);var Da=2*r.constrain((ir[ct]+rr[ct])/2,_t,Ct)-((er||ir)[ct]+(Lr||rr)[ct]);if(Da){var Ia;er&&Lr?Ia=Da>0==er[ct]>Lr[ct]?er:Lr:Ia=er||Lr,Ia[ct]+=Da}return fa}}var Wt;d==="linear"||d==="spline"?Wt=ot:d==="hv"||d==="vh"?Wt=It:d==="hvh"?Wt=qt(0,ze,Ze):d==="vhv"&&(Wt=qt(1,at,nt));function kr(ct,_t){var Ct=_t[0]-ct[0],ir=(_t[1]-ct[1])/Ct,rr=(ct[1]*_t[0]-_t[1]*ct[0])/Ct;return rr>0?[ir>0?ze:Ze,nt]:[ir>0?Ze:ze,at]}function mr(ct){var _t=ct[0],Ct=ct[1],ir=_t===z[F-1][0],rr=Ct===z[F-1][1];if(!(ir&&rr))if(F>1){var er=_t===z[F-2][0],Lr=Ct===z[F-2][1];ir&&(_t===ze||_t===Ze)&&er?Lr?F--:z[F-1]=ct:rr&&(Ct===at||Ct===nt)&&Lr?er?F--:z[F-1]=ct:z[F++]=ct}else z[F++]=ct}function qr(ct){z[F-1][0]!==ct[0]&&z[F-1][1]!==ct[1]&&mr([ye,he]),mr(ct),Oe=null,ye=he=0}var Sr=r.isArrayOrTypedArray(M);function Rr(ct){if(ct&&A&&(ct.i=N,ct.d=s,ct.trace=c,ct.marker=Sr?M[ct.i]:M,ct.backoff=A),re=ct[0]/_,ce=ct[1]/w,st=ct[0]Ze?Ze:0,Me=ct[1]nt?nt:0,st||Me){if(!F)z[F++]=[st||ct[0],Me||ct[1]];else if(Oe){var _t=Wt(Oe,ct);_t.length>1&&(qr(_t[0]),z[F++]=_t[1])}else tt=Wt(z[F-1],ct)[0],z[F++]=tt;var Ct=z[F-1];st&&Me&&(Ct[0]!==st||Ct[1]!==Me)?(Oe&&(ye!==st&&he!==Me?mr(ye&&he?kr(Oe,ct):[ye||st,he||Me]):ye&&he&&mr([ye,he])),mr([st,Me])):ye-st&&he-Me&&mr([st||ye,Me||he]),Oe=ct,ye=st,he=Me}else Oe&&qr(Wt(Oe,ct)[0]),z[F++]=ct}for(N=0;Nbe(X,wt))break;P=X,ee=le[0]*se[0]+le[1]*se[1],ee>V?(V=ee,U=X,$=!1):ee=s.length||!X)break;Rr(X),O=X}}Oe&&mr([ye||Oe[0],he||Oe[1]]),f.push(z.slice(0,F))}var Ne=d.slice(d.length-1);if(A&&Ne!=="h"&&Ne!=="v"){for(var Ke=!1,Te=-1,Ie=[],Ve=0;Ve=0?n=m:(n=m=c,c++),n0,d=a(m,p,T);if(A=l.selectAll("g.trace").data(d,function(y){return y[0].trace.uid}),A.enter().append("g").attr("class",function(y){return"trace scatter trace"+y[0].trace.uid}).style("stroke-miterlimit",2),A.order(),i(m,A,p),b){w&&(M=w());var u=v.transition().duration(_.duration).ease(_.easing).each("end",function(){M&&M()}).each("interrupt",function(){M&&M()});u.each(function(){l.selectAll("g.trace").each(function(y,f){s(m,f,p,y,d,this,_)})})}else A.each(function(y,f){s(m,f,p,y,d,this,_)});g&&A.exit().remove(),l.selectAll("path:not([d])").remove()};function i(c,m,p){m.each(function(T){var l=E(v.select(this),"g","fills");t.setClipUrl(l,p.layerClipId,c);var _=T[0].trace;_._ownFill=null,_._nextFill=null;var w=[];_._ownfill&&w.push("_ownFill"),_._nexttrace&&w.push("_nextFill");var A=l.selectAll("g").data(w,e);A.enter().append("g"),A.exit().remove(),A.order().each(function(M){_[M]=E(v.select(this),"path","js-fill")})})}function s(c,m,p,T,l,_,w){var A=c._context.staticPlot,M;h(c,m,p,T,l);var g=!!w&&w.duration>0;function b(mr){return g?mr.transition():mr}var d=p.xaxis,u=p.yaxis,y=T[0].trace,f=y.line,R=v.select(_),L=E(R,"g","errorbars"),z=E(R,"g","lines"),F=E(R,"g","points"),N=E(R,"g","text");if(x.getComponentMethod("errorbars","plot")(c,L,p,w),y.visible!==!0)return;b(R).style("opacity",y.opacity);var O,P,U=y.fill.charAt(y.fill.length-1);U!=="x"&&U!=="y"&&(U="");var B,X;U==="y"?(B=1,X=u.c2p(0,!0)):U==="x"&&(B=0,X=d.c2p(0,!0)),T[0][p.isRangePlot?"nodeRangePlot3":"node3"]=R;var $="",se=[],le=y._prevtrace,fe=null,V=null;le&&($=le._prevRevpath||"",P=le._nextFill,se=le._ownPolygons,fe=le._fillsegments,V=le._fillElement);var Y,ee,q="",oe="",ae,j,Q,re,ce,be,Ae=[];y._polygons=[];var De=[],ze=[],Ze=S.noop;if(O=y._ownFill,r.hasLines(y)||y.fill!=="none"){P&&P.datum(T),["hv","vh","hvh","vhv"].indexOf(f.shape)!==-1?(ae=t.steps(f.shape),j=t.steps(f.shape.split("").reverse().join(""))):f.shape==="spline"?ae=j=function(mr){var qr=mr[mr.length-1];return mr.length>1&&mr[0][0]===qr[0]&&mr[0][1]===qr[1]?t.smoothclosed(mr.slice(1),f.smoothing):t.smoothopen(mr,f.smoothing)}:ae=j=function(mr){return"M"+mr.join("L")},Q=function(mr){return j(mr.reverse())},ze=o(T,{xaxis:d,yaxis:u,trace:y,connectGaps:y.connectgaps,baseTolerance:Math.max(f.width||1,3)/4,shape:f.shape,backoff:f.backoff,simplify:f.simplify,fill:y.fill}),De=new Array(ze.length);var at=0;for(M=0;M=A[0]&&R.x<=A[1]&&R.y>=M[0]&&R.y<=M[1]}),u=Math.ceil(d.length/b),y=0;l.forEach(function(R,L){var z=R[0].trace;r.hasMarkers(z)&&z.marker.maxdisplayed>0&&L=Math.min(le,fe)&&p<=Math.max(le,fe)?0:1/0}var V=Math.max(3,se.mrc||0),Y=1-1/V,ee=Math.abs(c.c2p(se.x)-p);return ee=Math.min(le,fe)&&T<=Math.max(le,fe)?0:1/0}var V=Math.max(3,se.mrc||0),Y=1-1/V,ee=Math.abs(m.c2p(se.y)-T);return eeoe!=De>=oe&&(ce=Q[j-1][0],be=Q[j][0],De-Ae&&(re=ce+(be-ce)*(oe-Ae)/(De-Ae),V=Math.min(V,re),Y=Math.max(Y,re)));return V=Math.max(V,0),Y=Math.min(Y,c._length),{x0:V,x1:Y,y0:oe,y1:oe}}if(_.indexOf("fills")!==-1&&h._fillElement){var B=P(h._fillElement)&&!P(h._fillExclusionElement);if(B){var X=U(h._polygons);X===null&&(X={x0:l[0],x1:l[0],y0:l[1],y1:l[1]});var $=e.defaultLine;return e.opacity(h.fillcolor)?$=h.fillcolor:e.opacity((h.line||{}).color)&&($=h.line.color),v.extendFlat(o,{distance:o.maxHoverDistance,x0:X.x0,x1:X.x1,y0:X.y0,y1:X.y1,color:$,hovertemplate:!1}),delete o.index,h.text&&!v.isArrayOrTypedArray(h.text)?o.text=String(h.text):o.text=h.name,[o]}}}}}),c1=Xe({"src/traces/scatter/select.js"(Z,G){"use strict";var v=Fu();G.exports=function(S,E){var e=S.cd,t=S.xaxis,r=S.yaxis,o=[],a=e[0].trace,n,i,s,h,c=!v.hasMarkers(a)&&!v.hasText(a);if(c)return[];if(E===!1)for(n=0;n0&&(i["_"+a+"axes"]||{})[o])return i;if((i[a+"axis"]||a)===o){if(t(i,a))return i;if((i[a]||[]).length||i[a+"0"])return i}}}function e(r){return{v:"x",h:"y"}[r.orientation||"v"]}function t(r,o){var a=e(r),n=v(r,"box-violin"),i=v(r._fullInput||{},"candlestick");return n&&!i&&o===a&&r[a]===void 0&&r[a+"0"]===void 0}}}),I2=Xe({"src/plots/cartesian/category_order_defaults.js"(Z,G){"use strict";var v=bp().isTypedArraySpec;function x(S,E){var e=E.dataAttr||S._id.charAt(0),t={},r,o,a;if(E.axData)r=E.axData;else for(r=[],o=0;o0||v(o),n;a&&(n="array");var i=t("categoryorder",n),s;i==="array"&&(s=t("categoryarray")),!a&&i==="array"&&(i=e.categoryorder="trace"),i==="trace"?e._initialCategories=[]:i==="array"?e._initialCategories=s.slice():(s=x(e,r).sort(),i==="category ascending"?e._initialCategories=s:i==="category descending"&&(e._initialCategories=s.reverse()))}}}}),z_=Xe({"src/plots/cartesian/line_grid_defaults.js"(Z,G){"use strict";var v=Ch().mix,x=sh(),S=sa();G.exports=function(e,t,r,o){o=o||{};var a=o.dfltColor;function n(f,R){return S.coerce2(e,t,o.attributes,f,R)}var i=n("linecolor",a),s=n("linewidth"),h=r("showline",o.showLine||!!i||!!s);h||(delete t.linecolor,delete t.linewidth);var c=v(a,o.bgColor,o.blend||x.lightFraction).toRgbString(),m=n("gridcolor",c),p=n("gridwidth"),T=n("griddash"),l=r("showgrid",o.showGrid||!!m||!!p||!!T);if(l||(delete t.gridcolor,delete t.gridwidth,delete t.griddash),o.hasMinor){var _=v(t.gridcolor,o.bgColor,67).toRgbString(),w=n("minor.gridcolor",_),A=n("minor.gridwidth",t.gridwidth||1),M=n("minor.griddash",t.griddash||"solid"),g=r("minor.showgrid",!!w||!!A||!!M);g||(delete t.minor.gridcolor,delete t.minor.gridwidth,delete t.minor.griddash)}if(!o.noZeroLine){var b=n("zerolinelayer"),d=n("zerolinecolor",a),u=n("zerolinewidth"),y=r("zeroline",o.showGrid||!!d||!!u);y||(delete t.zerolinelayer,delete t.zerolinecolor,delete t.zerolinewidth)}}}}),F_=Xe({"src/plots/cartesian/axis_defaults.js"(Z,G){"use strict";var v=rs(),x=so(),S=sa(),E=zl(),e=hp(),t=Wh(),r=Y0(),o=t1(),a=Qm(),n=e0(),i=I2(),s=z_(),h=h5(),c=wv(),m=lh().WEEKDAY_PATTERN,p=lh().HOUR_PATTERN;G.exports=function(A,M,g,b,d){var u=b.letter,y=b.font||{},f=b.splomStash||{},R=g("visible",!b.visibleDflt),L=M._template||{},z=M.type||L.type||"-",F;if(z==="date"){var N=x.getComponentMethod("calendars","handleDefaults");N(A,M,"calendar",b.calendar),b.noTicklabelmode||(F=g("ticklabelmode"))}!b.noTicklabelindex&&(z==="date"||z==="linear")&&g("ticklabelindex");var O="";(!b.noTicklabelposition||z==="multicategory")&&(O=S.coerce(A,M,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:F==="period"?["outside","inside"]:u==="x"?["outside","inside","outside left","inside left","outside right","inside right"]:["outside","inside","outside top","inside top","outside bottom","inside bottom"]}},"ticklabelposition")),b.noTicklabeloverflow||g("ticklabeloverflow",O.indexOf("inside")!==-1?"hide past domain":z==="category"||z==="multicategory"?"allow":"hide past div"),c(M,d),h(A,M,g,b),i(A,M,g,b),b.noHover||(z!=="category"&&g("hoverformat"),b.noUnifiedhovertitle||g("unifiedhovertitle.text"));var P=g("color"),U=P!==t.color.dflt?P:y.color,B=f.label||d._dfltTitle[u];if(n(A,M,g,z,b),!R)return M;g("title.text",B),S.coerceFont(g,"title.font",y,{overrideDflt:{size:S.bigFont(y.size),color:U}}),r(A,M,g,z);var X=b.hasMinor;if(X&&(E.newContainer(M,"minor"),r(A,M,g,z,{isMinor:!0})),a(A,M,g,z,b),o(A,M,g,b),X){var $=b.isMinor;b.isMinor=!0,o(A,M,g,b),b.isMinor=$}s(A,M,g,{dfltColor:P,bgColor:b.bgColor,showGrid:b.showGrid,hasMinor:X,attributes:t}),X&&!M.minor.ticks&&!M.minor.showgrid&&delete M.minor,(M.showline||M.ticks)&&g("mirror");var se=z==="multicategory";if(!b.noTickson&&(z==="category"||se)&&(M.ticks||M.showgrid)&&(se?(g("tickson","boundaries"),delete M.ticklabelposition):g("tickson")),se){var le=g("showdividers");le&&(g("dividercolor"),g("dividerwidth"))}if(z==="date")if(e(A,M,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:T}),!M.rangebreaks.length)delete M.rangebreaks;else{for(var fe=0;fe=2){var u="",y,f;if(d.length===2){for(y=0;y<2;y++)if(f=_(d[y]),f){u=m;break}}var R=g("pattern",u);if(R===m)for(y=0;y<2;y++)f=_(d[y]),f&&(A.bounds[y]=d[y]=f-1);if(R)for(y=0;y<2;y++)switch(f=d[y],R){case m:if(!v(f)){A.enabled=!1;return}if(f=+f,f!==Math.floor(f)||f<0||f>=7){A.enabled=!1;return}A.bounds[y]=d[y]=f;break;case p:if(!v(f)){A.enabled=!1;return}if(f=+f,f<0||f>24){A.enabled=!1;return}A.bounds[y]=d[y]=f;break}if(M.autorange===!1){var L=M.range;if(L[0]L[1]){A.enabled=!1;return}}else if(d[0]>L[0]&&d[1]g[1]-1/4096&&(e.domain=c),x.noneOrAll(E.domain,e.domain,c),e.tickmode==="sync"&&(e.tickmode="auto")}return t("layer"),e}}}),Kz=Xe({"src/plots/cartesian/layout_defaults.js"(Z,G){"use strict";var v=sa(),x=$n(),S=$p().isUnifiedHover,E=x5(),e=zl(),t=$y(),r=Wh(),o=B5(),a=F_(),n=J0(),i=R2(),s=ef(),h=s.id2name,c=s.name2id,m=lh().AX_ID_PATTERN,p=so(),T=p.traceIs,l=p.getComponentMethod;function _(w,A,M){Array.isArray(w[A])?w[A].push(M):w[A]=[M]}G.exports=function(A,M,g){var b=M.autotypenumbers,d={},u={},y={},f={},R={},L={},z={},F={},N={},O={},P,U;for(P=0;P rect").call(E.setTranslate,0,0).call(E.setScale,1,1),M.plot.call(E.setTranslate,g._offset,b._offset).call(E.setScale,1,1);var d=M.plot.selectAll(".scatterlayer .trace");d.selectAll(".point").call(E.setPointGroupScale,1,1),d.selectAll(".textpoint").call(E.setTextPointsScale,1,1),d.call(E.hideOutsideRangePoints,M)}function h(M,g){var b=M.plotinfo,d=b.xaxis,u=b.yaxis,y=d._length,f=u._length,R=!!M.xr1,L=!!M.yr1,z=[];if(R){var F=S.simpleMap(M.xr0,d.r2l),N=S.simpleMap(M.xr1,d.r2l),O=F[1]-F[0],P=N[1]-N[0];z[0]=(F[0]*(1-g)+g*N[0]-F[0])/(F[1]-F[0])*y,z[2]=y*(1-g+g*P/O),d.range[0]=d.l2r(F[0]*(1-g)+g*N[0]),d.range[1]=d.l2r(F[1]*(1-g)+g*N[1])}else z[0]=0,z[2]=y;if(L){var U=S.simpleMap(M.yr0,u.r2l),B=S.simpleMap(M.yr1,u.r2l),X=U[1]-U[0],$=B[1]-B[0];z[1]=(U[1]*(1-g)+g*B[1]-U[1])/(U[0]-U[1])*f,z[3]=f*(1-g+g*$/X),u.range[0]=d.l2r(U[0]*(1-g)+g*B[0]),u.range[1]=u.l2r(U[1]*(1-g)+g*B[1])}else z[1]=0,z[3]=f;e.drawOne(r,d,{skipTitle:!0}),e.drawOne(r,u,{skipTitle:!0}),e.redrawComponents(r,[d._id,u._id]);var se=R?y/z[2]:1,le=L?f/z[3]:1,fe=R?z[0]:0,V=L?z[1]:0,Y=R?z[0]/z[2]*y:0,ee=L?z[1]/z[3]*f:0,q=d._offset-Y,oe=u._offset-ee;b.clipRect.call(E.setTranslate,fe,V).call(E.setScale,1/se,1/le),b.plot.call(E.setTranslate,q,oe).call(E.setScale,se,le),E.setPointGroupScale(b.zoomScalePts,1/se,1/le),E.setTextPointsScale(b.zoomScaleTxt,1/se,1/le)}var c;n&&(c=n());function m(){for(var M={},g=0;ga.duration?(m(),_=window.cancelAnimationFrame(A)):_=window.requestAnimationFrame(A)}return T=Date.now(),_=window.requestAnimationFrame(A),Promise.resolve()}}}),Kf=Xe({"src/plots/cartesian/index.js"(Z){"use strict";var G=Hn(),v=so(),x=sa(),S=bc(),E=es(),e=Hh().getModuleCalcData,t=ef(),r=lh(),o=vd(),a=x.ensureSingle;function n(T,l,_){return x.ensureSingle(T,l,_,function(w){w.datum(_)})}var i=r.zindexSeparator;Z.name="cartesian",Z.attr=["xaxis","yaxis"],Z.idRoot=["x","y"],Z.idRegex=r.idRegex,Z.attrRegex=r.attrRegex,Z.attributes=Yz(),Z.layoutAttributes=Wh(),Z.supplyLayoutDefaults=Kz(),Z.transitionAxes=Jz(),Z.finalizeSubplots=function(T,l){var _=l._subplots,w=_.xaxis,A=_.yaxis,M=_.cartesian,g=M,b={},d={},u,y,f;for(u=0;u0){var L=R.id;if(L.indexOf(i)!==-1)continue;L+=i+(u+1),R=x.extendFlat({},R,{id:L,plot:A._cartesianlayer.selectAll(".subplot").select("."+L)})}for(var z=[],F,N=0;N1&&(X+=i+B),U.push(b+X),g=0;g1,f=l.mainplotinfo;if(!l.mainplot||y)if(u)l.xlines=a(w,"path","xlines-above"),l.ylines=a(w,"path","ylines-above"),l.xaxislayer=a(w,"g","xaxislayer-above"),l.yaxislayer=a(w,"g","yaxislayer-above");else{if(!g){var R=a(w,"g","layer-subplot");l.shapelayer=a(R,"g","shapelayer"),l.imagelayer=a(R,"g","imagelayer"),f&&y?(l.minorGridlayer=f.minorGridlayer,l.gridlayer=f.gridlayer,l.zerolinelayer=f.zerolinelayer):(l.minorGridlayer=a(w,"g","minor-gridlayer"),l.gridlayer=a(w,"g","gridlayer"),l.zerolinelayer=a(w,"g","zerolinelayer"));var L=a(w,"g","layer-between");l.shapelayerBetween=a(L,"g","shapelayer"),l.imagelayerBetween=a(L,"g","imagelayer"),a(w,"path","xlines-below"),a(w,"path","ylines-below"),l.overlinesBelow=a(w,"g","overlines-below"),a(w,"g","xaxislayer-below"),a(w,"g","yaxislayer-below"),l.overaxesBelow=a(w,"g","overaxes-below")}l.overplot=a(w,"g","overplot"),l.plot=a(l.overplot,"g",A),f&&y?l.zerolinelayerAbove=f.zerolinelayerAbove:l.zerolinelayerAbove=a(w,"g","zerolinelayer-above"),g||(l.xlines=a(w,"path","xlines-above"),l.ylines=a(w,"path","ylines-above"),l.overlinesAbove=a(w,"g","overlines-above"),a(w,"g","xaxislayer-above"),a(w,"g","yaxislayer-above"),l.overaxesAbove=a(w,"g","overaxes-above"),l.xlines=w.select(".xlines-"+b),l.ylines=w.select(".ylines-"+d),l.xaxislayer=w.select(".xaxislayer-"+b),l.yaxislayer=w.select(".yaxislayer-"+d))}else{var z=f.plotgroup,F=A+"-x",N=A+"-y";l.minorGridlayer=f.minorGridlayer,l.gridlayer=f.gridlayer,l.zerolinelayer=f.zerolinelayer,l.zerolinelayerAbove=f.zerolinelayerAbove,a(f.overlinesBelow,"path",F),a(f.overlinesBelow,"path",N),a(f.overaxesBelow,"g",F),a(f.overaxesBelow,"g",N),l.plot=a(f.overplot,"g",A),a(f.overlinesAbove,"path",F),a(f.overlinesAbove,"path",N),a(f.overaxesAbove,"g",F),a(f.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)}g||(u||(n(l.minorGridlayer,"g",l.xaxis._id),n(l.minorGridlayer,"g",l.yaxis._id),l.minorGridlayer.selectAll("g").map(function(O){return O[0]}).sort(t.idSort),n(l.gridlayer,"g",l.xaxis._id),n(l.gridlayer,"g",l.yaxis._id),l.gridlayer.selectAll("g").map(function(O){return O[0]}).sort(t.idSort)),l.xlines.style("fill","none").classed("crisp",!0),l.ylines.style("fill","none").classed("crisp",!0))}function m(T,l){if(T){var _={};T.each(function(d){var u=d[0],y=G.select(this);y.remove(),p(u,l),_[u]=!0});for(var w in l._plots)for(var A=l._plots[w],M=A.overlays||[],g=0;g=0,l=n.indexOf("end")>=0,_=h.backoff*m+i.standoff,w=c.backoff*p+i.startstandoff,A,M,g,b;if(s.nodeName==="line"){A={x:+a.attr("x1"),y:+a.attr("y1")},M={x:+a.attr("x2"),y:+a.attr("y2")};var d=A.x-M.x,u=A.y-M.y;if(g=Math.atan2(u,d),b=g+Math.PI,_&&w&&_+w>Math.sqrt(d*d+u*u)){X();return}if(_){if(_*_>d*d+u*u){X();return}var y=_*Math.cos(g),f=_*Math.sin(g);M.x+=y,M.y+=f,a.attr({x2:M.x,y2:M.y})}if(w){if(w*w>d*d+u*u){X();return}var R=w*Math.cos(g),L=w*Math.sin(g);A.x-=R,A.y-=L,a.attr({x1:A.x,y1:A.y})}}else if(s.nodeName==="path"){var z=s.getTotalLength(),F="";if(z<_+w){X();return}var N=s.getPointAtLength(0),O=s.getPointAtLength(.1);g=Math.atan2(N.y-O.y,N.x-O.x),A=s.getPointAtLength(Math.min(w,z)),F="0px,"+w+"px,";var P=s.getPointAtLength(z),U=s.getPointAtLength(z-.1);b=Math.atan2(P.y-U.y,P.x-U.x),M=s.getPointAtLength(Math.max(0,z-_));var B=F?w+_:_;F+=z-B+"px,"+z+"px",a.style("stroke-dasharray",F)}function X(){a.style("stroke-dasharray","0px,100px")}function $(se,le,fe,V){se.path&&(se.noRotate&&(fe=0),v.select(s.parentNode).append("path").attr({class:a.attr("class"),d:se.path,transform:r(le.x,le.y)+t(fe*180/Math.PI)+e(V)}).style({fill:x.rgb(i.arrowcolor),"stroke-width":0}))}T&&$(c,A,g,p),l&&$(h,M,b,m)}}}),D2=Xe({"src/components/annotations/draw.js"(Z,G){"use strict";var v=Hn(),x=so(),S=bc(),E=sa(),e=E.strTranslate,t=Go(),r=$n(),o=es(),a=rf(),n=ou(),i=Kd(),s=Ap(),h=zl().arrayEditor,c=Qz();G.exports={draw:m,drawOne:p,drawRaw:l};function m(_){var w=_._fullLayout;w._infolayer.selectAll(".annotation").remove();for(var A=0;A2/3?Ca="right":Ca="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[Ca]}for(var tt=!1,ot=["x","y"],Qe=0;Qe1)&&(qt===It?(Pe=Wt.r2fraction(w["a"+Pt]),(Pe<0||Pe>1)&&(tt=!0)):tt=!0),Ke=Wt._offset+Wt.r2p(w[Pt]),Ve=.5}else{var ft=Ee==="domain";Pt==="x"?(Ie=w[Pt],Ke=ft?Wt._offset+Wt._length*Ie:Ke=u.l+u.w*Ie):(Ie=1-w[Pt],Ke=ft?Wt._offset+Wt._length*Ie:Ke=u.t+u.h*Ie),Ve=w.showarrow?.5:Ie}if(w.showarrow){Ne.head=Ke;var ct=w["a"+Pt];if(Ce=mr*Oe(.5,w.xanchor)-qr*Oe(.5,w.yanchor),qt===It){var _t=t.getRefType(qt);_t==="domain"?(Pt==="y"&&(ct=1-ct),Ne.tail=Wt._offset+Wt._length*ct):_t==="paper"?Pt==="y"?(ct=1-ct,Ne.tail=u.t+u.h*ct):Ne.tail=u.l+u.w*ct:Ne.tail=Wt._offset+Wt.r2p(ct),Te=Ce}else Ne.tail=Ke+ct,Te=Ce+ct;Ne.text=Ne.tail+Ce;var Ct=d[Pt==="x"?"width":"height"];if(It==="paper"&&(Ne.head=E.constrain(Ne.head,1,Ct-1)),qt==="pixel"){var ir=-Math.max(Ne.tail-3,Ne.text),rr=Math.min(Ne.tail+3,Ne.text)-Ct;ir>0?(Ne.tail+=ir,Ne.text+=ir):rr>0&&(Ne.tail-=rr,Ne.text-=rr)}Ne.tail+=wt,Ne.head+=wt}else Ce=Sr*Oe(Ve,Rr),Te=Ce,Ne.text=Ke+Ce;Ne.text+=wt,Ce+=wt,Te+=wt,w["_"+Pt+"padplus"]=Sr/2+Te,w["_"+Pt+"padminus"]=Sr/2-Te,w["_"+Pt+"size"]=Sr,w["_"+Pt+"shift"]=Ce}if(tt){fe.remove();return}var er=0,Lr=0;if(w.align!=="left"&&(er=(st-nt)*(w.align==="center"?.5:1)),w.valign!=="top"&&(Lr=(Me-rt)*(w.valign==="middle"?.5:1)),Ze)ze.select("svg").attr({x:ee+er-1,y:ee+Lr}).call(o.setClipUrl,oe?O:null,_);else{var fa=ee+Lr-at.top,Da=ee+er-at.left;re.call(n.positionText,Da,fa).call(o.setClipUrl,oe?O:null,_)}ae.select("rect").call(o.setRect,ee,ee,st,Me),q.call(o.setRect,V/2,V/2,ye-V,he-V),fe.call(o.setTranslate,Math.round(P.x.text-ye/2),Math.round(P.y.text-he/2)),X.attr({transform:"rotate("+U+","+P.x.text+","+P.y.text+")"});var Ia=function(Wa,Ca){B.selectAll(".annotation-arrow-g").remove();var hi=P.x.head,wi=P.y.head,Kt=P.x.tail+Wa,Ft=P.y.tail+Ca,Yt=P.x.text+Wa,Jt=P.y.text+Ca,Fr=E.rotationXYMatrix(U,Yt,Jt),ta=E.apply2DTransform(Fr),ra=E.apply2DTransform2(Fr),ca=+q.attr("width"),Ba=+q.attr("height"),$a=Yt-.5*ca,Za=$a+ca,ri=Jt-.5*Ba,pi=ri+Ba,Ra=[[$a,ri,$a,pi],[$a,pi,Za,pi],[Za,pi,Za,ri],[Za,ri,$a,ri]].map(ra);if(!Ra.reduce(function(xt,Xt){return xt^!!E.segmentsIntersect(hi,wi,hi+1e6,wi+1e6,Xt[0],Xt[1],Xt[2],Xt[3])},!1)){Ra.forEach(function(xt){var Xt=E.segmentsIntersect(Kt,Ft,hi,wi,xt[0],xt[1],xt[2],xt[3]);Xt&&(Kt=Xt.x,Ft=Xt.y)});var tn=w.arrowwidth,on=w.arrowcolor,hn=w.arrowside,Tt=B.append("g").style({opacity:r.opacity(on)}).classed("annotation-arrow-g",!0),ut=Tt.append("path").attr("d","M"+Kt+","+Ft+"L"+hi+","+wi).style("stroke-width",tn+"px").call(r.stroke,r.rgb(on));if(c(ut,hn,w),y.annotationPosition&&ut.node().parentNode&&!M){var Br=hi,Cr=wi;if(w.standoff){var xr=Math.sqrt(Math.pow(hi-Kt,2)+Math.pow(wi-Ft,2));Br+=w.standoff*(Kt-hi)/xr,Cr+=w.standoff*(Ft-wi)/xr}var Ir=Tt.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(Kt-Br)+","+(Ft-Cr),transform:e(Br,Cr)}).style("stroke-width",tn+6+"px").call(r.stroke,"rgba(0,0,0,0)").call(r.fill,"rgba(0,0,0,0)"),Ur,Hr;s.init({element:Ir.node(),gd:_,prepFn:function(){var xt=o.getTranslate(fe);Ur=xt.x,Hr=xt.y,g&&g.autorange&&z(g._name+".autorange",!0),b&&b.autorange&&z(b._name+".autorange",!0)},moveFn:function(xt,Xt){var vr=ta(Ur,Hr),Or=vr[0]+xt,ba=vr[1]+Xt;fe.call(o.setTranslate,Or,ba),F("x",T(g,xt,"x",u,w)),F("y",T(b,Xt,"y",u,w)),w.axref===w.xref&&F("ax",T(g,xt,"ax",u,w)),w.ayref===w.yref&&F("ay",T(b,Xt,"ay",u,w)),Tt.attr("transform",e(xt,Xt)),X.attr({transform:"rotate("+U+","+Or+","+ba+")"})},doneFn:function(){x.call("_guiRelayout",_,N());var xt=document.querySelector(".js-notes-box-panel");xt&&xt.redraw(xt.selectedObj)}})}}};if(w.showarrow&&Ia(0,0),$){var qa;s.init({element:fe.node(),gd:_,prepFn:function(){qa=X.attr("transform")},moveFn:function(Wa,Ca){var hi="pointer";if(w.showarrow)w.axref===w.xref?F("ax",T(g,Wa,"ax",u,w)):F("ax",w.ax+Wa),w.ayref===w.yref?F("ay",T(b,Ca,"ay",u.w,w)):F("ay",w.ay+Ca),Ia(Wa,Ca);else{if(M)return;var wi,Kt;if(g)wi=T(g,Wa,"x",u,w);else{var Ft=w._xsize/u.w,Yt=w.x+(w._xshift-w.xshift)/u.w-Ft/2;wi=s.align(Yt+Wa/u.w,Ft,0,1,w.xanchor)}if(b)Kt=T(b,Ca,"y",u,w);else{var Jt=w._ysize/u.h,Fr=w.y-(w._yshift+w.yshift)/u.h-Jt/2;Kt=s.align(Fr-Ca/u.h,Jt,0,1,w.yanchor)}F("x",wi),F("y",Kt),(!g||!b)&&(hi=s.getCursor(g?.5:wi,b?.5:Kt,w.xanchor,w.yanchor))}X.attr({transform:e(Wa,Ca)+qa}),i(fe,hi)},clickFn:function(Wa,Ca){w.captureevents&&_.emit("plotly_clickannotation",le(Ca))},doneFn:function(){i(fe),x.call("_guiRelayout",_,N());var Wa=document.querySelector(".js-notes-box-panel");Wa&&Wa.redraw(Wa.selectedObj)}})}}y.annotationText?re.call(n.makeEditable,{delegate:fe,gd:_}).call(ce).on("edit",function(Ae){w.text=Ae,this.call(ce),F("text",Ae),g&&g.autorange&&z(g._name+".autorange",!0),b&&b.autorange&&z(b._name+".autorange",!0),x.call("_guiRelayout",_,N())}):re.call(ce)}}}),e9=Xe({"src/components/annotations/click.js"(Z,G){"use strict";var v=sa(),x=so(),S=zl().arrayEditor;G.exports={hasClickToShow:E,onClick:e};function E(o,a){var n=t(o,a);return n.on.length>0||n.explicitOff.length>0}function e(o,a){var n=t(o,a),i=n.on,s=n.off.concat(n.explicitOff),h={},c=o._fullLayout.annotations,m,p;if(i.length||s.length){for(m=0;m1){i=!0;break}}i?e.fullLayout._infolayer.select(".annotation-"+e.id+'[data-index="'+a+'"]').remove():(n._pdata=x(e.glplot.cameraParams,[t.xaxis.r2l(n.x)*r[0],t.yaxis.r2l(n.y)*r[1],t.zaxis.r2l(n.z)*r[2]]),v(e.graphDiv,n,a,e.id,n._xa,n._ya))}}}}),l9=Xe({"src/components/annotations3d/index.js"(Z,G){"use strict";var v=so(),x=sa();G.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:z2()}}},layoutAttributes:z2(),handleDefaults:n9(),includeBasePlot:S,convert:o9(),draw:s9()};function S(E,e){var t=v.subplotsRegistry.gl3d;if(t)for(var r=t.attrRegex,o=Object.keys(E),a=0;a{var f=y+"anchor",R=y==="x"?_:w,L={_fullLayout:n},z,F,N,O;let P=y+"ref",U=o[P];if(Array.isArray(U)&&U.length>0){let B=e.countDefiningCoords(p,c,y);O=x.coerceRefArray(o,a,L,y,void 0,"paper",B),a["_"+y+"refArray"]=!0}else O=x.coerceRef(o,a,L,y,void 0,"paper");if(Array.isArray(O))O.forEach(function(B){x.getRefType(B)==="range"&&(z=x.getFromId(L,B),z&&z._shapeIndices.indexOf(a._index)===-1&&z._shapeIndices.push(a._index))}),T&&[0,1].forEach(function(B){let X=O[B];x.getRefType(X)==="range"?(z=x.getFromId(L,X),F=e.shapePositionToRange(z),N=e.rangeToShapePosition(z),(z.type==="category"||z.type==="multicategory")&&i(y+B+"shift")):F=N=v.identity;let se=y+B,le=o[se];if(o[se]=F(o[se],!0),R==="pixel"?i(se,M[B]):x.coercePosition(a,L,i,X,se,A[B]),a[se]=N(a[se]),o[se]=le,B===0&&R==="pixel"){let fe=o[f];o[f]=F(o[f],!0),x.coercePosition(a,L,i,X,f,.25),a[f]=N(a[f]),o[f]=fe}});else{if(x.getRefType(O)==="range"?(z=x.getFromId(L,O),z._shapeIndices.push(a._index),N=e.rangeToShapePosition(z),F=e.shapePositionToRange(z),T&&(z.type==="category"||z.type==="multicategory")&&(i(y+"0shift"),i(y+"1shift"))):F=N=v.identity,T){let X=y+"0",$=y+"1",se=o[X],le=o[$];o[X]=F(o[X],!0),o[$]=F(o[$],!0),R==="pixel"?(i(X,M[0]),i($,M[1])):(x.coercePosition(a,L,i,O,X,A[0]),x.coercePosition(a,L,i,O,$,A[1])),a[X]=N(a[X]),a[$]=N(a[$]),o[X]=se,o[$]=le}if(R==="pixel"){let X=o[f];o[f]=F(o[f],!0),x.coercePosition(a,L,i,O,f,.25),a[f]=N(a[f]),o[f]=X}}}),T&&v.noneOrAll(o,a,["x0","x1","y0","y1"]);var g=p==="line",b,d;if(T&&(b=i("label.texttemplate"),i("label.texttemplatefallback")),b||(d=i("label.text")),d||b){i("label.textangle");var u=i("label.textposition",g?"middle":"middle center");i("label.xanchor"),i("label.yanchor",t(g,u)),i("label.padding"),v.coerceFont(i,"label.font",n.font)}}}}),c9=Xe({"src/components/shapes/draw_newshape/defaults.js"(Z,G){"use strict";var v=$n(),x=sa();function S(E,e){return E?"bottom":e.indexOf("top")!==-1?"top":e.indexOf("bottom")!==-1?"bottom":"middle"}G.exports=function(e,t,r){r("newshape.visible"),r("newshape.name"),r("newshape.showlegend"),r("newshape.legend"),r("newshape.legendwidth"),r("newshape.legendgroup"),r("newshape.legendgrouptitle.text"),x.coerceFont(r,"newshape.legendgrouptitle.font"),r("newshape.legendrank"),r("newshape.drawdirection"),r("newshape.layer"),r("newshape.fillcolor"),r("newshape.fillrule"),r("newshape.opacity");var o=r("newshape.line.width");if(o){var a=(e||{}).plot_bgcolor||"#FFF";r("newshape.line.color",v.contrast(a)),r("newshape.line.dash")}var n=e.dragmode==="drawline",i=r("newshape.label.text"),s=r("newshape.label.texttemplate");if(r("newshape.label.texttemplatefallback"),i||s){r("newshape.label.textangle");var h=r("newshape.label.textposition",n?"middle":"middle center");r("newshape.label.xanchor"),r("newshape.label.yanchor",S(n,h)),r("newshape.label.padding"),x.coerceFont(r,"newshape.label.font",t.font)}r("activeshape.fillcolor"),r("activeshape.opacity")}}}),f9=Xe({"src/components/shapes/calc_autorange.js"(Z,G){"use strict";var v=sa(),x=Go(),S=L_(),E=a0();G.exports=function(i){var s=i._fullLayout,h=v.filterVisible(s.shapes);if(!(!h.length||!i._fullData.length))for(var c=0;c{p=x.getFromId(i,A),m._extremes[p._id]=x.findExtremes(p,M,t(m))})}else m.xref!=="paper"&&l!=="domain"&&(p=x.getFromId(i,m.xref),T=a(p,m,S.paramIsX),T&&(m._extremes[p._id]=x.findExtremes(p,T,t(m))));if(_==="array"){let w=e(i,m,"y");Object.entries(w).forEach(([A,M])=>{p=x.getFromId(i,A),m._extremes[p._id]=x.findExtremes(p,M,r(m))})}else m.yref!=="paper"&&_!=="domain"&&(p=x.getFromId(i,m.yref),T=a(p,m,S.paramIsY),T&&(m._extremes[p._id]=x.findExtremes(p,T,r(m))))}};function e(n,i,s){let h=i[s+"ref"],c=s==="x"?S.paramIsX:S.paramIsY;function m(A,M){A==="paper"||x.getRefType(A)==="domain"||(p[A]||(p[A]=[]),p[A].push(M))}let p={};if(i.type==="path"&&i.path){let A=i.path.match(S.segmentRE)||[];for(var T=0,l=0;lb&&(m(h[T],d[b]),T++)}}else m(h[0],i[s+"0"]),m(h[1],i[s+"1"]);let _={};for(let A in p){let M=x.getFromId(n,A);if(M){var w=M.type==="category"||M.type==="multicategory"?M.r2c:M.d2c;M.type==="date"&&(w=E.decodeDate(w)),_[M._id]=p[A].map(w)}}return _}function t(n){return o(n.line.width,n.xsizemode,n.x0,n.x1,n.path,!1)}function r(n){return o(n.line.width,n.ysizemode,n.y0,n.y1,n.path,!0)}function o(n,i,s,h,c,m){var p=n/2,T=m;if(i==="pixel"){var l=c?E.extractPathCoords(c,m?S.paramIsY:S.paramIsX):[s,h],_=v.aggNums(Math.max,null,l),w=v.aggNums(Math.min,null,l),A=w<0?Math.abs(w)+p:p,M=_>0?_+p:p;return{ppad:p,ppadplus:T?A:M,ppadminus:T?M:A}}else return{ppad:p}}function a(n,i,s){var h=n._id.charAt(0)==="x"?"x":"y",c=n.type==="category"||n.type==="multicategory",m,p,T=0,l=0,_=c?n.r2c:n.d2c,w=i[h+"sizemode"]==="scaled";if(w?(m=i[h+"0"],p=i[h+"1"],c&&(T=i[h+"0shift"],l=i[h+"1shift"])):(m=i[h+"anchor"],p=i[h+"anchor"]),m!==void 0)return[_(m)+T,_(p)+l];if(i.path){var A=1/0,M=-1/0,g=i.path.match(S.segmentRE),b,d,u,y,f;for(n.type==="date"&&(_=E.decodeDate(_)),b=0;bM&&(M=f)));if(M>=A)return[A,M]}}}}),h9=Xe({"src/components/shapes/index.js"(Z,G){"use strict";var v=E2();G.exports={moduleType:"component",name:"shapes",layoutAttributes:j5(),supplyLayoutDefaults:u9(),supplyDrawNewShapeDefaults:c9(),includeBasePlot:D_()("shapes"),calcAutorange:f9(),draw:v.draw,drawOne:v.drawOne}}}),q5=Xe({"src/components/images/attributes.js"(Z,G){"use strict";var v=lh(),x=zl().templatedArray,S=R_();G.exports=x("image",{visible:{valType:"boolean",dflt:!0,editType:"arraydraw"},source:{valType:"string",editType:"arraydraw"},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"arraydraw"},sizex:{valType:"number",dflt:0,editType:"arraydraw"},sizey:{valType:"number",dflt:0,editType:"arraydraw"},sizing:{valType:"enumerated",values:["fill","contain","stretch"],dflt:"contain",editType:"arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},x:{valType:"any",dflt:0,editType:"arraydraw"},y:{valType:"any",dflt:0,editType:"arraydraw"},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left",editType:"arraydraw"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],dflt:"top",editType:"arraydraw"},xref:{valType:"enumerated",values:["paper",v.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",v.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})}}),p9=Xe({"src/components/images/defaults.js"(Z,G){"use strict";var v=sa(),x=Go(),S=hp(),E=q5(),e="images";G.exports=function(o,a){var n={name:e,handleItemDefaults:t};S(o,a,n)};function t(r,o,a){function n(_,w){return v.coerce(r,o,E,_,w)}var i=n("source"),s=n("visible",!!i);if(!s)return o;n("layer"),n("xanchor"),n("yanchor"),n("sizex"),n("sizey"),n("sizing"),n("opacity");for(var h={_fullLayout:a},c=["x","y"],m=0;m<2;m++){var p=c[m],T=x.coerceRef(r,o,h,p,"paper",void 0);if(T!=="paper"){var l=x.getFromId(h,T);l._imgIndices.push(o._index)}x.coercePosition(o,h,n,T,p,0)}return o}}}),d9=Xe({"src/components/images/draw.js"(Z,G){"use strict";var v=Hn(),x=es(),S=Go(),E=ef(),e=vd();G.exports=function(r){var o=r._fullLayout,a=[],n={},i=[],s,h;for(h=0;h0);c&&(s("active"),s("direction"),s("type"),s("showactive"),s("x"),s("y"),v.noneOrAll(a,n,["x","y"]),s("xanchor"),s("yanchor"),s("pad.t"),s("pad.r"),s("pad.b"),s("pad.l"),v.coerceFont(s,"font",i.font),s("bgcolor",i.paper_bgcolor),s("bordercolor"),s("borderwidth"))}function o(a,n){function i(h,c){return v.coerce(a,n,t,h,c)}var s=i("visible",a.method==="skip"||Array.isArray(a.args));s&&(i("method"),i("args"),i("args2"),i("label"),i("execute"))}}}),y9=Xe({"src/components/updatemenus/scrollbox.js"(Z,G){"use strict";G.exports=e;var v=Hn(),x=$n(),S=es(),E=sa();function e(t,r,o){this.gd=t,this.container=r,this.id=o,this.position=null,this.translateX=null,this.translateY=null,this.hbar=null,this.vbar=null,this.bg=this.container.selectAll("rect.scrollbox-bg").data([0]),this.bg.exit().on(".drag",null).on("wheel",null).remove(),this.bg.enter().append("rect").classed("scrollbox-bg",!0).style("pointer-events","all").attr({opacity:0,x:0,y:0,width:0,height:0})}e.barWidth=2,e.barLength=20,e.barRadius=2,e.barPad=1,e.barColor="#808BA4",e.prototype.enable=function(r,o,a){var n=this.gd._fullLayout,i=n.width,s=n.height;this.position=r;var h=this.position.l,c=this.position.w,m=this.position.t,p=this.position.h,T=this.position.direction,l=T==="down",_=T==="left",w=T==="right",A=T==="up",M=c,g=p,b,d,u,y;!l&&!_&&!w&&!A&&(this.position.direction="down",l=!0);var f=l||A;f?(b=h,d=b+M,l?(u=m,y=Math.min(u+g,s),g=y-u):(y=m+g,u=Math.max(y-g,0),g=y-u)):(u=m,y=u+g,_?(d=h+M,b=Math.max(d-M,0),M=d-b):(b=h,d=Math.min(b+M,i),M=d-b)),this._box={l:b,t:u,w:M,h:g};var R=c>M,L=e.barLength+2*e.barPad,z=e.barWidth+2*e.barPad,F=h,N=m+p;N+z>s&&(N=s-z);var O=this.container.selectAll("rect.scrollbar-horizontal").data(R?[0]:[]);O.exit().on(".drag",null).remove(),O.enter().append("rect").classed("scrollbar-horizontal",!0).call(x.fill,e.barColor),R?(this.hbar=O.attr({rx:e.barRadius,ry:e.barRadius,x:F,y:N,width:L,height:z}),this._hbarXMin=F+L/2,this._hbarTranslateMax=M-L):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var P=p>g,U=e.barWidth+2*e.barPad,B=e.barLength+2*e.barPad,X=h+c,$=m;X+U>i&&(X=i-U);var se=this.container.selectAll("rect.scrollbar-vertical").data(P?[0]:[]);se.exit().on(".drag",null).remove(),se.enter().append("rect").classed("scrollbar-vertical",!0).call(x.fill,e.barColor),P?(this.vbar=se.attr({rx:e.barRadius,ry:e.barRadius,x:X,y:$,width:U,height:B}),this._vbarYMin=$+B/2,this._vbarTranslateMax=g-B):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var le=this.id,fe=b-.5,V=P?d+U+.5:d+.5,Y=u-.5,ee=R?y+z+.5:y+.5,q=n._topdefs.selectAll("#"+le).data(R||P?[0]:[]);if(q.exit().remove(),q.enter().append("clipPath").attr("id",le).append("rect"),R||P?(this._clipRect=q.select("rect").attr({x:Math.floor(fe),y:Math.floor(Y),width:Math.ceil(V)-Math.floor(fe),height:Math.ceil(ee)-Math.floor(Y)}),this.container.call(S.setClipUrl,le,this.gd),this.bg.attr({x:h,y:m,width:c,height:p})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(S.setClipUrl,null),delete this._clipRect),R||P){var oe=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(oe);var ae=v.behavior.drag().on("dragstart",function(){v.event.sourceEvent.preventDefault(),v.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));R&&this.hbar.on(".drag",null).call(ae),P&&this.vbar.on(".drag",null).call(ae)}this.setTranslate(o,a)},e.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(S.setClipUrl,null),delete this._clipRect),this.hbar&&(this.hbar.on(".drag",null),this.hbar.remove(),delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax),this.vbar&&(this.vbar.on(".drag",null),this.vbar.remove(),delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax)},e.prototype._onBoxDrag=function(){var r=this.translateX,o=this.translateY;this.hbar&&(r-=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,n=a+this._hbarTranslateMax,i=E.constrain(v.event.x,a,n),s=(i-a)/(n-a),h=this.position.w-this._box.w;r=s*h}if(this.vbar){var c=o+this._vbarYMin,m=c+this._vbarTranslateMax,p=E.constrain(v.event.y,c,m),T=(p-c)/(m-c),l=this.position.h-this._box.h;o=T*l}this.setTranslate(r,o)},e.prototype.setTranslate=function(r,o){var a=this.position.w-this._box.w,n=this.position.h-this._box.h;if(r=E.constrain(r||0,0,a),o=E.constrain(o||0,0,n),this.translateX=r,this.translateY=o,this.container.call(S.setTranslate,this._box.l-this.position.l-r,this._box.t-this.position.t-o),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+r-.5),y:Math.floor(this.position.t+o-.5)}),this.hbar){var i=r/a;this.hbar.call(S.setTranslate,r+i*this._hbarTranslateMax,o)}if(this.vbar){var s=o/n;this.vbar.call(S.setTranslate,r,o+s*this._vbarTranslateMax)}}}}),_9=Xe({"src/components/updatemenus/draw.js"(Z,G){"use strict";var v=Hn(),x=bc(),S=$n(),E=es(),e=sa(),t=ou(),r=zl().arrayEditor,o=uh().LINE_SPACING,a=F2(),n=y9();G.exports=function(L){var z=L._fullLayout,F=e.filterVisible(z[a.name]);function N(le){x.autoMargin(L,u(le))}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 P=O.selectAll("g."+a.headerGroupClassName).data(F,i);P.enter().append("g").classed(a.headerGroupClassName,!0);for(var U=e.ensureSingle(O,"g",a.dropdownButtonGroupClassName,function(le){le.style("pointer-events","all")}),B=0;B0?[0]:[]);X.enter().append("g").classed(a.containerClassName,!0).style("cursor",P?null:"ew-resize");function $(V){V._commandObserver&&(V._commandObserver.remove(),delete V._commandObserver),x.autoMargin(O,c(V))}if(X.exit().each(function(){v.select(this).selectAll("g."+a.groupClassName).each($)}).remove(),B.length!==0){var se=X.selectAll("g."+a.groupClassName).data(B,p);se.enter().append("g").classed(a.groupClassName,!0),se.exit().each($).remove();for(var le=0;le0&&(se=se.transition().duration(O.transition.duration).ease(O.transition.easing)),se.attr("transform",t($-a.gripWidth*.5,O._dims.currentValueTotalHeight))}}function R(N,O){var P=N._dims;return P.inputAreaStart+a.stepInset+(P.inputAreaLength-2*a.stepInset)*Math.min(1,Math.max(0,O))}function L(N,O){var P=N._dims;return Math.min(1,Math.max(0,(O-a.stepInset-P.inputAreaStart)/(P.inputAreaLength-2*a.stepInset-2*P.inputAreaStart)))}function z(N,O,P){var U=P._dims,B=e.ensureSingle(N,"rect",a.railTouchRectClass,function(X){X.call(d,O,N,P).style("pointer-events","all")});B.attr({width:U.inputAreaLength,height:Math.max(U.inputAreaWidth,a.tickOffset+P.ticklen+U.labelHeight)}).call(S.fill,P.bgcolor).attr("opacity",0),E.setTranslate(B,0,U.currentValueTotalHeight)}function F(N,O){var P=O._dims,U=P.inputAreaLength-a.railInset*2,B=e.ensureSingle(N,"rect",a.railRectClass);B.attr({width:U,height:a.railWidth,rx:a.railRadius,ry:a.railRadius,"shape-rendering":"crispEdges"}).call(S.stroke,O.bordercolor).call(S.fill,O.bgcolor).style("stroke-width",O.borderwidth+"px"),E.setTranslate(B,a.railInset,(P.inputAreaWidth-a.railWidth)*.5+P.currentValueTotalHeight)}}}),T9=Xe({"src/components/sliders/index.js"(Z,G){"use strict";var v=O_();G.exports={moduleType:"component",name:v.name,layoutAttributes:G5(),supplyLayoutDefaults:b9(),draw:w9()}}}),O2=Xe({"src/components/rangeslider/attributes.js"(Z,G){"use strict";var v=sh();G.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=Xe({"src/components/rangeslider/oppaxis_attributes.js"(Z,G){"use strict";G.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=Xe({"src/components/rangeslider/constants.js"(Z,G){"use strict";G.exports={name:"rangeslider",containerClassName:"rangeslider-container",bgClassName:"rangeslider-bg",rangePlotClassName:"rangeslider-rangeplot",maskMinClassName:"rangeslider-mask-min",maskMaxClassName:"rangeslider-mask-max",slideBoxClassName:"rangeslider-slidebox",grabberMinClassName:"rangeslider-grabber-min",grabAreaMinClassName:"rangeslider-grabarea-min",handleMinClassName:"rangeslider-handle-min",grabberMaxClassName:"rangeslider-grabber-max",grabAreaMaxClassName:"rangeslider-grabarea-max",handleMaxClassName:"rangeslider-handle-max",maskMinOppAxisClassName:"rangeslider-mask-min-opp-axis",maskMaxOppAxisClassName:"rangeslider-mask-max-opp-axis",maskColor:"rgba(0,0,0,0.4)",maskOppAxisColor:"rgba(0,0,0,0.2)",slideBoxFill:"transparent",slideBoxCursor:"ew-resize",grabAreaFill:"transparent",grabAreaCursor:"col-resize",grabAreaWidth:10,handleWidth:4,handleRadius:1,handleStrokeWidth:1,extraPad:15}}}),A9=Xe({"src/components/rangeslider/helpers.js"(Z){"use strict";var G=ef(),v=ou(),x=B2(),S=uh().LINE_SPACING,E=x.name;function e(t){var r=t&&t[E];return r&&r.visible}Z.isVisible=e,Z.makeData=function(t){for(var r=G.list({_fullLayout:t},"x",!0),o=t.margin,a=[],n=0;n=nt.max)Ze=ce[at+1];else if(ze=nt.pmax)Ze=ce[at+1];else if(ze0?d.touches[0].clientX:0}function m(d,u,y,f){if(u._context.staticPlot)return;var R=d.select("rect."+h.slideBoxClassName).node(),L=d.select("rect."+h.grabAreaMinClassName).node(),z=d.select("rect."+h.grabAreaMaxClassName).node();function F(){var N=v.event,O=N.target,P=c(N),U=P-d.node().getBoundingClientRect().left,B=f.d2p(y._rl[0]),X=f.d2p(y._rl[1]),$=i.coverSlip();this.addEventListener("touchmove",se),this.addEventListener("touchend",le),$.addEventListener("mousemove",se),$.addEventListener("mouseup",le);function se(fe){var V=c(fe),Y=+V-P,ee,q,oe;switch(O){case R:if(oe="ew-resize",B+Y>y._length||X+Y<0)return;ee=B+Y,q=X+Y;break;case L:if(oe="col-resize",B+Y>y._length)return;ee=B+Y,q=X;break;case z:if(oe="col-resize",X+Y<0)return;ee=B,q=X+Y;break;default:oe="ew-resize",ee=U,q=U+Y;break}if(q0);if(_){var w=o(i,s,h);T("x",w[0]),T("y",w[1]),v.noneOrAll(n,i,["x","y"]),T("xanchor"),T("yanchor"),v.coerceFont(T,"font",s.font);var A=T("bgcolor");T("activecolor",x.contrast(A,t.lightAmount,t.darkAmount)),T("bordercolor"),T("borderwidth")}};function r(a,n,i,s){var h=s.calendar;function c(T,l){return v.coerce(a,n,e.buttons,T,l)}var m=c("visible");if(m){var p=c("step");p!=="all"&&(h&&h!=="gregorian"&&(p==="month"||p==="year")?n.stepmode="backward":c("stepmode"),c("count")),c("label")}}function o(a,n,i){for(var s=i.filter(function(p){return n[p].anchor===a._id}),h=0,c=0;c1)){delete h.grid;return}if(!T&&!l&&!_){var y=b("pattern")==="independent";y&&(T=!0)}g._hasSubplotGrid=T;var f=b("roworder"),R=f==="top to bottom",L=T?.2:.1,z=T?.3:.1,F,N;w&&h._splomGridDflt&&(F=h._splomGridDflt.xside,N=h._splomGridDflt.yside),g._domains={x:a("x",b,L,F,u),y:a("y",b,z,N,d,R)}}function a(s,h,c,m,p,T){var l=h(s+"gap",c),_=h("domain."+s);h(s+"side",m);for(var w=new Array(p),A=_[0],M=(_[1]-A)/(p-l),g=M*(1-l),b=0;b0,m=r._context.staticPlot;o.each(function(p){var T=p[0].trace,l=T.error_x||{},_=T.error_y||{},w;T.ids&&(w=function(b){return b.id});var A=E.hasMarkers(T)&&T.marker.maxdisplayed>0;!_.visible&&!l.visible&&(p=[]);var M=v.select(this).selectAll("g.errorbar").data(p,w);if(M.exit().remove(),!!p.length){l.visible||M.selectAll("path.xerror").remove(),_.visible||M.selectAll("path.yerror").remove(),M.style("opacity",1);var g=M.enter().append("g").classed("errorbar",!0);c&&g.style("opacity",0).transition().duration(n.duration).style("opacity",1),S.setClipUrl(M,a.layerClipId,r),M.each(function(b){var d=v.select(this),u=e(b,s,h);if(!(A&&!b.vis)){var y,f=d.select("path.yerror");if(_.visible&&x(u.x)&&x(u.yh)&&x(u.ys)){var R=_.width;y="M"+(u.x-R)+","+u.yh+"h"+2*R+"m-"+R+",0V"+u.ys,u.noYS||(y+="m-"+R+",0h"+2*R),i=!f.size(),i?f=d.append("path").style("vector-effect",m?"none":"non-scaling-stroke").classed("yerror",!0):c&&(f=f.transition().duration(n.duration).ease(n.easing)),f.attr("d",y)}else f.remove();var L=d.select("path.xerror");if(l.visible&&x(u.y)&&x(u.xh)&&x(u.xs)){var z=(l.copy_ystyle?_:l).width;y="M"+u.xh+","+(u.y-z)+"v"+2*z+"m0,-"+z+"H"+u.xs,u.noXS||(y+="m0,-"+z+"v"+2*z),i=!L.size(),i?L=d.append("path").style("vector-effect",m?"none":"non-scaling-stroke").classed("xerror",!0):c&&(L=L.transition().duration(n.duration).ease(n.easing)),L.attr("d",y)}else L.remove()}})}})};function e(t,r,o){var a={x:r.c2p(t.x),y:o.c2p(t.y)};return t.yh!==void 0&&(a.yh=o.c2p(t.yh),a.ys=o.c2p(t.ys),x(a.ys)||(a.noYS=!0,a.ys=o.c2p(t.ys,!0))),t.xh!==void 0&&(a.xh=r.c2p(t.xh),a.xs=r.c2p(t.xs),x(a.xs)||(a.noXS=!0,a.xs=r.c2p(t.xs,!0))),a}}}),F9=Xe({"src/components/errorbars/style.js"(Z,G){"use strict";var v=Hn(),x=$n();G.exports=function(E){E.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(x.stroke,r.color),o.copy_ystyle&&(o=r),a.selectAll("path.xerror").style("stroke-width",o.thickness+"px").call(x.stroke,o.color)})}}}),O9=Xe({"src/components/errorbars/index.js"(Z,G){"use strict";var v=sa(),x=pc().overrideAll,S=Z5(),E={error_x:v.extendFlat({},S),error_y:v.extendFlat({},S)};delete E.error_x.copy_zstyle,delete E.error_y.copy_zstyle,delete E.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,G.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:E,bar:E,histogram:E,scatter3d:x(e,"calc","nested"),scattergl:x(E,"calc","nested")}},supplyDefaults:R9(),calc:D9(),makeComputeError:Y5(),plot:z9(),style:F9(),hoverInfo:t};function t(r,o,a){(o.error_y||{}).visible&&(a.yerr=r.yh-r.y,o.error_y.symmetric||(a.yerrneg=r.y-r.ys)),(o.error_x||{}).visible&&(a.xerr=r.xh-r.x,o.error_x.symmetric||(a.xerrneg=r.x-r.xs))}}}),B9=Xe({"src/components/colorbar/constants.js"(Z,G){"use strict";G.exports={cn:{colorbar:"colorbar",cbbg:"cbbg",cbfill:"cbfill",cbfills:"cbfills",cbline:"cbline",cblines:"cblines",cbaxis:"cbaxis",cbtitleunshift:"cbtitleunshift",cbtitle:"cbtitle",cboutline:"cboutline",crisp:"crisp",jsPlaceholder:"js-placeholder"}}}}),N9=Xe({"src/components/colorbar/draw.js"(Z,G){"use strict";var v=Hn(),x=Ch(),S=bc(),E=so(),e=Go(),t=Ap(),r=sa(),o=r.strTranslate,a=Qo().extendFlat,n=Kd(),i=es(),s=$n(),h=K0(),c=ou(),m=wp().flipScale,p=F_(),T=R2(),l=Wh(),_=uh(),w=_.LINE_SPACING,A=_.FROM_TL,M=_.FROM_BR,g=B9().cn;function b(L){var z=L._fullLayout,F=z._infolayer.selectAll("g."+g.colorbar).data(d(L),function(N){return N._id});F.enter().append("g").attr("class",function(N){return N._id}).classed(g.colorbar,!0),F.each(function(N){var O=v.select(this);r.ensureSingle(O,"rect",g.cbbg),r.ensureSingle(O,"g",g.cbfills),r.ensureSingle(O,"g",g.cblines),r.ensureSingle(O,"g",g.cbaxis,function(U){U.classed(g.crisp,!0)}),r.ensureSingle(O,"g",g.cbtitleunshift,function(U){U.append("g").classed(g.cbtitle,!0)}),r.ensureSingle(O,"rect",g.cboutline);var P=u(O,N,L);P&&P.then&&(L._promises||[]).push(P),L._context.edits.colorbarPosition&&y(O,N,L)}),F.exit().each(function(N){S.autoMargin(L,N._id)}).remove(),F.order()}function d(L){var z=L._fullLayout,F=L.calcdata,N=[],O,P,U,B;function X(j){return a(j,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function $(){typeof B.calc=="function"?B.calc(L,U,O):(O._fillgradient=P.reversescale?m(P.colorscale):P.colorscale,O._zrange=[P[B.min],P[B.max]])}for(var se=0;se1){var Ne=Math.pow(10,Math.floor(Math.log(wt)/Math.LN10));Sr*=Ne*r.roundUp(wt/Ne,[2,5,10]),(Math.abs(at.start)/at.size+1e-6)%1<2e-6&&(mr.tick0=0)}mr.dtick=Sr}mr.domain=N?[Wt+Y/Q.h,Wt+Oe-Y/Q.h]:[Wt+V/Q.w,Wt+Oe-V/Q.w],mr.setScale(),L.attr("transform",o(Math.round(Q.l),Math.round(Q.t)));var Ke=L.select("."+g.cbtitleunshift).attr("transform",o(-Math.round(Q.l),-Math.round(Q.t))),Te=mr.ticklabelposition,Ie=mr.title.font.size,Ve=L.select("."+g.cbaxis),Ce,Ee=0,Pe=0;function ft(rr,er){var Lr={propContainer:mr,propName:z._propPrefix+"title.text",traceIndex:z._traceIndex,_meta:z._meta,placeholder:j._dfltTitle.colorbar,containerGroup:L.select("."+g.cbtitle)},fa=rr.charAt(0)==="h"?rr.slice(1):"h"+rr;L.selectAll("."+fa+",."+fa+"-math-group").remove(),h.draw(F,rr,a(Lr,er||{}))}function ct(){if(N&&qr||!N&&!qr){var rr,er;Ae==="top"&&(rr=V+Q.l+tt*ee,er=Y+Q.t+ot*(1-Wt-Oe)+3+Ie*.75),Ae==="bottom"&&(rr=V+Q.l+tt*ee,er=Y+Q.t+ot*(1-Wt)-3-Ie*.25),Ae==="right"&&(er=Y+Q.t+ot*q+3+Ie*.75,rr=V+Q.l+tt*Wt),ft(mr._id+"title",{attributes:{x:rr,y:er,"text-anchor":N?"start":"middle"}})}}function _t(){if(N&&!qr||!N&&qr){var rr=mr.position||0,er=mr._offset+mr._length/2,Lr,fa;if(Ae==="right")fa=er,Lr=Q.l+tt*rr+10+Ie*(mr.showticklabels?1:.5);else if(Lr=er,Ae==="bottom"&&(fa=Q.t+ot*rr+10+(Te.indexOf("inside")===-1?mr.tickfont.size:0)+(mr.ticks!=="inside"&&z.ticklen||0)),Ae==="top"){var Da=be.text.split("
").length;fa=Q.t+ot*rr+10-Me-w*Ie*Da}ft((N?"h":"v")+mr._id+"title",{avoid:{selection:v.select(F).selectAll("g."+mr._id+"tick"),side:Ae,offsetTop:N?0:Q.t,offsetLeft:N?Q.l:0,maxShift:N?j.width:j.height},attributes:{x:Lr,y:fa,"text-anchor":"middle"},transform:{rotate:N?-90:0,offset:0}})}}function Ct(){if(!N&&!qr||N&&qr){var rr=L.select("."+g.cbtitle),er=rr.select("text"),Lr=[-X/2,X/2],fa=rr.select(".h"+mr._id+"title-math-group").node(),Da=15.6;er.node()&&(Da=parseInt(er.node().style.fontSize,10)*w);var Ia;if(fa?(Ia=i.bBox(fa),Pe=Ia.width,Ee=Ia.height,Ee>Da&&(Lr[1]-=(Ee-Da)/2)):er.node()&&!er.classed(g.jsPlaceholder)&&(Ia=i.bBox(er.node()),Pe=Ia.width,Ee=Ia.height),N){if(Ee){if(Ee+=5,Ae==="top")mr.domain[1]-=Ee/Q.h,Lr[1]*=-1;else{mr.domain[0]+=Ee/Q.h;var qa=c.lineCount(er);Lr[1]+=(1-qa)*Da}rr.attr("transform",o(Lr[0],Lr[1])),mr.setScale()}}else Pe&&(Ae==="right"&&(mr.domain[0]+=(Pe+Ie/2)/Q.w),rr.attr("transform",o(Lr[0],Lr[1])),mr.setScale())}L.selectAll("."+g.cbfills+",."+g.cblines).attr("transform",N?o(0,Math.round(Q.h*(1-mr.domain[1]))):o(Math.round(Q.w*mr.domain[0]),0)),Ve.attr("transform",N?o(0,Math.round(-Q.t)):o(Math.round(-Q.l),0));var Wa=L.select("."+g.cbfills).selectAll("rect."+g.cbfill).attr("style","").data(rt);Wa.enter().append("rect").classed(g.cbfill,!0).attr("style",""),Wa.exit().remove();var Ca=De.map(mr.c2p).map(Math.round).sort(function(Yt,Jt){return Yt-Jt});Wa.each(function(Yt,Jt){var Fr=[Jt===0?De[0]:(rt[Jt]+rt[Jt-1])/2,Jt===rt.length-1?De[1]:(rt[Jt]+rt[Jt+1])/2].map(mr.c2p).map(Math.round);N&&(Fr[1]=r.constrain(Fr[1]+(Fr[1]>Fr[0])?1:-1,Ca[0],Ca[1]));var ta=v.select(this).attr(N?"x":"y",Qe).attr(N?"y":"x",v.min(Fr)).attr(N?"width":"height",Math.max(Me,2)).attr(N?"height":"width",Math.max(v.max(Fr)-v.min(Fr),2));if(z._fillgradient)i.gradient(ta,F,z._id,N?"vertical":"horizontalreversed",z._fillgradient,"fill");else{var ra=Ze(Yt).replace("e-","");ta.attr("fill",x(ra).toHexString())}});var hi=L.select("."+g.cblines).selectAll("path."+g.cbline).data(ce.color&&ce.width?st:[]);hi.enter().append("path").classed(g.cbline,!0),hi.exit().remove(),hi.each(function(Yt){var Jt=Qe,Fr=Math.round(mr.c2p(Yt))+ce.width/2%1;v.select(this).attr("d","M"+(N?Jt+","+Fr:Fr+","+Jt)+(N?"h":"v")+Me).call(i.lineGroupStyle,ce.width,ze(Yt),ce.dash)}),Ve.selectAll("g."+mr._id+"tick,path").remove();var wi=Qe+Me+(X||0)/2-(z.ticks==="outside"?1:0),Kt=e.calcTicks(mr),Ft=e.getTickSigns(mr)[2];return e.drawTicks(F,mr,{vals:mr.ticks==="inside"?e.clipEnds(mr,Kt):Kt,layer:Ve,path:e.makeTickPath(mr,wi,Ft),transFn:e.makeTransTickFn(mr)}),e.drawLabels(F,mr,{vals:Kt,layer:Ve,transFn:e.makeTransTickLabelFn(mr),labelFns:e.makeLabelFns(mr,wi)})}function ir(){var rr,er=Me+X/2;Te.indexOf("inside")===-1&&(rr=i.bBox(Ve.node()),er+=N?rr.width:rr.height),Ce=Ke.select("text");var Lr=0,fa=N&&Ae==="top",Da=!N&&Ae==="right",Ia=0;if(Ce.node()&&!Ce.classed(g.jsPlaceholder)){var qa,Wa=Ke.select(".h"+mr._id+"title-math-group").node();Wa&&(N&&qr||!N&&!qr)?(rr=i.bBox(Wa),Lr=rr.width,qa=rr.height):(rr=i.bBox(Ke.node()),Lr=rr.right-Q.l-(N?Qe:kr),qa=rr.bottom-Q.t-(N?kr:Qe),!N&&Ae==="top"&&(er+=rr.height,Ia=rr.height)),Da&&(Ce.attr("transform",o(Lr/2+Ie/2,0)),Lr*=2),er=Math.max(er,N?Lr:qa)}var Ca=(N?V:Y)*2+er+$+X/2,hi=0;!N&&be.text&&fe==="bottom"&&q<=0&&(hi=Ca/2,Ca+=hi,Ia+=hi),j._hColorbarMoveTitle=hi,j._hColorbarMoveCBTitle=Ia;var wi=$+X,Kt=(N?Qe:kr)-wi/2-(N?V:0),Ft=(N?kr:Qe)-(N?he:Y+Ia-hi);L.select("."+g.cbbg).attr("x",Kt).attr("y",Ft).attr(N?"width":"height",Math.max(Ca-hi,2)).attr(N?"height":"width",Math.max(he+wi,2)).call(s.fill,se).call(s.stroke,z.bordercolor).style("stroke-width",$);var Yt=Da?Math.max(Lr-10,0):0;L.selectAll("."+g.cboutline).attr("x",(N?Qe:kr+V)+Yt).attr("y",(N?kr+Y-he:Qe)+(fa?Ee:0)).attr(N?"width":"height",Math.max(Me,2)).attr(N?"height":"width",Math.max(he-(N?2*Y+Ee:2*V+Yt),2)).call(s.stroke,z.outlinecolor).style({fill:"none","stroke-width":X});var Jt=N?Pt*Ca:0,Fr=N?0:(1-It)*Ca-Ia;if(Jt=ae?Q.l-Jt:-Jt,Fr=oe?Q.t-Fr:-Fr,L.attr("transform",o(Jt,Fr)),!N&&($||x(se).getAlpha()&&!x.equals(j.paper_bgcolor,se))){var ta=Ve.selectAll("text"),ra=ta[0].length,ca=L.select("."+g.cbbg).node(),Ba=i.bBox(ca),$a=i.getTranslate(L),Za=2;ta.each(function(Cr,xr){var Ir=0,Ur=ra-1;if(xr===Ir||xr===Ur){var Hr=i.bBox(this),xt=i.getTranslate(this),Xt;if(xr===Ur){var vr=Hr.right+xt.x,Or=Ba.right+$a.x+kr-$-Za+ee;Xt=Or-vr,Xt>0&&(Xt=0)}else if(xr===Ir){var ba=Hr.left+xt.x,Pa=Ba.left+$a.x+kr+$+Za;Xt=Pa-ba,Xt<0&&(Xt=0)}Xt&&(ra<3?this.setAttribute("transform","translate("+Xt+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var ri={},pi=A[le],Ra=M[le],tn=A[fe],on=M[fe],hn=Ca-Me;N?(P==="pixels"?(ri.y=q,ri.t=he*tn,ri.b=he*on):(ri.t=ri.b=0,ri.yt=q+O*tn,ri.yb=q-O*on),B==="pixels"?(ri.x=ee,ri.l=Ca*pi,ri.r=Ca*Ra):(ri.l=hn*pi,ri.r=hn*Ra,ri.xl=ee-U*pi,ri.xr=ee+U*Ra)):(P==="pixels"?(ri.x=ee,ri.l=he*pi,ri.r=he*Ra):(ri.l=ri.r=0,ri.xl=ee+O*pi,ri.xr=ee-O*Ra),B==="pixels"?(ri.y=1-q,ri.t=Ca*tn,ri.b=Ca*on):(ri.t=hn*tn,ri.b=hn*on,ri.yt=q-U*tn,ri.yb=q+U*on));var Tt=z.y<.5?"b":"t",ut=z.x<.5?"l":"r";F._fullLayout._reservedMargin[z._id]={};var Br={r:j.width-Kt-Jt,l:Kt+ri.r,b:j.height-Ft-Fr,t:Ft+ri.b};ae&&oe?S.autoMargin(F,z._id,ri):ae?F._fullLayout._reservedMargin[z._id][Tt]=Br[Tt]:oe||N?F._fullLayout._reservedMargin[z._id][ut]=Br[ut]:F._fullLayout._reservedMargin[z._id][Tt]=Br[Tt]}return r.syncOrAsync([S.previousPromises,ct,Ct,_t,S.previousPromises,ir],F)}function y(L,z,F){var N=z.orientation==="v",O=F._fullLayout,P=O._size,U,B,X;t.init({element:L.node(),gd:F,prepFn:function(){U=L.attr("transform"),n(L)},moveFn:function($,se){L.attr("transform",U+o($,se)),B=t.align((N?z._uFrac:z._vFrac)+$/P.w,N?z._thickFrac:z._lenFrac,0,1,z.xanchor),X=t.align((N?z._vFrac:1-z._uFrac)-se/P.h,N?z._lenFrac:z._thickFrac,0,1,z.yanchor);var le=t.getCursor(B,X,z.xanchor,z.yanchor);n(L,le)},doneFn:function(){if(n(L),B!==void 0&&X!==void 0){var $={};$[z._propPrefix+"x"]=B,$[z._propPrefix+"y"]=X,z._traceIndex!==void 0?E.call("_guiRestyle",F,$,z._traceIndex):E.call("_guiRelayout",F,$)}}})}function f(L,z,F){var N=z._levels,O=[],P=[],U,B,X=N.end+N.size/100,$=N.size,se=1.001*F[0]-.001*F[1],le=1.001*F[1]-.001*F[0];for(B=0;B<1e5&&(U=N.start+B*$,!($>0?U>=X:U<=X));B++)U>se&&U0?U>=X:U<=X));B++)U>F[0]&&U-1}G.exports=function(o,a){var n,i=o.data,s=o.layout,h=E([],i),c=E({},s,e(a.tileClass)),m=o._context||{};if(a.width&&(c.width=a.width),a.height&&(c.height=a.height),a.tileClass==="thumbnail"||a.tileClass==="themes__thumb"){c.annotations=[];var p=Object.keys(c);for(n=0;n=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 c(m,p,T,l,_,w){w=w||{};var A=w.moduleHasSelected!==!1,M=w.moduleHasUnselected!==!1,g=w.moduleHasConstrain!==!1,b=w.moduleHasCliponaxis!==!1,d=w.moduleHasTextangle!==!1,u=w.moduleHasInsideanchor!==!1,y=!!w.hasPathbar,f=Array.isArray(_)||_==="auto",R=f||_==="inside",L=f||_==="outside";if(R||L){var z=n(l,"textfont",T.font),F=x.extendFlat({},z),N=m.textfont&&m.textfont.color,O=!N;if(O&&delete F.color,n(l,"insidetextfont",F),y){var P=x.extendFlat({},z);O&&delete P.color,n(l,"pathbar.textfont",P)}L&&n(l,"outsidetextfont",z),A&&l("selected.textfont.color"),M&&l("unselected.textfont.color"),g&&l("constraintext"),b&&l("cliponaxis"),d&&l("textangle"),l("texttemplate"),l("texttemplatefallback")}R&&u&&l("insidetextanchor")}G.exports={supplyDefaults:i,crossTraceDefaults:s,handleText:c,validateCornerradius:h}}}),J5=Xe({"src/traces/bar/layout_defaults.js"(Z,G){"use strict";var v=so(),x=Go(),S=sa(),E=U2(),e=gd().validateCornerradius;G.exports=function(t,r,o){function a(A,M){return S.coerce(t,r,E,A,M)}for(var n=!1,i=!1,s=!1,h={},c=a("barmode"),m=c==="group",p=0;p0&&!h[l]&&(s=!0),h[l]=!0),T.visible&&T.type==="histogram"){var _=x.getFromId({_fullLayout:r},T[T.orientation==="v"?"xaxis":"yaxis"]);_.type!=="category"&&(i=!0)}}if(!n){delete r.barmode;return}c!=="overlay"&&a("barnorm"),a("bargap",i&&!s?0:.2),a("bargroupgap");var w=a("barcornerradius");r.barcornerradius=e(w)}}}),B_=Xe({"src/traces/bar/arrays_to_calcdata.js"(Z,G){"use strict";var v=sa();G.exports=function(S,E){for(var e=0;er;if(!o)return E}return e!==void 0?e:S.dflt},Z.coerceColor=function(S,E,e){return v(E).isValid()?E:e!==void 0?e:S.dflt},Z.coerceEnumerated=function(S,E,e){return S.coerceNumber&&(E=+E),S.values.indexOf(E)!==-1?E:e!==void 0?e:S.dflt},Z.getValue=function(S,E){var e;return x(S)?E1||y.bargap===0&&y.bargroupgap===0&&!f[0].trace.marker.line.width)&&v.select(this).attr("shape-rendering","crispEdges")}),d.selectAll("g.points").each(function(f){var R=v.select(this),L=f[0].trace;h(R,L,b)}),e.getComponentMethod("errorbars","style")(d)}function h(b,d,u){S.pointStyle(b.selectAll("path"),d,u),c(b,d,u)}function c(b,d,u){b.selectAll("text").each(function(y){var f=v.select(this),R=E.ensureUniformFontSize(u,l(f,y,d,u));S.font(f,R)})}function m(b,d,u){var y=d[0].trace;y.selectedpoints?p(u,y,b):(h(u,y,b),e.getComponentMethod("errorbars","style")(u))}function p(b,d,u){S.selectedPointStyle(b.selectAll("path"),d),T(b.selectAll("text"),d,u)}function T(b,d,u){b.each(function(y){var f=v.select(this),R;if(y.selected){R=E.ensureUniformFontSize(u,l(f,y,d,u));var L=d.selected.textfont&&d.selected.textfont.color;L&&(R.color=L),S.font(f,R)}else S.selectedTextStyle(f,d)})}function l(b,d,u,y){var f=y._fullLayout.font,R=u.textfont;if(b.classed("bartext-inside")){var L=g(d,u);R=w(u,d.i,f,L)}else b.classed("bartext-outside")&&(R=A(u,d.i,f));return R}function _(b,d,u){return M(o,b.textfont,d,u)}function w(b,d,u,y){var f=_(b,d,u),R=b._input.textfont===void 0||b._input.textfont.color===void 0||Array.isArray(b.textfont.color)&&b.textfont.color[d]===void 0;return R&&(f={color:x.contrast(y),family:f.family,size:f.size,weight:f.weight,style:f.style,variant:f.variant,textcase:f.textcase,lineposition:f.lineposition,shadow:f.shadow}),M(a,b.insidetextfont,d,f)}function A(b,d,u){var y=_(b,d,u);return M(n,b.outsidetextfont,d,y)}function M(b,d,u,y){d=d||{};var f=i.getValue(d.family,u),R=i.getValue(d.size,u),L=i.getValue(d.color,u),z=i.getValue(d.weight,u),F=i.getValue(d.style,u),N=i.getValue(d.variant,u),O=i.getValue(d.textcase,u),P=i.getValue(d.lineposition,u),U=i.getValue(d.shadow,u);return{family:i.coerceString(b.family,f,y.family),size:i.coerceNumber(b.size,R,y.size),color:i.coerceColor(b.color,L,y.color),weight:i.coerceString(b.weight,z,y.weight),style:i.coerceString(b.style,F,y.style),variant:i.coerceString(b.variant,N,y.variant),textcase:i.coerceString(b.variant,O,y.textcase),lineposition:i.coerceString(b.variant,P,y.lineposition),shadow:i.coerceString(b.variant,U,y.shadow)}}function g(b,d){return d.type==="waterfall"?d[b.dir].marker.color:b.mcc||b.mc||d.marker.color}G.exports={style:s,styleTextPoints:c,styleOnSelect:m,getInsideTextFont:w,getOutsideTextFont:A,getBarColor:g,resizeText:t}}}),tg=Xe({"src/traces/bar/plot.js"(Z,G){"use strict";var v=Hn(),x=rs(),S=sa(),E=ou(),e=$n(),t=es(),r=so(),o=Go().tickText,a=Sp(),n=a.recordMinTextSize,i=a.clearMinTextSize,s=Nd(),h=q2(),c=i0(),m=Sv(),p=m.text,T=m.textposition,l=$p().appendArrayPointValue,_=c.TEXTPAD;function w($){return $.id}function A($){if($.ids)return w}function M($){return($>0)-($<0)}function g($,se){return $0}function y($,se,le,fe,V,Y){var ee=se.xaxis,q=se.yaxis,oe=$._fullLayout,ae=$._context.staticPlot;V||(V={mode:oe.barmode,norm:oe.barmode,gap:oe.bargap,groupgap:oe.bargroupgap},i("bar",oe));var j=S.makeTraceGroups(fe,le,"trace bars").each(function(Q){var re=v.select(this),ce=Q[0].trace,be=Q[0].t,Ae=ce.type==="waterfall",De=ce.type==="funnel",ze=ce.type==="histogram",Ze=ce.type==="bar",at=Ze||De,nt=0;Ae&&ce.connector.visible&&ce.connector.mode==="between"&&(nt=ce.connector.line.width/2);var rt=ce.orientation==="h",st=u(V),Me=S.ensureSingle(re,"g","points"),ye=A(ce),he=Me.selectAll("g.point").data(S.identity,ye);he.enter().append("g").classed("point",!0),he.exit().remove(),he.each(function(tt,ot){var Qe=v.select(this),Pt=b(tt,ee,q,rt),It=Pt[0][0],qt=Pt[0][1],Wt=Pt[1][0],kr=Pt[1][1],mr=(rt?qt-It:kr-Wt)===0;mr&&at&&h.getLineWidth(ce,tt)&&(mr=!1),mr||(mr=!x(It)||!x(qt)||!x(Wt)||!x(kr)),tt.isBlank=mr,mr&&(rt?qt=It:kr=Wt),nt&&!mr&&(rt?(It-=g(It,qt)*nt,qt+=g(It,qt)*nt):(Wt-=g(Wt,kr)*nt,kr+=g(Wt,kr)*nt));var qr,Sr;if(ce.type==="waterfall"){if(!mr){var Rr=ce[tt.dir].marker;qr=Rr.line.width,Sr=Rr.color}}else qr=h.getLineWidth(ce,tt),Sr=tt.mc||ce.marker.color;function wt(wi){var Kt=v.round(qr/2%1,2);return V.gap===0&&V.groupgap===0?v.round(Math.round(wi)-Kt,2):wi}function Ne(wi,Kt,Ft){return Ft&&wi===Kt?wi:Math.abs(wi-Kt)>=2?wt(wi):wi>Kt?Math.ceil(wi):Math.floor(wi)}var Ke=e.opacity(Sr),Te=Ke<1||qr>.01?wt:Ne;$._context.staticPlot||(It=Te(It,qt,rt),qt=Te(qt,It,rt),Wt=Te(Wt,kr,!rt),kr=Te(kr,Wt,!rt));var Ie=rt?ee.c2p:q.c2p,Ve;tt.s0>0?Ve=tt._sMax:tt.s0<0?Ve=tt._sMin:Ve=tt.s1>0?tt._sMax:tt._sMin;function Ce(wi,Kt){if(!wi)return 0;var Ft=Math.abs(rt?kr-Wt:qt-It),Yt=Math.abs(rt?qt-It:kr-Wt),Jt=Te(Math.abs(Ie(Ve,!0)-Ie(0,!0))),Fr=tt.hasB?Math.min(Ft/2,Yt/2):Math.min(Ft/2,Jt),ta;if(Kt==="%"){var ra=Math.min(50,wi);ta=Ft*(ra/100)}else ta=wi;return Te(Math.max(Math.min(ta,Fr),0))}var Ee=Ze||ze?Ce(be.cornerradiusvalue,be.cornerradiusform):0,Pe,ft,ct="M"+It+","+Wt+"V"+kr+"H"+qt+"V"+Wt+"Z",_t=0;if(Ee&&tt.s){var Ct=M(tt.s0)===0||M(tt.s)===M(tt.s0)?tt.s1:tt.s0;if(_t=Te(tt.hasB?0:Math.abs(Ie(Ve,!0)-Ie(Ct,!0))),_t0?Math.sqrt(_t*(2*Ee-_t)):0,Da=ir>0?Math.max:Math.min;Pe="M"+It+","+Wt+"V"+(kr-Lr*rr)+"H"+Da(qt-(Ee-_t)*ir,It)+"A "+Ee+","+Ee+" 0 0 "+er+" "+qt+","+(kr-Ee*rr-fa)+"V"+(Wt+Ee*rr+fa)+"A "+Ee+","+Ee+" 0 0 "+er+" "+Da(qt-(Ee-_t)*ir,It)+","+(Wt+Lr*rr)+"Z"}else if(tt.hasB)Pe="M"+(It+Ee*ir)+","+Wt+"A "+Ee+","+Ee+" 0 0 "+er+" "+It+","+(Wt+Ee*rr)+"V"+(kr-Ee*rr)+"A "+Ee+","+Ee+" 0 0 "+er+" "+(It+Ee*ir)+","+kr+"H"+(qt-Ee*ir)+"A "+Ee+","+Ee+" 0 0 "+er+" "+qt+","+(kr-Ee*rr)+"V"+(Wt+Ee*rr)+"A "+Ee+","+Ee+" 0 0 "+er+" "+(qt-Ee*ir)+","+Wt+"Z";else{ft=Math.abs(kr-Wt)+_t;var Ia=ft0?Math.sqrt(_t*(2*Ee-_t)):0,Wa=rr>0?Math.max:Math.min;Pe="M"+(It+Ia*ir)+","+Wt+"V"+Wa(kr-(Ee-_t)*rr,Wt)+"A "+Ee+","+Ee+" 0 0 "+er+" "+(It+Ee*ir-qa)+","+kr+"H"+(qt-Ee*ir+qa)+"A "+Ee+","+Ee+" 0 0 "+er+" "+(qt-Ia*ir)+","+Wa(kr-(Ee-_t)*rr,Wt)+"V"+Wt+"Z"}}else Pe=ct}else Pe=ct;var Ca=d(S.ensureSingle(Qe,"path"),oe,V,Y);if(Ca.style("vector-effect",ae?"none":"non-scaling-stroke").attr("d",isNaN((qt-It)*(kr-Wt))||mr&&$._context.staticPlot?"M0,0Z":Pe).call(t.setClipUrl,se.layerClipId,$),!oe.uniformtext.mode&&st){var hi=t.makePointStyleFns(ce);t.singlePointStyle(tt,Ca,ce,hi,$)}f($,se,Qe,Q,ot,It,qt,Wt,kr,Ee,_t,V,Y),se.layerClipId&&t.hideOutsideRangePoint(tt,Qe.select("text"),ee,q,ce.xcalendar,ce.ycalendar)});var Oe=ce.cliponaxis===!1;t.setClipUrl(re,Oe?null:se.layerClipId,$)});r.getComponentMethod("errorbars","plot")($,j,se,V)}function f($,se,le,fe,V,Y,ee,q,oe,ae,j,Q,re){var ce=se.xaxis,be=se.yaxis,Ae=$._fullLayout,De;function ze(ft,ct,_t){var Ct=S.ensureSingle(ft,"text").text(ct).attr({class:"bartext bartext-"+De,"text-anchor":"middle","data-notex":1}).call(t.font,_t).call(E.convertToTspans,$);return Ct}var Ze=fe[0].trace,at=Ze.orientation==="h",nt=P(Ae,fe,V,ce,be);De=U(Ze,V);var rt=Q.mode==="stack"||Q.mode==="relative",st=fe[V],Me=!rt||st._outmost,ye=st.hasB,he=ae&&ae-j>_;if(!nt||De==="none"||(st.isBlank||Y===ee||q===oe)&&(De==="auto"||De==="inside")){le.select("text").remove();return}var Oe=Ae.font,tt=s.getBarColor(fe[V],Ze),ot=s.getInsideTextFont(Ze,V,Oe,tt),Qe=s.getOutsideTextFont(Ze,V,Oe),Pt=Ze.insidetextanchor||"end",It=le.datum();at?ce.type==="log"&&It.s0<=0&&(ce.range[0]0&&wt>0,Te;he?ye?Te=R(kr-2*ae,mr,Rr,wt,at)||R(kr,mr-2*ae,Rr,wt,at):at?Te=R(kr-(ae-j),mr,Rr,wt,at)||R(kr,mr-2*(ae-j),Rr,wt,at):Te=R(kr,mr-(ae-j),Rr,wt,at)||R(kr-2*(ae-j),mr,Rr,wt,at):Te=R(kr,mr,Rr,wt,at),Ke&&Te?De="inside":(De="outside",qr.remove(),qr=null)}else De="inside";if(!qr){Ne=S.ensureUniformFontSize($,De==="outside"?Qe:ot),qr=ze(le,nt,Ne);var Ie=qr.attr("transform");if(qr.attr("transform",""),Sr=t.bBox(qr.node()),Rr=Sr.width,wt=Sr.height,qr.attr("transform",Ie),Rr<=0||wt<=0){qr.remove();return}}var Ve=Ze.textangle,Ce,Ee;De==="outside"?(Ee=Ze.constraintext==="both"||Ze.constraintext==="outside",Ce=O(Y,ee,q,oe,Sr,{isHorizontal:at,constrained:Ee,angle:Ve})):(Ee=Ze.constraintext==="both"||Ze.constraintext==="inside",Ce=F(Y,ee,q,oe,Sr,{isHorizontal:at,constrained:Ee,angle:Ve,anchor:Pt,hasB:ye,r:ae,overhead:j})),Ce.fontSize=Ne.size,n(Ze.type==="histogram"?"bar":Ze.type,Ce,Ae),st.transform=Ce;var Pe=d(qr,Ae,Q,re);S.setTransormAndDisplay(Pe,Ce)}function R($,se,le,fe,V){if($<0||se<0)return!1;var Y=le<=$&&fe<=se,ee=le<=se&&fe<=$,q=V?$>=le*(se/fe):se>=fe*($/le);return Y||ee||q}function L($){return $==="auto"?0:$}function z($,se){var le=Math.PI/180*se,fe=Math.abs(Math.sin(le)),V=Math.abs(Math.cos(le));return{x:$.width*V+$.height*fe,y:$.width*fe+$.height*V}}function F($,se,le,fe,V,Y){var ee=!!Y.isHorizontal,q=!!Y.constrained,oe=Y.angle||0,ae=Y.anchor,j=ae==="end",Q=ae==="start",re=Y.leftToRight||0,ce=(re+1)/2,be=1-ce,Ae=Y.hasB,De=Y.r,ze=Y.overhead,Ze=V.width,at=V.height,nt=Math.abs(se-$),rt=Math.abs(fe-le),st=nt>2*_&&rt>2*_?_:0;nt-=2*st,rt-=2*st;var Me=L(oe);oe==="auto"&&!(Ze<=nt&&at<=rt)&&(Ze>nt||at>rt)&&(!(Ze>rt||at>nt)||Ze_){var tt=N($,se,le,fe,ye,De,ze,ee,Ae);he=tt.scale,Oe=tt.pad}else he=1,q&&(he=Math.min(1,nt/ye.x,rt/ye.y)),Oe=0;var ot=V.left*be+V.right*ce,Qe=(V.top+V.bottom)/2,Pt=($+_)*be+(se-_)*ce,It=(le+fe)/2,qt=0,Wt=0;if(Q||j){var kr=(ee?ye.x:ye.y)/2;De&&(j||Ae)&&(st+=Oe);var mr=ee?g($,se):g(le,fe);ee?Q?(Pt=$+mr*st,qt=-mr*kr):(Pt=se-mr*st,qt=mr*kr):Q?(It=le+mr*st,Wt=-mr*kr):(It=fe-mr*st,Wt=mr*kr)}return{textX:ot,textY:Qe,targetX:Pt,targetY:It,anchorX:qt,anchorY:Wt,scale:he,rotate:Me}}function N($,se,le,fe,V,Y,ee,q,oe){var ae=Math.max(0,Math.abs(se-$)-2*_),j=Math.max(0,Math.abs(fe-le)-2*_),Q=Y-_,re=ee?Q-Math.sqrt(Q*Q-(Q-ee)*(Q-ee)):Q,ce=oe?Q*2:q?Q-ee:2*re,be=oe?Q*2:q?2*re:Q-ee,Ae,De,ze,Ze,at;return V.y/V.x>=j/(ae-ce)?Ze=j/V.y:V.y/V.x<=(j-be)/ae?Ze=ae/V.x:!oe&&q?(Ae=V.x*V.x+V.y*V.y/4,De=-2*V.x*(ae-Q)-V.y*(j/2-Q),ze=(ae-Q)*(ae-Q)+(j/2-Q)*(j/2-Q)-Q*Q,Ze=(-De+Math.sqrt(De*De-4*Ae*ze))/(2*Ae)):oe?(Ae=(V.x*V.x+V.y*V.y)/4,De=-V.x*(ae/2-Q)-V.y*(j/2-Q),ze=(ae/2-Q)*(ae/2-Q)+(j/2-Q)*(j/2-Q)-Q*Q,Ze=(-De+Math.sqrt(De*De-4*Ae*ze))/(2*Ae)):(Ae=V.x*V.x/4+V.y*V.y,De=-V.x*(ae/2-Q)-2*V.y*(j-Q),ze=(ae/2-Q)*(ae/2-Q)+(j-Q)*(j-Q)-Q*Q,Ze=(-De+Math.sqrt(De*De-4*Ae*ze))/(2*Ae)),Ze=Math.min(1,Ze),q?at=Math.max(0,Q-Math.sqrt(Math.max(0,Q*Q-(Q-(j-V.y*Ze)/2)*(Q-(j-V.y*Ze)/2)))-ee):at=Math.max(0,Q-Math.sqrt(Math.max(0,Q*Q-(Q-(ae-V.x*Ze)/2)*(Q-(ae-V.x*Ze)/2)))-ee),{scale:Ze,pad:at}}function O($,se,le,fe,V,Y){var ee=!!Y.isHorizontal,q=!!Y.constrained,oe=Y.angle||0,ae=V.width,j=V.height,Q=Math.abs(se-$),re=Math.abs(fe-le),ce;ee?ce=re>2*_?_:0:ce=Q>2*_?_:0;var be=1;q&&(be=ee?Math.min(1,re/j):Math.min(1,Q/ae));var Ae=L(oe),De=z(V,Ae),ze=(ee?De.x:De.y)/2,Ze=(V.left+V.right)/2,at=(V.top+V.bottom)/2,nt=($+se)/2,rt=(le+fe)/2,st=0,Me=0,ye=ee?g(se,$):g(le,fe);return ee?(nt=se-ye*ce,st=ye*ze):(rt=fe+ye*ce,Me=-ye*ze),{textX:Ze,textY:at,targetX:nt,targetY:rt,anchorX:st,anchorY:Me,scale:be,rotate:Ae}}function P($,se,le,fe,V){var Y=se[0].trace,ee=Y.texttemplate,q;return ee?q=B($,se,le,fe,V):Y.textinfo?q=X(se,le,fe,V):q=h.getValue(Y.text,le),h.coerceString(p,q)}function U($,se){var le=h.getValue($.textposition,se);return h.coerceEnumerated(T,le)}function B($,se,le,fe,V){var Y=se[0].trace,ee=S.castOption(Y,le,"texttemplate");if(!ee)return"";var q=Y.type==="histogram",oe=Y.type==="waterfall",ae=Y.type==="funnel",j=Y.orientation==="h",Q,re,ce,be;j?(Q="y",re=V,ce="x",be=fe):(Q="x",re=fe,ce="y",be=V);function Ae(st){return o(re,re.c2l(st),!0).text}function De(st){return o(be,be.c2l(st),!0).text}var ze=se[le],Ze={};Ze.label=ze.p,Ze.labelLabel=Ze[Q+"Label"]=Ae(ze.p);var at=S.castOption(Y,ze.i,"text");(at===0||at)&&(Ze.text=at),Ze.value=ze.s,Ze.valueLabel=Ze[ce+"Label"]=De(ze.s);var nt={};l(nt,Y,ze.i),(q||nt.x===void 0)&&(nt.x=j?Ze.value:Ze.label),(q||nt.y===void 0)&&(nt.y=j?Ze.label:Ze.value),(q||nt.xLabel===void 0)&&(nt.xLabel=j?Ze.valueLabel:Ze.labelLabel),(q||nt.yLabel===void 0)&&(nt.yLabel=j?Ze.labelLabel:Ze.valueLabel),oe&&(Ze.delta=+ze.rawS||ze.s,Ze.deltaLabel=De(Ze.delta),Ze.final=ze.v,Ze.finalLabel=De(Ze.final),Ze.initial=Ze.final-Ze.delta,Ze.initialLabel=De(Ze.initial)),ae&&(Ze.value=ze.s,Ze.valueLabel=De(Ze.value),Ze.percentInitial=ze.begR,Ze.percentInitialLabel=S.formatPercent(ze.begR),Ze.percentPrevious=ze.difR,Ze.percentPreviousLabel=S.formatPercent(ze.difR),Ze.percentTotal=ze.sumR,Ze.percenTotalLabel=S.formatPercent(ze.sumR));var rt=S.castOption(Y,ze.i,"customdata");return rt&&(Ze.customdata=rt),S.texttemplateString({data:[nt,Ze,Y._meta],fallback:Y.texttemplatefallback,labels:Ze,locale:$._d3locale,template:ee})}function X($,se,le,fe){var V=$[0].trace,Y=V.orientation==="h",ee=V.type==="waterfall",q=V.type==="funnel";function oe(rt){var st=Y?fe:le;return o(st,rt,!0).text}function ae(rt){var st=Y?le:fe;return o(st,+rt,!0).text}var j=V.textinfo,Q=$[se],re=j.split("+"),ce=[],be,Ae=function(rt){return re.indexOf(rt)!==-1};if(Ae("label")&&ce.push(oe($[se].p)),Ae("text")&&(be=S.castOption(V,Q.i,"text"),(be===0||be)&&ce.push(be)),ee){var De=+Q.rawS||Q.s,ze=Q.v,Ze=ze-De;Ae("initial")&&ce.push(ae(Ze)),Ae("delta")&&ce.push(ae(De)),Ae("final")&&ce.push(ae(ze))}if(q){Ae("value")&&ce.push(ae(Q.s));var at=0;Ae("percent initial")&&at++,Ae("percent previous")&&at++,Ae("percent total")&&at++;var nt=at>1;Ae("percent initial")&&(be=S.formatPercent(Q.begR),nt&&(be+=" of initial"),ce.push(be)),Ae("percent previous")&&(be=S.formatPercent(Q.difR),nt&&(be+=" of previous"),ce.push(be)),Ae("percent total")&&(be=S.formatPercent(Q.sumR),nt&&(be+=" of total"),ce.push(be))}return ce.join("
")}G.exports={plot:y,toMoveInsideBar:F}}}),f1=Xe({"src/traces/bar/hover.js"(Z,G){"use strict";var v=rf(),x=so(),S=$n(),E=sa().fillText,e=q2().getLineWidth,t=Go().hoverLabelText,r=Hs().BADNUM;function o(i,s,h,c,m){var p=a(i,s,h,c,m);if(p){var T=p.cd,l=T[0].trace,_=T[p.index];return p.color=n(l,_),x.getComponentMethod("errorbars","hoverInfo")(_,l,p),[p]}}function a(i,s,h,c,m){var p=i.cd,T=p[0].trace,l=p[0].t,_=c==="closest",w=T.type==="waterfall",A=i.maxHoverDistance,M=i.maxSpikeDistance,g,b,d,u,y,f,R;T.orientation==="h"?(g=h,b=s,d="y",u="x",y=fe,f=$):(g=s,b=h,d="x",u="y",f=fe,y=$);var L=T[d+"period"],z=_||L;function F(be){return O(be,-1)}function N(be){return O(be,1)}function O(be,Ae){var De=be.w;return be[d]+Ae*De/2}function P(be){return be[d+"End"]-be[d+"Start"]}var U=_?F:L?function(be){return be.p-P(be)/2}:function(be){return Math.min(F(be),be.p-l.bardelta/2)},B=_?N:L?function(be){return be.p+P(be)/2}:function(be){return Math.max(N(be),be.p+l.bardelta/2)};function X(be,Ae,De){return m.finiteRange&&(De=0),v.inbox(be-g,Ae-g,De+Math.min(1,Math.abs(Ae-be)/R)-1)}function $(be){return X(U(be),B(be),A)}function se(be){return X(F(be),N(be),M)}function le(be){var Ae=be[u];if(w){var De=Math.abs(be.rawS)||0;b>0?Ae+=De:b<0&&(Ae-=De)}return Ae}function fe(be){var Ae=b,De=be.b,ze=le(be);return v.inbox(De-Ae,ze-Ae,A+(ze-Ae)/(ze-De)-1)}function V(be){var Ae=b,De=be.b,ze=le(be);return v.inbox(De-Ae,ze-Ae,M+(ze-Ae)/(ze-De)-1)}var Y=i[d+"a"],ee=i[u+"a"];R=Math.abs(Y.r2c(Y.range[1])-Y.r2c(Y.range[0]));function q(be){return(y(be)+f(be))/2}var oe=v.getDistanceFunction(c,y,f,q);if(v.getClosest(p,oe,i),i.index!==!1&&p[i.index].p!==r){z||(U=function(be){return Math.min(F(be),be.p-l.bargroupwidth/2)},B=function(be){return Math.max(N(be),be.p+l.bargroupwidth/2)});var ae=i.index,j=p[ae],Q=T.base?j.b+j.s:j.s;i[u+"0"]=i[u+"1"]=ee.c2p(j[u],!0),i[u+"LabelVal"]=Q;var re=l.extents[l.extents.round(j.p)];i[d+"0"]=Y.c2p(_?U(j):re[0],!0),i[d+"1"]=Y.c2p(_?B(j):re[1],!0);var ce=j.orig_p!==void 0;return i[d+"LabelVal"]=ce?j.orig_p:j.p,i.labelLabel=t(Y,i[d+"LabelVal"],T[d+"hoverformat"]),i.valueLabel=t(ee,i[u+"LabelVal"],T[u+"hoverformat"]),i.baseLabel=t(ee,j.b,T[u+"hoverformat"]),i.spikeDistance=(V(j)+se(j))/2,i[d+"Spike"]=Y.c2p(j.p,!0),E(j,T,i),i.hovertemplate=T.hovertemplate,i}}function n(i,s){var h=s.mcc||i.marker.color,c=s.mlcc||i.marker.line.color,m=e(i,s);if(S.opacity(h))return h;if(S.opacity(c)&&m)return c}G.exports={hoverPoints:o,hoverOnBars:a,getTraceColor:n}}}),Y9=Xe({"src/traces/bar/event_data.js"(Z,G){"use strict";G.exports=function(x,S,E){return x.x="xVal"in S?S.xVal:S.x,x.y="yVal"in S?S.yVal:S.y,S.xa&&(x.xaxis=S.xa),S.ya&&(x.yaxis=S.ya),E.orientation==="h"?(x.label=x.y,x.value=x.x):(x.label=x.x,x.value=x.y),x}}}),h1=Xe({"src/traces/bar/select.js"(Z,G){"use strict";G.exports=function(S,E){var e=S.cd,t=S.xaxis,r=S.yaxis,o=e[0].trace,a=o.type==="funnel",n=o.orientation==="h",i=[],s;if(E===!1)for(s=0;s0?(L="v",d>0?z=Math.min(y,u):z=Math.min(u)):d>0?(L="h",z=Math.min(y)):z=0;if(!z){h.visible=!1;return}h._length=z;var U=c("orientation",L);h._hasPreCompStats?U==="v"&&d===0?(c("x0",0),c("dx",1)):U==="h"&&b===0&&(c("y0",0),c("dy",1)):U==="v"&&d===0?c("x0"):U==="h"&&b===0&&c("y0");var B=x.getComponentMethod("calendars","handleTraceDefaults");B(s,h,["x","y"],m)}function n(s,h,c,m){var p=m.prefix,T=v.coerce2(s,h,r,"marker.outliercolor"),l=c("marker.line.outliercolor"),_="outliers";h._hasPreCompStats?_="all":(T||l)&&(_="suspectedoutliers");var w=c(p+"points",_);w?(c("jitter",w==="all"?.3:0),c("pointpos",w==="all"?-1.5:0),c("marker.symbol"),c("marker.opacity"),c("marker.size"),c("marker.angle"),c("marker.color",h.line.color),c("marker.line.color"),c("marker.line.width"),w==="suspectedoutliers"&&(c("marker.line.outliercolor",h.marker.color),c("marker.line.outlierwidth")),c("selected.marker.color"),c("unselected.marker.color"),c("selected.marker.size"),c("unselected.marker.size"),c("text"),c("hovertext")):delete h.marker;var A=c("hoveron");(A==="all"||A.indexOf("points")!==-1)&&(c("hovertemplate"),c("hovertemplatefallback")),v.coerceSelectionMarkerOpacity(h,c)}function i(s,h){var c,m;function p(w){return v.coerce(m._input,m,r,w)}for(var T=0;Tle.uf};if(M._hasPreCompStats){var ae=M[z],j=function(mr){return L.d2c((M[mr]||[])[f])},Q=1/0,re=-1/0;for(f=0;f=le.q1&&le.q3>=le.med){var be=j("lowerfence");le.lf=be!==e&&be<=le.q1?be:m(le,V,Y);var Ae=j("upperfence");le.uf=Ae!==e&&Ae>=le.q3?Ae:p(le,V,Y);var De=j("mean");le.mean=De!==e?De:Y?E.mean(V,Y):(le.q1+le.q3)/2;var ze=j("sd");le.sd=De!==e&&ze>=0?ze:Y?E.stdev(V,Y,le.mean):le.q3-le.q1,le.lo=T(le),le.uo=l(le);var Ze=j("notchspan");Ze=Ze!==e&&Ze>0?Ze:_(le,Y),le.ln=le.med-Ze,le.un=le.med+Ze;var at=le.lf,nt=le.uf;M.boxpoints&&V.length&&(at=Math.min(at,V[0]),nt=Math.max(nt,V[Y-1])),M.notched&&(at=Math.min(at,le.ln),nt=Math.max(nt,le.un)),le.min=at,le.max=nt}else{E.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+le.q1,"median = "+le.med,"q3 = "+le.q3].join(` `));var rt;le.med!==e?rt=le.med:le.q1!==e?le.q3!==e?rt=(le.q1+le.q3)/2:rt=le.q1:le.q3!==e?rt=le.q3:rt=0,le.med=rt,le.q1=le.q3=rt,le.lf=le.uf=rt,le.mean=le.sd=rt,le.ln=le.un=rt,le.min=le.max=rt}Q=Math.min(Q,le.min),re=Math.max(re,le.max),le.pts2=fe.filter(oe),u.push(le)}}M._extremes[L._id]=x.findExtremes(L,[Q,re],{padded:!0})}else{var st=L.makeCalcdata(M,z),Me=o($,se),ye=$.length,he=a(ye);for(f=0;f=0&&Oe0){if(le={},le.pos=le[N]=$[f],fe=le.pts=he[f].sort(h),V=le[z]=fe.map(c),Y=V.length,le.min=V[0],le.max=V[Y-1],le.mean=E.mean(V,Y),le.sd=E.stdev(V,Y,le.mean)*M.sdmultiple,le.med=E.interp(V,.5),Y%2&&(Pt||It)){var qt,Wt;Pt?(qt=V.slice(0,Y/2),Wt=V.slice(Y/2+1)):It&&(qt=V.slice(0,Y/2+1),Wt=V.slice(Y/2)),le.q1=E.interp(qt,.5),le.q3=E.interp(Wt,.5)}else le.q1=E.interp(V,.25),le.q3=E.interp(V,.75);le.lf=m(le,V,Y),le.uf=p(le,V,Y),le.lo=T(le),le.uo=l(le);var kr=_(le,Y);le.ln=le.med-kr,le.un=le.med+kr,tt=Math.min(tt,le.ln),ot=Math.max(ot,le.un),le.pts2=fe.filter(oe),u.push(le)}M.notched&&E.isTypedArray(st)&&(st=Array.from(st)),M._extremes[L._id]=x.findExtremes(L,M.notched?st.concat([tt,ot]):st,{padded:!0})}return s(u,M),u.length>0?(u[0].t={num:g[y],dPos:se,posLetter:N,valLetter:z,labels:{med:t(A,"median:"),min:t(A,"min:"),q1:t(A,"q1:"),q3:t(A,"q3:"),max:t(A,"max:"),mean:M.boxmean==="sd"||M.sizemode==="sd"?t(A,"mean \xB1 \u03C3:").replace("\u03C3",M.sdmultiple===1?"\u03C3":M.sdmultiple+"\u03C3"):t(A,"mean:"),lf:t(A,"lower fence:"),uf:t(A,"upper fence:")}},g[y]++,u):[{t:{empty:!0}}]};function r(w,A,M,g){var b=A in w,d=A+"0"in w,u="d"+A in w;if(b||d&&u){var y=M.makeCalcdata(w,A),f=S(w,M,A,y).vals;return[f,y]}var R;d?R=w[A+"0"]:"name"in w&&(M.type==="category"||v(w.name)&&["linear","log"].indexOf(M.type)!==-1||E.isDateTime(w.name)&&M.type==="date")?R=w.name:R=g;for(var L=M.type==="multicategory"?M.r2c_just_indices(R):M.d2c(R,0,w[A+"calendar"]),z=w._length,F=new Array(z),N=0;N1,d=1-s[r+"gap"],u=1-s[r+"groupgap"];for(m=0;m0;if(L==="positive"?(le=z*(R?1:.5),Y=V,fe=Y=N):L==="negative"?(le=Y=N,fe=z*(R?1:.5),ee=V):(le=fe=z,Y=ee=V),re){var ce=y.pointpos,be=y.jitter,Ae=y.marker.size/2,De=0;ce+be>=0&&(De=V*(ce+be),De>le?(Q=!0,ae=Ae,q=De):De>Y&&(ae=Ae,q=le)),De<=le&&(q=le);var ze=0;ce-be<=0&&(ze=-V*(ce-be),ze>fe?(Q=!0,j=Ae,oe=ze):ze>ee&&(j=Ae,oe=fe)),ze<=fe&&(oe=fe)}else q=le,oe=fe;var Ze=new Array(T.length);for(p=0;pM.lo&&(U.so=!0)}return b});A.enter().append("path").classed("point",!0),A.exit().remove(),A.call(S.translatePoints,c,m)}function a(n,i,s,h){var c=i.val,m=i.pos,p=!!m.rangebreaks,T=h.bPos,l=h.bPosPxOffset||0,_=s.boxmean||(s.meanline||{}).visible,w,A;Array.isArray(h.bdPos)?(w=h.bdPos[0],A=h.bdPos[1]):(w=h.bdPos,A=h.bdPos);var M=n.selectAll("path.mean").data(s.type==="box"&&s.boxmean||s.type==="violin"&&s.box.visible&&s.meanline.visible?x.identity:[]);M.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),M.exit().remove(),M.each(function(g){var b=m.c2l(g.pos+T,!0),d=m.l2p(b-w)+l,u=m.l2p(b+A)+l,y=p?(d+u)/2:m.l2p(b)+l,f=c.c2p(g.mean,!0),R=c.c2p(g.mean-g.sd,!0),L=c.c2p(g.mean+g.sd,!0);s.orientation==="h"?v.select(this).attr("d","M"+f+","+d+"V"+u+(_==="sd"?"m0,0L"+R+","+y+"L"+f+","+d+"L"+L+","+y+"Z":"")):v.select(this).attr("d","M"+d+","+f+"H"+u+(_==="sd"?"m0,0L"+y+","+R+"L"+d+","+f+"L"+y+","+L+"Z":""))})}G.exports={plot:t,plotBoxAndWhiskers:r,plotPoints:o,plotBoxMean:a}}}),W2=Xe({"src/traces/box/style.js"(Z,G){"use strict";var v=Hn(),x=$n(),S=es();function E(t,r,o){var a=o||v.select(t).selectAll("g.trace.boxes");a.style("opacity",function(n){return n[0].trace.opacity}),a.each(function(n){var i=v.select(this),s=n[0].trace,h=s.line.width;function c(T,l,_,w){T.style("stroke-width",l+"px").call(x.stroke,_).call(x.fill,w)}var m=i.selectAll("path.box");if(s.type==="candlestick")m.each(function(T){if(!T.empty){var l=v.select(this),_=s[T.dir];c(l,_.line.width,_.line.color,_.fillcolor),l.style("opacity",s.selectedpoints&&!T.selected?.3:1)}});else{c(m,h,s.line.color,s.fillcolor),i.selectAll("path.mean").style({"stroke-width":h,"stroke-dasharray":2*h+"px,"+h+"px"}).call(x.stroke,s.line.color);var p=i.selectAll("path.point");S.pointStyle(p,s,t)}})}function e(t,r,o){var a=r[0].trace,n=o.selectAll("path.point");a.selectedpoints?S.selectedPointStyle(n,a):S.pointStyle(n,a,t)}G.exports={style:E,styleOnSelect:e}}}),Q5=Xe({"src/traces/box/hover.js"(Z,G){"use strict";var v=Go(),x=sa(),S=rf(),E=$n(),e=x.fillText;function t(a,n,i,s){var h=a.cd,c=h[0].trace,m=c.hoveron,p=[],T;return m.indexOf("boxes")!==-1&&(p=p.concat(r(a,n,i,s))),m.indexOf("points")!==-1&&(T=o(a,n,i)),s==="closest"?T?[T]:p:(T&&p.push(T),p)}function r(a,n,i,s){var h=a.cd,c=a.xa,m=a.ya,p=h[0].trace,T=h[0].t,l=p.type==="violin",_,w,A,M,g,b,d,u,y,f,R,L=T.bdPos,z,F,N=T.wHover,O=function(ze){return A.c2l(ze.pos)+T.bPos-A.c2l(b)};l&&p.side!=="both"?(p.side==="positive"&&(y=function(ze){var Ze=O(ze);return S.inbox(Ze,Ze+N,f)},z=L,F=0),p.side==="negative"&&(y=function(ze){var Ze=O(ze);return S.inbox(Ze-N,Ze,f)},z=0,F=L)):(y=function(ze){var Ze=O(ze);return S.inbox(Ze-N,Ze+N,f)},z=F=L);var P;l?P=function(ze){return S.inbox(ze.span[0]-g,ze.span[1]-g,f)}:P=function(ze){return S.inbox(ze.min-g,ze.max-g,f)},p.orientation==="h"?(g=n,b=i,d=P,u=y,_="y",A=m,w="x",M=c):(g=i,b=n,d=y,u=P,_="x",A=c,w="y",M=m);var U=Math.min(1,L/Math.abs(A.r2c(A.range[1])-A.r2c(A.range[0])));f=a.maxHoverDistance-U,R=a.maxSpikeDistance-U;function B(ze){return(d(ze)+u(ze))/2}var X=S.getDistanceFunction(s,d,u,B);if(S.getClosest(h,X,a),a.index===!1)return[];var $=h[a.index],se=p.line.color,le=(p.marker||{}).color;E.opacity(se)&&p.line.width?a.color=se:E.opacity(le)&&p.boxpoints?a.color=le:a.color=p.fillcolor,a[_+"0"]=A.c2p($.pos+T.bPos-F,!0),a[_+"1"]=A.c2p($.pos+T.bPos+z,!0),a[_+"LabelVal"]=$.orig_p!==void 0?$.orig_p:$.pos;var fe=_+"Spike";a.spikeDistance=B($)*R/f,a[fe]=A.c2p($.pos,!0);var V=p.boxmean||p.sizemode==="sd"||(p.meanline||{}).visible,Y=p.boxpoints||p.points,ee=Y&&V?["max","uf","q3","med","mean","q1","lf","min"]:Y&&!V?["max","uf","q3","med","q1","lf","min"]:!Y&&V?["max","q3","med","mean","q1","min"]:["max","q3","med","q1","min"],q=M.range[1]0&&(o=!0);for(var s=0;st){var r=t-E[x];return E[x]=t,r}}else return E[x]=t,t;return 0},max:function(x,S,E,e){var t=e[S];if(v(t))if(t=Number(t),v(E[x])){if(E[x]d&&dE){var f=u===x?1:6,R=u===x?"M12":"M1";return function(L,z){var F=T.c2d(L,x,l),N=F.indexOf("-",f);N>0&&(F=F.slice(0,N));var O=T.d2c(F,0,l);if(Or?h>E?h>x*1.1?x:h>S*1.1?S:E:h>e?e:h>t?t:r:Math.pow(10,Math.floor(Math.log(h)/Math.LN10))}function i(h,c,m,p,T,l){if(p&&h>E){var _=s(c,T,l),w=s(m,T,l),A=h===x?0:1;return _[A]!==w[A]}return Math.floor(m/h)-Math.floor(c/h)>.1}function s(h,c,m){var p=c.c2d(h,x,m).split("-");return p[0]===""&&(p.unshift(),p[0]="-"+p[0]),p}}}),oS=Xe({"src/traces/histogram/calc.js"(Z,G){"use strict";var v=rs(),x=sa(),S=so(),E=Go(),{hasColorscale:e}=wp(),t=Tp(),r=B_(),o=rS(),a=aS(),n=iS(),i=nS();function s(T,l){var _=[],w=[],A=l.orientation==="h",M=E.getFromId(T,A?l.yaxis:l.xaxis),g=A?"y":"x",b={x:"y",y:"x"}[g],d=l[g+"calendar"],u=l.cumulative,y,f=h(T,l,M,g),R=f[0],L=f[1],z=typeof R.size=="string",F=[],N=z?F:R,O=[],P=[],U=[],B=0,X=l.histnorm,$=l.histfunc,se=X.indexOf("density")!==-1,le,fe,V;u.enabled&&se&&(X=X.replace(/ ?density$/,""),se=!1);var Y=$==="max"||$==="min",ee=Y?null:0,q=o.count,oe=a[X],ae=!1,j=function(Oe){return M.r2c(Oe,0,d)},Q;for(x.isArrayOrTypedArray(l[b])&&$!=="count"&&(Q=l[b],ae=$==="avg",q=o[$]),y=j(R.start),fe=j(R.end)+(y-E.tickIncrement(y,R.size,!1,d))/1e6;y=0&&V=Me;y--)if(w[y]){ye=y;break}for(y=Me;y<=ye;y++)if(v(_[y])&&v(w[y])){var he={p:_[y],s:w[y],b:0};u.enabled||(he.pts=U[y],Ae?he.ph0=he.ph1=U[y].length?L[U[y][0]]:_[y]:(l._computePh=!0,he.ph0=nt(F[y]),he.ph1=nt(F[y+1],!0))),st.push(he)}return st.length===1&&(st[0].width1=E.tickIncrement(st[0].p,R.size,!1,d)-st[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(st,l),x.isArrayOrTypedArray(l.selectedpoints)&&x.tagSelected(st,l,Ze),st}function h(T,l,_,w,A){var M=w+"bins",g=T._fullLayout,b=l["_"+w+"bingroup"],d=g._histogramBinOpts[b],u=g.barmode==="overlay",y,f,R,L,z,F,N,O=function(at){return _.r2c(at,0,L)},P=function(at){return _.c2r(at,0,L)},U=_.type==="date"?function(at){return at||at===0?x.cleanDate(at,null,L):null}:function(at){return v(at)?Number(at):null};function B(at,nt,rt){nt[at+"Found"]?(nt[at]=U(nt[at]),nt[at]===null&&(nt[at]=rt[at])):(F[at]=nt[at]=rt[at],x.nestedProperty(f[0],M+"."+at).set(rt[at]))}if(l["_"+w+"autoBinFinished"])delete l["_"+w+"autoBinFinished"];else{f=d.traces;var X=[],$=!0,se=!1,le=!1;for(y=0;y"u"){if(A)return[V,z,!0];V=c(T,l,_,w,M)}N=R.cumulative||{},N.enabled&&N.currentbin!=="include"&&(N.direction==="decreasing"?V.start=P(E.tickIncrement(O(V.start),V.size,!0,L)):V.end=P(E.tickIncrement(O(V.end),V.size,!1,L))),d.size=V.size,d.sizeFound||(F.size=V.size,x.nestedProperty(f[0],M+".size").set(V.size)),B("start",d,V),B("end",d,V)}z=l["_"+w+"pos0"],delete l["_"+w+"pos0"];var ee=l._input[M]||{},q=x.extendFlat({},d),oe=d.start,ae=_.r2l(ee.start),j=ae!==void 0;if((d.startFound||j)&&ae!==_.r2l(oe)){var Q=j?ae:x.aggNums(Math.min,null,z),re={type:_.type==="category"||_.type==="multicategory"?"linear":_.type,r2l:_.r2l,dtick:d.size,tick0:oe,calendar:L,range:[Q,E.tickIncrement(Q,d.size,!1,L)].map(_.l2r)},ce=E.tickFirst(re);ce>_.r2l(Q)&&(ce=E.tickIncrement(ce,d.size,!0,L)),q.start=_.l2r(ce),j||x.nestedProperty(l,M+".start").set(q.start)}var be=d.end,Ae=_.r2l(ee.end),De=Ae!==void 0;if((d.endFound||De)&&Ae!==_.r2l(be)){var ze=De?Ae:x.aggNums(Math.max,null,z);q.end=_.l2r(ze),De||x.nestedProperty(l,M+".start").set(q.end)}var Ze="autobin"+w;return l._input[Ze]===!1&&(l._input[M]=x.extendFlat({},l[M]||{}),delete l._input[Ze],delete l[Ze]),[q,z]}function c(T,l,_,w,A){var M=T._fullLayout,g=m(T,l),b=!1,d=1/0,u=[l],y,f,R;for(y=0;y=0;w--)b(w);else if(l==="increasing"){for(w=1;w=0;w--)T[w]+=T[w+1];_==="exclude"&&(T.push(0),T.shift())}}G.exports={calc:s,calcAllAutoBins:h}}}),rF=Xe({"src/traces/histogram2d/calc.js"(Z,G){"use strict";var v=sa(),x=Go(),S=rS(),E=aS(),e=iS(),t=nS(),r=oS().calcAllAutoBins;G.exports=function(s,h){var c=x.getFromId(s,h.xaxis),m=x.getFromId(s,h.yaxis),p=h.xcalendar,T=h.ycalendar,l=function(Ne){return c.r2c(Ne,0,p)},_=function(Ne){return m.r2c(Ne,0,T)},w=function(Ne){return c.c2r(Ne,0,p)},A=function(Ne){return m.c2r(Ne,0,T)},M,g,b,d,u=r(s,h,c,"x"),y=u[0],f=u[1],R=r(s,h,m,"y"),L=R[0],z=R[1],F=h._length;f.length>F&&f.splice(F,f.length-F),z.length>F&&z.splice(F,z.length-F);var N=[],O=[],P=[],U=typeof y.size=="string",B=typeof L.size=="string",X=[],$=[],se=U?X:y,le=B?$:L,fe=0,V=[],Y=[],ee=h.histnorm,q=h.histfunc,oe=ee.indexOf("density")!==-1,ae=q==="max"||q==="min",j=ae?null:0,Q=S.count,re=E[ee],ce=!1,be=[],Ae=[],De="z"in h?h.z:"marker"in h&&Array.isArray(h.marker.color)?h.marker.color:"";De&&q!=="count"&&(ce=q==="avg",Q=S[q]);var ze=y.size,Ze=l(y.start),at=l(y.end)+(Ze-x.tickIncrement(Ze,ze,!1,p))/1e6;for(M=Ze;M=0&&b=0&&dx;n++)a=e(r,o,E(a));return a>x&&v.log("interp2d didn't converge quickly",a),r};function e(t,r,o){var a=0,n,i,s,h,c,m,p,T,l,_,w,A,M;for(h=0;hA&&(a=Math.max(a,Math.abs(t[i][s]-w)/(M-A))))}return a}}}),J2=Xe({"src/traces/heatmap/find_empties.js"(Z,G){"use strict";var v=sa().maxRowLength;G.exports=function(S){var E=[],e={},t=[],r=S[0],o=[],a=[0,0,0],n=v(S),i,s,h,c,m,p,T,l;for(s=0;s=0;m--)c=t[m],s=c[0],h=c[1],p=((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,p&&(T[c]=[s,h,p],t.splice(m,1),l=!0);if(!l)throw"findEmpties iterated with no new neighbors";for(c in T)e[c]=T[c],E.push(T[c])}return E.sort(function(_,w){return w[2]-_[2]})}}}),sS=Xe({"src/traces/heatmap/make_bound_array.js"(Z,G){"use strict";var v=so(),x=sa().isArrayOrTypedArray;G.exports=function(E,e,t,r,o,a){var n=[],i=v.traceIs(E,"contour"),s=v.traceIs(E,"histogram"),h,c,m,p=x(e)&&e.length>1;if(p&&!s&&a.type!=="category"){var T=e.length;if(T<=o){if(i)n=Array.from(e).slice(0,o);else if(o===1)a.type==="log"?n=[.5*e[0],2*e[0]]:n=[e[0]-.5,e[0]+.5];else if(a.type==="log"){for(n=[Math.pow(e[0],1.5)/Math.pow(e[1],.5)],m=1;m1){var ee=(Y[Y.length-1]-Y[0])/(Y.length-1),q=Math.abs(ee/100);for(F=0;Fq)return!1}return!0}T._islinear=!1,l.type==="log"||_.type==="log"?M==="fast"&&P("log axis found"):U(g)?U(y)?T._islinear=!0:M==="fast"&&P("y scale is not linear"):M==="fast"&&P("x scale is not linear");var B=x.maxRowLength(z),X=T.xtype==="scaled"?"":g,$=i(T,X,b,d,B,l),se=T.ytype==="scaled"?"":y,le=i(T,se,f,R,z.length,_);T._extremes[l._id]=S.findExtremes(l,$),T._extremes[_._id]=S.findExtremes(_,le);var fe={x:$,y:le,z,text:T._text||T.text,hovertext:T._hovertext||T.hovertext};if(T.xperiodalignment&&u&&(fe.orig_x=u),T.yperiodalignment&&L&&(fe.orig_y=L),X&&X.length===$.length-1&&(fe.xCenter=X),se&&se.length===le.length-1&&(fe.yCenter=se),A&&(fe.xRanges=N.xRanges,fe.yRanges=N.yRanges,fe.pts=N.pts),w||t(p,T,{vals:z,cLetter:"z"}),w&&T.contours&&T.contours.coloring==="heatmap"){var V={type:T.type==="contour"?"heatmap":"histogram2d",xcalendar:T.xcalendar,ycalendar:T.ycalendar};fe.xfill=i(V,X,b,d,B,l),fe.yfill=i(V,se,f,R,z.length,_)}return[fe]};function h(m){for(var p=[],T=m.length,l=0;l0;)oe=y.c2p(U[re]),re--;for(oe0;)Q=f.c2p(B[re]),re--;Q=y._length||oe<=0||j>=f._length||Q<=0;if(at){var nt=L.selectAll("image").data([]);nt.exit().remove(),_(L);return}var rt,st;Ae==="fast"?(rt=V,st=fe):(rt=ze,st=Ze);var Me=document.createElement("canvas");Me.width=rt,Me.height=st;var ye=Me.getContext("2d",{willReadFrequently:!0}),he=i(F,{noNumericCheck:!0,returnArray:!0}),Oe,tt;Ae==="fast"?(Oe=Y?function(Ta){return V-1-Ta}:t.identity,tt=ee?function(Ta){return fe-1-Ta}:t.identity):(Oe=function(Ta){return t.constrain(Math.round(y.c2p(U[Ta])-q),0,ze)},tt=function(Ta){return t.constrain(Math.round(f.c2p(B[Ta])-j),0,Ze)});var ot=tt(0),Qe=[ot,ot],Pt=Y?0:1,It=ee?0:1,qt=0,Wt=0,kr=0,mr=0,qr,Sr,Rr,wt,Ne;function Ke(Ta,Ai){if(Ta!==void 0){var ki=he(Ta);return ki[0]=Math.round(ki[0]),ki[1]=Math.round(ki[1]),ki[2]=Math.round(ki[2]),qt+=Ai,Wt+=ki[0]*Ai,kr+=ki[1]*Ai,mr+=ki[2]*Ai,ki}return[0,0,0,0]}function Te(Ta,Ai,ki,Ki){var _n=Ta[ki.bin0];if(_n===void 0)return Ke(void 0,1);var Rn=Ta[ki.bin1],En=Ai[ki.bin0],On=Ai[ki.bin1],no=Rn-_n||0,cn=En-_n||0,lo;return Rn===void 0?On===void 0?lo=0:En===void 0?lo=2*(On-_n):lo=(2*On-En-_n)*2/3:On===void 0?En===void 0?lo=0:lo=(2*_n-Rn-En)*2/3:En===void 0?lo=(2*On-Rn-_n)*2/3:lo=On+_n-Rn-En,Ke(_n+ki.frac*no+Ki.frac*(cn+ki.frac*lo))}if(Ae!=="default"){var Ie=0,Ve;try{Ve=new Uint8Array(rt*st*4)}catch{Ve=new Array(rt*st*4)}if(Ae==="smooth"){var Ce=X||U,Ee=$||B,Pe=new Array(Ce.length),ft=new Array(Ee.length),ct=new Array(ze),_t=X?A:w,Ct=$?A:w,ir,rr,er;for(re=0;re$a||$a>f._length))for(ce=ta;ceri||ri>y._length)){var pi=o({x:Za,y:Ba},F,g._fullLayout);pi.x=Za,pi.y=Ba;var Ra=z.z[re][ce];Ra===void 0?(pi.z="",pi.zLabel=""):(pi.z=Ra,pi.zLabel=e.tickText(Kt,Ra,"hover").text);var tn=z.text&&z.text[re]&&z.text[re][ce];(tn===void 0||tn===!1)&&(tn=""),pi.text=tn;var on=t.texttemplateString({data:[pi,F._meta],fallback:F.texttemplatefallback,labels:pi,locale:g._fullLayout._d3locale,template:hi});if(on){var hn=on.split("
"),Tt=hn.length,ut=0;for(be=0;be=_[0].length||R<0||R>_.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 L;for(b=[2*T[0]-T[1]],L=1;L=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}}}),V_=Xe({"src/traces/contour/attributes.js"(Z,G){"use strict";var v=p1(),x=af(),S=tf(),E=S.axisHoverFormat,e=S.descriptionOnlyNumbers,t=ku(),r=Gh().dash,o=tc(),a=Qo().extendFlat,n=o3(),i=n.COMPARISON_OPS2,s=n.INTERVAL_OPS,h=x.line;G.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:x.xperiod0,yperiod0:x.yperiod0,xperiodalignment:v.xperiodalignment,yperiodalignment:v.yperiodalignment,text:v.text,hovertext:v.hovertext,transpose:v.transpose,xtype:v.xtype,ytype:v.ytype,xhoverformat:E("x"),yhoverformat:E("y"),zhoverformat:E("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(i).concat(s),dflt:"=",editType:"calc"},value:{valType:"any",dflt:0,editType:"calc"},editType:"calc",impliedEdits:{autocontour:!1}},line:{color:a({},h.color,{editType:"style+colorbars"}),width:{valType:"number",min:0,editType:"style+colorbars"},dash:r,smoothing:a({},h.smoothing,{}),editType:"plot"},zorder:x.zorder},t("",{cLetter:"z",autoColorDflt:!1,editTypeOverride:"calc"}))}}),hS=Xe({"src/traces/histogram2dcontour/attributes.js"(Z,G){"use strict";var v=n3(),x=V_(),S=ku(),E=tf().axisHoverFormat,e=Qo().extendFlat;G.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:x.autocontour,ncontours:x.ncontours,contours:x.contours,line:{color:x.line.color,width:e({},x.line.width,{dflt:.5}),dash:x.line.dash,smoothing:x.line.smoothing,editType:"plot"},xhoverformat:E("x"),yhoverformat:E("y"),zhoverformat:E("z",1),hovertemplate:v.hovertemplate,hovertemplatefallback:v.hovertemplatefallback,texttemplate:x.texttemplate,texttemplatefallback:x.texttemplatefallback,textfont:x.textfont},S("",{cLetter:"z",editTypeOverride:"calc"}))}}),s3=Xe({"src/traces/contour/contours_defaults.js"(Z,G){"use strict";G.exports=function(x,S,E,e){var t=e("contours.start"),r=e("contours.end"),o=t===!1||r===!1,a=E("contours.size"),n;o?n=S.autocontour=!0:n=E("autocontour",!1),(n||!a)&&E("ncontours")}}}),pS=Xe({"src/traces/contour/label_defaults.js"(Z,G){"use strict";var v=sa();G.exports=function(S,E,e,t){t||(t={});var r=S("contours.showlabels");if(r){var o=E.font;v.coerceFont(S,"contours.labelfont",o,{overrideDflt:{color:e}}),S("contours.labelformat")}t.hasHover!==!1&&S("zhoverformat")}}}),l3=Xe({"src/traces/contour/style_defaults.js"(Z,G){"use strict";var v=_h(),x=pS();G.exports=function(E,e,t,r,o){var a=t("contours.coloring"),n,i="";a==="fill"&&(n=t("contours.showlines")),n!==!1&&(a!=="lines"&&(i=t("line.color","#000")),t("line.width",.5),t("line.dash")),a!=="none"&&(E.showlegend!==!0&&(e.showlegend=!1),e._dfltShowLegend=!1,v(E,e,r,t,{prefix:"",cLetter:"z"})),t("line.smoothing"),x(t,r,i,o)}}}),dF=Xe({"src/traces/histogram2dcontour/defaults.js"(Z,G){"use strict";var v=sa(),x=fS(),S=s3(),E=l3(),e=q_(),t=hS();G.exports=function(o,a,n,i){function s(c,m){return v.coerce(o,a,t,c,m)}function h(c){return v.coerce2(o,a,t,c)}x(o,a,s,i),a.visible!==!1&&(S(o,a,s,h),E(o,a,s,i),s("xhoverformat"),s("yhoverformat"),s("hovertemplate"),s("hovertemplatefallback"),a.contours&&a.contours.coloring==="heatmap"&&e(s,i))}}}),dS=Xe({"src/traces/contour/set_contours.js"(Z,G){"use strict";var v=Go(),x=sa();G.exports=function(e,t){var r=e.contours;if(e.autocontour){var o=e.zmin,a=e.zmax;(e.zauto||o===void 0)&&(o=x.aggNums(Math.min,null,t)),(e.zauto||a===void 0)&&(a=x.aggNums(Math.max,null,t));var n=S(o,a,e.ncontours);r.size=n.dtick,r.start=v.tickFirst(n),n.range.reverse(),r.end=v.tickFirst(n),r.start===o&&(r.start+=r.size),r.end===a&&(r.end-=r.size),r.start>r.end&&(r.start=r.end=(r.start+r.end)/2),e._input.contours||(e._input.contours={}),x.extendFlat(e._input.contours,{start:r.start,end:r.end,size:r.size}),e._input.autocontour=!0}else if(r.type!=="constraint"){var i=r.start,s=r.end,h=e._input.contours;if(i>s&&(r.start=h.start=s,s=r.end=h.end=i,i=r.start),!(r.size>0)){var c;i===s?c=1:c=S(i,s,e.ncontours).dtick,h.size=r.size=c}}};function S(E,e,t){var r={type:"linear",range:[E,e]};return v.autoTicks(r,(e-E)/(t||15)),r}}}),G_=Xe({"src/traces/contour/end_plus.js"(Z,G){"use strict";G.exports=function(x){return x.end+x.size/1e6}}}),vS=Xe({"src/traces/contour/calc.js"(Z,G){"use strict";var v=rc(),x=$2(),S=dS(),E=G_();G.exports=function(t,r){var o=x(t,r),a=o[0].z;S(r,a);var n=r.contours,i=v.extractOpts(r),s;if(n.coloring==="heatmap"&&i.auto&&r.autocontour===!1){var h=n.start,c=E(n),m=n.size||1,p=Math.floor((c-h)/m)+1;isFinite(m)||(m=1,p=1);var T=h-m/2,l=T+p*m;s=[T,l]}else s=a;return v.calc(t,r,{vals:s,cLetter:"z"}),o}}}),H_=Xe({"src/traces/contour/constants.js"(Z,G){"use strict";G.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=Xe({"src/traces/contour/make_crossings.js"(Z,G){"use strict";var v=H_();G.exports=function(E){var e=E[0].z,t=e.length,r=e[0].length,o=t===2||r===2,a,n,i,s,h,c,m,p,T;for(n=0;nS?0:1)+(E[0][1]>S?0:2)+(E[1][1]>S?0:4)+(E[1][0]>S?0:8);if(e===5||e===10){var t=(E[0][0]+E[0][1]+E[1][0]+E[1][1])/4;return S>t?e===5?713:1114:e===5?104:208}return e===15?0:e}}}),gS=Xe({"src/traces/contour/find_all_paths.js"(Z,G){"use strict";var v=sa(),x=H_();G.exports=function(a,n,i){var s,h,c,m,p;for(n=n||.01,i=i||.01,c=0;c20?(c=x.CHOOSESADDLE[c][(m[0]||m[1])<0?0:1],o.crossings[h]=x.SADDLEREMAINDER[c]):delete o.crossings[h],m=x.NEWDELTA[c],!m){v.log("Found bad marching index:",c,a,o.level);break}p.push(r(o,a,m)),a[0]+=m[0],a[1]+=m[1],h=a.join(","),S(p[p.length-1],p[p.length-2],i,s)&&p.pop();var M=m[0]&&(a[0]<0||a[0]>l-2)||m[1]&&(a[1]<0||a[1]>T-2),g=a[0]===_[0]&&a[1]===_[1]&&m[0]===w[0]&&m[1]===w[1];if(g||n&&M)break;c=o.crossings[h]}A===1e4&&v.log("Infinite loop in contour?");var b=S(p[0],p[p.length-1],i,s),d=0,u=.2*o.smoothing,y=[],f=0,R,L,z,F,N,O,P,U,B,X,$;for(A=1;A=f;A--)if(R=y[A],R=f&&R+y[L]U&&B--,o.edgepaths[B]=$.concat(p,X));break}V||(o.edgepaths[U]=p.concat(X))}for(U=0;U20&&a?o===208||o===1114?i=n[0]===0?1:-1:s=n[1]===0?1:-1:x.BOTTOMSTART.indexOf(o)!==-1?s=1:x.LEFTSTART.indexOf(o)!==-1?i=1:x.TOPSTART.indexOf(o)!==-1?s=-1:i=-1,[i,s]}function r(o,a,n){var i=a[0]+Math.max(n[0],0),s=a[1]+Math.max(n[1],0),h=o.z[s][i],c=o.xaxis,m=o.yaxis;if(n[1]){var p=(o.level-h)/(o.z[s][i+1]-h),T=(p!==1?(1-p)*c.c2l(o.x[i]):0)+(p!==0?p*c.c2l(o.x[i+1]):0);return[c.c2p(c.l2c(T),!0),m.c2p(o.y[s],!0),i+p,s]}else{var l=(o.level-h)/(o.z[s+1][i]-h),_=(l!==1?(1-l)*m.c2l(o.y[s]):0)+(l!==0?l*m.c2l(o.y[s+1]):0);return[c.c2p(o.x[i],!0),m.c2p(m.l2c(_),!0),i,s+l]}}}}),vF=Xe({"src/traces/contour/constraint_mapping.js"(Z,G){"use strict";var v=o3(),x=rs();G.exports={"[]":E("[]"),"][":E("]["),">":e(">"),"<":e("<"),"=":e("=")};function S(t,r){var o=Array.isArray(r),a;function n(i){return x(i)?+i:null}return v.COMPARISON_OPS2.indexOf(t)!==-1?a=n(o?r[0]:r):v.INTERVAL_OPS.indexOf(t)!==-1?a=o?[n(r[0]),n(r[1])]:[n(r),n(r)]:v.SET_OPS.indexOf(t)!==-1&&(a=o?r.map(n):[n(r)]),a}function E(t){return function(r){r=S(t,r);var o=Math.min(r[0],r[1]),a=Math.max(r[0],r[1]);return{start:o,end:a,size:a-o}}}function e(t){return function(r){return r=S(t,r),{start:r,end:1/0,size:1/0}}}}}),yS=Xe({"src/traces/contour/empty_pathinfo.js"(Z,G){"use strict";var v=sa(),x=vF(),S=G_();G.exports=function(e,t,r){for(var o=e.type==="constraint"?x[e._operation](e.value):e,a=o.size,n=[],i=S(o),s=r.trace._carpetTrace,h=s?{xaxis:s.aaxis,yaxis:s.baxis,x:r.a,y:r.b}:{xaxis:t.xaxis,yaxis:t.yaxis,x:r.x,y:r.y},c=o.start;c1e3){v.warn("Too many contours, clipping at 1000",e);break}return n}}}),_S=Xe({"src/traces/contour/convert_to_constraints.js"(Z,G){"use strict";var v=sa();G.exports=function(S,E){var e,t,r,o=function(i){return i.reverse()},a=function(i){return i};switch(E){case"=":case"<":return S;case">":for(S.length!==1&&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,n=-1/0,i=1/0;for(e=0;e":s>n&&(S.prefixBoundary=!0);break;case"<":(sn||S.starts.length&&c===i)&&(S.prefixBoundary=!0);break;case"][":h=Math.min(s[0],s[1]),c=Math.max(s[0],s[1]),hn&&(S.prefixBoundary=!0);break}break}}}}),u3=Xe({"src/traces/contour/plot.js"(Z){"use strict";var G=Hn(),v=sa(),x=es(),S=rc(),E=ou(),e=Go(),t=wv(),r=e3(),o=mS(),a=gS(),n=yS(),i=_S(),s=xS(),h=H_(),c=h.LABELOPTIMIZER;Z.plot=function(g,b,d,u){var y=b.xaxis,f=b.yaxis;v.makeTraceGroups(u,d,"contour").each(function(R){var L=G.select(this),z=R[0],F=z.trace,N=z.x,O=z.y,P=F.contours,U=n(P,b,z),B=v.ensureSingle(L,"g","heatmapcoloring"),X=[];P.coloring==="heatmap"&&(X=[R]),r(g,b,X,B),o(U),a(U);var $=y.c2p(N[0],!0),se=y.c2p(N[N.length-1],!0),le=f.c2p(O[0],!0),fe=f.c2p(O[O.length-1],!0),V=[[$,fe],[se,fe],[se,le],[$,le]],Y=U;P.type==="constraint"&&(Y=i(U,P._operation)),m(L,V,P),p(L,Y,V,P),l(L,U,g,z,P),w(L,b,g,z,V)})};function m(M,g,b){var d=v.ensureSingle(M,"g","contourbg"),u=d.selectAll("path").data(b.coloring==="fill"?[0]:[]);u.enter().append("path"),u.exit().remove(),u.attr("d","M"+g.join("L")+"Z").style("stroke","none")}function p(M,g,b,d){var u=d.coloring==="fill"||d.type==="constraint"&&d._operation!=="=",y="M"+b.join("L")+"Z";u&&s(g,d);var f=v.ensureSingle(M,"g","contourfill"),R=f.selectAll("path").data(u?g:[]);R.enter().append("path"),R.exit().remove(),R.each(function(L){var z=(L.prefixBoundary?y:"")+T(L,b);z?G.select(this).attr("d",z).style("stroke","none"):G.select(this).remove()})}function T(M,g){var b="",d=0,u=M.edgepaths.map(function($,se){return se}),y=!0,f,R,L,z,F,N;function O($){return Math.abs($[1]-g[0][1])<.01}function P($){return Math.abs($[1]-g[2][1])<.01}function U($){return Math.abs($[0]-g[0][0])<.01}function B($){return Math.abs($[0]-g[2][0])<.01}for(;u.length;){for(N=x.smoothopen(M.edgepaths[d],M.smoothing),b+=y?N:N.replace(/^M/,"L"),u.splice(u.indexOf(d),1),f=M.edgepaths[d][M.edgepaths[d].length-1],z=-1,L=0;L<4;L++){if(!f){v.log("Missing end?",d,M);break}for(O(f)&&!B(f)?R=g[1]:U(f)?R=g[0]:P(f)?R=g[3]:B(f)&&(R=g[2]),F=0;F=0&&(R=X,z=F):Math.abs(f[1]-R[1])<.01?Math.abs(f[1]-X[1])<.01&&(X[0]-f[0])*(R[0]-X[0])>=0&&(R=X,z=F):v.log("endpt to newendpt is not vert. or horz.",f,R,X)}if(f=R,z>=0)break;b+="L"+R}if(z===M.edgepaths.length){v.log("unclosed perimeter path");break}d=z,y=u.indexOf(d)===-1,y&&(d=u[0],b+="Z")}for(d=0;dc.MAXCOST*2)break;O&&(R/=2),f=z-R/2,L=f+R*1.5}if(N<=c.MAXCOST)return F};function _(M,g,b,d){var u=g.width/2,y=g.height/2,f=M.x,R=M.y,L=M.theta,z=Math.cos(L)*u,F=Math.sin(L)*u,N=(f>d.center?d.right-f:f-d.left)/(z+Math.abs(Math.sin(L)*y)),O=(R>d.middle?d.bottom-R:R-d.top)/(Math.abs(F)+Math.cos(L)*y);if(N<1||O<1)return 1/0;var P=c.EDGECOST*(1/(N-1)+1/(O-1));P+=c.ANGLECOST*L*L;for(var U=f-z,B=R-F,X=f+z,$=R+F,se=0;se=w)&&(r<=_&&(r=_),o>=w&&(o=w),n=Math.floor((o-r)/a)+1,i=0),l=0;l_&&(m.unshift(_),p.unshift(p[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])):(i("contours.value",0),v(s.value)||(r(s.value)?s.value=parseFloat(s.value[0]):s.value=0))}}}),yF=Xe({"src/traces/contour/defaults.js"(Z,G){"use strict";var v=sa(),x=X2(),S=Qd(),E=TS(),e=s3(),t=l3(),r=q_(),o=V_();G.exports=function(n,i,s,h){function c(l,_){return v.coerce(n,i,o,l,_)}function m(l){return v.coerce2(n,i,o,l)}var p=x(n,i,c,h);if(!p){i.visible=!1;return}S(n,i,h,c),c("xhoverformat"),c("yhoverformat"),c("text"),c("hovertext"),c("hoverongaps"),c("hovertemplate"),c("hovertemplatefallback");var T=c("contours.type")==="constraint";c("connectgaps",v.isArray1D(i.z)),T?E(n,i,c,h,s):(e(n,i,c,m),t(n,i,c,h)),i.contours&&i.contours.coloring==="heatmap"&&r(c,h),c("zorder")}}}),_F=Xe({"src/traces/contour/index.js"(Z,G){"use strict";G.exports={attributes:V_(),supplyDefaults:yF(),calc:vS(),plot:u3().plot,style:c3(),colorbar:f3(),hoverPoints:wS(),moduleType:"trace",name:"contour",basePlotModule:Kf(),categories:["cartesian","svg","2dMap","contour","showLegend"],meta:{}}}}),xF=Xe({"lib/contour.js"(Z,G){"use strict";G.exports=_F()}}),AS=Xe({"src/traces/scatterternary/attributes.js"(Z,G){"use strict";var{hovertemplateAttrs:v,texttemplateAttrs:x,templatefallbackAttrs:S}=Jl(),E=$d(),e=af(),t=ru(),r=ku(),o=Gh().dash,a=Qo().extendFlat,n=e.marker,i=e.line,s=n.line;G.exports={a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},c:{valType:"data_array",editType:"calc"},sum:{valType:"number",dflt:0,min:0,editType:"calc"},mode:a({},e.mode,{dflt:"markers"}),text:a({},e.text,{}),texttemplate:x({editType:"plot"},{keys:["a","b","c","text"]}),texttemplatefallback:S({editType:"plot"}),hovertext:a({},e.hovertext,{}),line:{color:i.color,width:i.width,dash:o,backoff:i.backoff,shape:a({},i.shape,{values:["linear","spline"]}),smoothing:i.smoothing,editType:"calc"},connectgaps:e.connectgaps,cliponaxis:e.cliponaxis,fill:a({},e.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:E(),marker:a({symbol:n.symbol,opacity:n.opacity,angle:n.angle,angleref:n.angleref,standoff:n.standoff,maxdisplayed:n.maxdisplayed,size:n.size,sizeref:n.sizeref,sizemin:n.sizemin,sizemode:n.sizemode,line:a({width:s.width,dash:s.dash,editType:"calc"},r("marker.line")),gradient:n.gradient,editType:"calc"},r("marker")),textfont:e.textfont,textposition:e.textposition,selected:e.selected,unselected:e.unselected,hoverinfo:a({},t.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:e.hoveron,hovertemplate:v(),hovertemplatefallback:S()}}}),bF=Xe({"src/traces/scatterternary/defaults.js"(Z,G){"use strict";var v=sa(),x=Tv(),S=Fu(),E=md(),e=Dd(),t=o1(),r=zd(),o=ev(),a=AS();G.exports=function(i,s,h,c){function m(M,g){return v.coerce(i,s,a,M,g)}var p=m("a"),T=m("b"),l=m("c"),_;if(p?(_=p.length,T?(_=Math.min(_,T.length),l&&(_=Math.min(_,l.length))):l?_=Math.min(_,l.length):_=0):T&&l&&(_=Math.min(T.length,l.length)),!_){s.visible=!1;return}s._length=_,m("sum"),m("text"),m("hovertext"),s.hoveron!=="fills"&&(m("hovertemplate"),m("hovertemplatefallback"));var w=_"),o.hovertemplate=c.hovertemplate,r}}}),MF=Xe({"src/traces/scatterternary/event_data.js"(Z,G){"use strict";G.exports=function(x,S,E,e,t){if(S.xa&&(x.xaxis=S.xa),S.ya&&(x.yaxis=S.ya),e[t]){var r=e[t];x.a=r.a,x.b=r.b,x.c=r.c}else x.a=S.a,x.b=S.b,x.c=S.c;return x}}}),EF=Xe({"src/plots/ternary/ternary.js"(Z,G){"use strict";var v=Hn(),x=Ch(),S=so(),E=sa(),e=E.strTranslate,t=E._,r=$n(),o=es(),a=wv(),n=Qo().extendFlat,i=bc(),s=Go(),h=Ap(),c=rf(),m=Jd(),p=m.freeMode,T=m.rectMode,l=K0(),_=Af().prepSelect,w=Af().selectOnClick,A=Af().clearOutline,M=Af().clearSelectionsCache,g=lh();function b(P,U){this.id=P.id,this.graphDiv=P.graphDiv,this.init(U),this.makeFramework(U),this.updateFx(U),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}G.exports=b;var d=b.prototype;d.init=function(P){this.container=P._ternarylayer,this.defs=P._defs,this.layoutId=P._uid,this.traceHash={},this.layers={}},d.plot=function(P,U){var B=this,X=U[B.id],$=U._size;B._hasClipOnAxisFalse=!1;for(var se=0;seu*Y?(ce=Y,re=ce*u):(re=V,ce=re/u),be=le*re/V,Ae=fe*ce/Y,j=U.l+U.w*$-re/2,Q=U.t+U.h*(1-se)-ce/2,B.x0=j,B.y0=Q,B.w=re,B.h=ce,B.sum=ee,B.xaxis={type:"linear",range:[q+2*ae-ee,ee-q-2*oe],domain:[$-be/2,$+be/2],_id:"x"},a(B.xaxis,B.graphDiv._fullLayout),B.xaxis.setScale(),B.xaxis.isPtWithinRange=function(Oe){return Oe.a>=B.aaxis.range[0]&&Oe.a<=B.aaxis.range[1]&&Oe.b>=B.baxis.range[1]&&Oe.b<=B.baxis.range[0]&&Oe.c>=B.caxis.range[1]&&Oe.c<=B.caxis.range[0]},B.yaxis={type:"linear",range:[q,ee-oe-ae],domain:[se-Ae/2,se+Ae/2],_id:"y"},a(B.yaxis,B.graphDiv._fullLayout),B.yaxis.setScale(),B.yaxis.isPtWithinRange=function(){return!0};var De=B.yaxis.domain[0],ze=B.aaxis=n({},P.aaxis,{range:[q,ee-oe-ae],side:"left",tickangle:(+P.aaxis.tickangle||0)-30,domain:[De,De+Ae*u],anchor:"free",position:0,_id:"y",_length:re});a(ze,B.graphDiv._fullLayout),ze.setScale();var Ze=B.baxis=n({},P.baxis,{range:[ee-q-ae,oe],side:"bottom",domain:B.xaxis.domain,anchor:"free",position:0,_id:"x",_length:re});a(Ze,B.graphDiv._fullLayout),Ze.setScale();var at=B.caxis=n({},P.caxis,{range:[ee-q-oe,ae],side:"right",tickangle:(+P.caxis.tickangle||0)+30,domain:[De,De+Ae*u],anchor:"free",position:0,_id:"y",_length:re});a(at,B.graphDiv._fullLayout),at.setScale();var nt="M"+j+","+(Q+ce)+"h"+re+"l-"+re/2+",-"+ce+"Z";B.clipDef.select("path").attr("d",nt),B.layers.plotbg.select("path").attr("d",nt);var rt="M0,"+ce+"h"+re+"l-"+re/2+",-"+ce+"Z";B.clipDefRelative.select("path").attr("d",rt);var st=e(j,Q);B.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",st),B.clipDefRelative.select("path").attr("transform",null);var Me=e(j-Ze._offset,Q+ce);B.layers.baxis.attr("transform",Me),B.layers.bgrid.attr("transform",Me);var ye=e(j+re/2,Q)+"rotate(30)"+e(0,-ze._offset);B.layers.aaxis.attr("transform",ye),B.layers.agrid.attr("transform",ye);var he=e(j+re/2,Q)+"rotate(-30)"+e(0,-at._offset);B.layers.caxis.attr("transform",he),B.layers.cgrid.attr("transform",he),B.drawAxes(!0),B.layers.aline.select("path").attr("d",ze.showline?"M"+j+","+(Q+ce)+"l"+re/2+",-"+ce:"M0,0").call(r.stroke,ze.linecolor||"#000").style("stroke-width",(ze.linewidth||0)+"px"),B.layers.bline.select("path").attr("d",Ze.showline?"M"+j+","+(Q+ce)+"h"+re:"M0,0").call(r.stroke,Ze.linecolor||"#000").style("stroke-width",(Ze.linewidth||0)+"px"),B.layers.cline.select("path").attr("d",at.showline?"M"+(j+re/2)+","+Q+"l"+re/2+","+ce:"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(P){var U=this,B=U.graphDiv,X=U.id.slice(7)+"title",$=U.layers,se=U.aaxis,le=U.baxis,fe=U.caxis;if(U.drawAx(se),U.drawAx(le),U.drawAx(fe),P){var V=Math.max(se.showticklabels?se.tickfont.size/2:0,(fe.showticklabels?fe.tickfont.size*.75:0)+(fe.ticks==="outside"?fe.ticklen*.87:0)),Y=(le.showticklabels?le.tickfont.size:0)+(le.ticks==="outside"?le.ticklen:0)+3;$["a-title"]=l.draw(B,"a"+X,{propContainer:se,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-se.title.font.size/3-V,"text-anchor":"middle"}}),$["b-title"]=l.draw(B,"b"+X,{propContainer:le,propName:U.id+".baxis.title.text",placeholder:t(B,"Click to enter Component B title"),attributes:{x:U.x0-Y,y:U.y0+U.h+le.title.font.size*.83+Y,"text-anchor":"middle"}}),$["c-title"]=l.draw(B,"c"+X,{propContainer:fe,propName:U.id+".caxis.title.text",placeholder:t(B,"Click to enter Component C title"),attributes:{x:U.x0+U.w+Y,y:U.y0+U.h+fe.title.font.size*.83+Y,"text-anchor":"middle"}})}},d.drawAx=function(P){var U=this,B=U.graphDiv,X=P._name,$=X.charAt(0),se=P._id,le=U.layers[X],fe=30,V=$+"tickLayout",Y=y(P);U[V]!==Y&&(le.selectAll("."+se+"tick").remove(),U[V]=Y),P.setScale();var ee=s.calcTicks(P),q=s.clipEnds(P,ee),oe=s.makeTransTickFn(P),ae=s.getTickSigns(P)[2],j=E.deg2rad(fe),Q=ae*(P.linewidth||1)/2,re=ae*P.ticklen,ce=U.w,be=U.h,Ae=$==="b"?"M0,"+Q+"l"+Math.sin(j)*re+","+Math.cos(j)*re:"M"+Q+",0l"+Math.cos(j)*re+","+-Math.sin(j)*re,De={a:"M0,0l"+be+",-"+ce/2,b:"M0,0l-"+ce/2+",-"+be,c:"M0,0l-"+be+","+ce/2}[$];s.drawTicks(B,P,{vals:P.ticks==="inside"?q:ee,layer:le,path:Ae,transFn:oe,crisp:!1}),s.drawGrid(B,P,{vals:q,layer:U.layers[$+"grid"],path:De,transFn:oe,crisp:!1}),s.drawLabels(B,P,{vals:ee,layer:le,transFn:oe,labelFns:s.makeLabelFns(P,0,fe)})};function y(P){return P.ticks+String(P.ticklen)+String(P.showticklabels)}var f=g.MINZOOM/2+.87,R="m-0.87,.5h"+f+"v3h-"+(f+5.2)+"l"+(f/2+2.6)+",-"+(f*.87+4.5)+"l2.6,1.5l-"+f/2+","+f*.87+"Z",L="m0.87,.5h-"+f+"v3h"+(f+5.2)+"l-"+(f/2+2.6)+",-"+(f*.87+4.5)+"l-2.6,1.5l"+f/2+","+f*.87+"Z",z="m0,1l"+f/2+","+f*.87+"l2.6,-1.5l-"+(f/2+2.6)+",-"+(f*.87+4.5)+"l-"+(f/2+2.6)+","+(f*.87+4.5)+"l2.6,1.5l"+f/2+",-"+f*.87+"Z",F="m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2Z",N=!0;d.clearOutline=function(){M(this.dragOptions),A(this.dragOptions.gd)},d.initInteractions=function(){var P=this,U=P.layers.plotbg.select("path").node(),B=P.graphDiv,X=B._fullLayout._zoomlayer,$,se;this.dragOptions={element:U,gd:B,plotinfo:{id:P.id,domain:B._fullLayout[P.id].domain,xaxis:P.xaxis,yaxis:P.yaxis},subplot:P.id,prepFn:function(Me,ye,he){P.dragOptions.xaxes=[P.xaxis],P.dragOptions.yaxes=[P.yaxis],$=B._fullLayout._invScaleX,se=B._fullLayout._invScaleY;var Oe=P.dragOptions.dragmode=B._fullLayout.dragmode;p(Oe)?P.dragOptions.minDrag=1:P.dragOptions.minDrag=void 0,Oe==="zoom"?(P.dragOptions.moveFn=Ze,P.dragOptions.clickFn=ce,P.dragOptions.doneFn=at,be(Me,ye,he)):Oe==="pan"?(P.dragOptions.moveFn=rt,P.dragOptions.clickFn=ce,P.dragOptions.doneFn=st,nt(),P.clearOutline(B)):(T(Oe)||p(Oe))&&_(Me,ye,he,P.dragOptions,Oe)}};var le,fe,V,Y,ee,q,oe,ae,j,Q;function re(Me){var ye={};return ye[P.id+".aaxis.min"]=Me.a,ye[P.id+".baxis.min"]=Me.b,ye[P.id+".caxis.min"]=Me.c,ye}function ce(Me,ye){var he=B._fullLayout.clickmode;O(B),Me===2&&(B.emit("plotly_doubleclick",null),S.call("_guiRelayout",B,re({a:0,b:0,c:0}))),he.indexOf("select")>-1&&Me===1&&w(ye,B,[P.xaxis],[P.yaxis],P.id,P.dragOptions),he.indexOf("event")>-1&&c.click(B,ye,P.id)}function be(Me,ye,he){var Oe=U.getBoundingClientRect();le=ye-Oe.left,fe=he-Oe.top,B._fullLayout._calcInverseTransform(B);var tt=B._fullLayout._invTransform,ot=E.apply3DTransform(tt)(le,fe);le=ot[0],fe=ot[1],V={a:P.aaxis.range[0],b:P.baxis.range[1],c:P.caxis.range[1]},ee=V,Y=P.aaxis.range[1]-V.a,q=x(P.graphDiv._fullLayout[P.id].bgcolor).getLuminance(),oe="M0,"+P.h+"L"+P.w/2+", 0L"+P.w+","+P.h+"Z",ae=!1,j=X.append("path").attr("class","zoombox").attr("transform",e(P.x0,P.y0)).style({fill:q>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",oe),Q=X.append("path").attr("class","zoombox-corners").attr("transform",e(P.x0,P.y0)).style({fill:r.background,stroke:r.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),P.clearOutline(B)}function Ae(Me,ye){return 1-ye/P.h}function De(Me,ye){return 1-(Me+(P.h-ye)/Math.sqrt(3))/P.w}function ze(Me,ye){return(Me-(P.h-ye)/Math.sqrt(3))/P.w}function Ze(Me,ye){var he=le+Me*$,Oe=fe+ye*se,tt=Math.max(0,Math.min(1,Ae(le,fe),Ae(he,Oe))),ot=Math.max(0,Math.min(1,De(le,fe),De(he,Oe))),Qe=Math.max(0,Math.min(1,ze(le,fe),ze(he,Oe))),Pt=(tt/2+Qe)*P.w,It=(1-tt/2-ot)*P.w,qt=(Pt+It)/2,Wt=It-Pt,kr=(1-tt)*P.h,mr=kr-Wt/u;Wt.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),Q.transition().style("opacity",1).duration(200),ae=!0),B.emit("plotly_relayouting",re(ee))}function at(){O(B),ee!==V&&(S.call("_guiRelayout",B,re(ee)),N&&B.data&&B._context.showTips&&(E.notifier(t(B,"Double-click to zoom back out"),"long"),N=!1))}function nt(){V={a:P.aaxis.range[0],b:P.baxis.range[1],c:P.caxis.range[1]},ee=V}function rt(Me,ye){var he=Me/P.xaxis._m,Oe=ye/P.yaxis._m;ee={a:V.a-Oe,b:V.b+(he+Oe)/2,c:V.c-(he-Oe)/2};var tt=[ee.a,ee.b,ee.c].sort(E.sorterAsc),ot={a:tt.indexOf(ee.a),b:tt.indexOf(ee.b),c:tt.indexOf(ee.c)};tt[0]<0&&(tt[1]+tt[0]/2<0?(tt[2]+=tt[0]+tt[1],tt[0]=tt[1]=0):(tt[2]+=tt[0]/2,tt[1]+=tt[0]/2,tt[0]=0),ee={a:tt[ot.a],b:tt[ot.b],c:tt[ot.c]},ye=(V.a-ee.a)*P.yaxis._m,Me=(V.c-ee.c-V.b+ee.b)*P.xaxis._m);var Qe=e(P.x0+Me,P.y0+ye);P.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",Qe);var Pt=e(-Me,-ye);P.clipDefRelative.select("path").attr("transform",Pt),P.aaxis.range=[ee.a,P.sum-ee.b-ee.c],P.baxis.range=[P.sum-ee.a-ee.c,ee.b],P.caxis.range=[P.sum-ee.a-ee.b,ee.c],P.drawAxes(!1),P._hasClipOnAxisFalse&&P.plotContainer.select(".scatterlayer").selectAll(".trace").call(o.hideOutsideRangePoints,P),B.emit("plotly_relayouting",re(ee))}function st(){S.call("_guiRelayout",B,re(ee))}U.onmousemove=function(Me){c.hover(B,Me,P.id),B._fullLayout._lasthover=U,B._fullLayout._hoversubplot=P.id},U.onmouseout=function(Me){B._dragging||h.unhover(B,Me)},h.init(this.dragOptions)};function O(P){v.select(P).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}}}),SS=Xe({"src/plots/ternary/layout_attributes.js"(Z,G){"use strict";var v=sh(),x=wc().attributes,S=Wh(),E=pc().overrideAll,e=Qo().extendFlat,t={title:{text:S.title.text,font:S.title.font},color:S.color,tickmode:S.minor.tickmode,nticks:e({},S.nticks,{dflt:6,min:1}),tick0:S.tick0,dtick:S.dtick,tickvals:S.tickvals,ticktext:S.ticktext,ticks:S.ticks,ticklen:S.ticklen,tickwidth:S.tickwidth,tickcolor:S.tickcolor,ticklabelstep:S.ticklabelstep,showticklabels:S.showticklabels,labelalias:S.labelalias,showtickprefix:S.showtickprefix,tickprefix:S.tickprefix,showticksuffix:S.showticksuffix,ticksuffix:S.ticksuffix,showexponent:S.showexponent,exponentformat:S.exponentformat,minexponent:S.minexponent,separatethousands:S.separatethousands,tickfont:S.tickfont,tickangle:S.tickangle,tickformat:S.tickformat,tickformatstops:S.tickformatstops,hoverformat:S.hoverformat,showline:e({},S.showline,{dflt:!0}),linecolor:S.linecolor,linewidth:S.linewidth,showgrid:e({},S.showgrid,{dflt:!0}),gridcolor:S.gridcolor,gridwidth:S.gridwidth,griddash:S.griddash,layer:S.layer,min:{valType:"number",dflt:0,min:0}},r=G.exports=E({domain:x({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"}}}),o0=Xe({"src/plots/subplot_defaults.js"(Z,G){"use strict";var v=sa(),x=zl(),S=wc().defaults;G.exports=function(e,t,r,o){var a=o.type,n=o.attributes,i=o.handleDefaults,s=o.partition||"x",h=t._subplots[a],c=h.length,m=c&&h[0].replace(/\d+$/,""),p,T;function l(M,g){return v.coerce(p,T,n,M,g)}for(var _=0;_=_&&(b.min=0,d.min=0,u.min=0,c.aaxis&&delete c.aaxis.min,c.baxis&&delete c.baxis.min,c.caxis&&delete c.caxis.min)}function h(c,m,p,T){var l=n[m._name];function _(y,f){return S.coerce(c,m,l,y,f)}_("uirevision",T.uirevision),m.type="linear";var w=_("color"),A=w!==l.color.dflt?w:p.font.color,M=m._name,g=M.charAt(0).toUpperCase(),b="Component "+g,d=_("title.text",b);m._hovertitle=d===b?d:g,S.coerceFont(_,"title.font",p.font,{overrideDflt:{size:S.bigFont(p.font.size),color:A}}),_("min"),o(c,m,_,"linear"),t(c,m,_,"linear"),e(c,m,_,"linear",{noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0}),r(c,m,_,{outerTicks:!0});var u=_("showticklabels");u&&(S.coerceFont(_,"tickfont",p.font,{overrideDflt:{color:A}}),_("tickangle"),_("tickformat")),a(c,m,_,{dfltColor:w,bgColor:p.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:l}),_("hoverformat"),_("layer")}}}),CF=Xe({"src/plots/ternary/index.js"(Z){"use strict";var G=EF(),v=Hh().getSubplotCalcData,x=sa().counterRegex,S="ternary";Z.name=S;var E=Z.attr="subplot";Z.idRoot=S,Z.idRegex=Z.attrRegex=x(S);var e=Z.attributes={};e[E]={valType:"subplotid",dflt:"ternary",editType:"calc"},Z.layoutAttributes=SS(),Z.supplyLayoutDefaults=kF(),Z.plot=function(r){for(var o=r._fullLayout,a=r.calcdata,n=o._subplots[S],i=0;i0){var M=r.xa,g=r.ya,b,d,u,y,f;c.orientation==="h"?(f=o,b="y",u=g,d="x",y=M):(f=a,b="x",u=M,d="y",y=g);var R=h[r.index];if(f>=R.span[0]&&f<=R.span[1]){var L=x.extendFlat({},r),z=y.c2p(f,!0),F=e.getKdeValue(R,c,f),N=e.getPositionOnKdePath(R,c,z),O=u._offset,P=u._length;L[b+"0"]=N[0],L[b+"1"]=N[1],L[d+"0"]=L[d+"1"]=z,L[d+"Label"]=d+": "+S.hoverLabelText(y,f,c[d+"hoverformat"])+", "+h[0].t.labels.kde+" "+F.toFixed(3);for(var U=0,B=0;B path").each(function(p){if(!p.isBlank){var T=m.marker;v.select(this).call(S.fill,p.mc||T.color).call(S.stroke,p.mlc||T.line.color).call(x.dashLine,T.line.dash,p.mlw||T.line.width).style("opacity",m.selectedpoints&&!p.selected?E:1)}}),r(c,m,a),c.selectAll(".regions").each(function(){v.select(this).selectAll("path").style("stroke-width",0).call(S.fill,m.connector.fillcolor)}),c.selectAll(".lines").each(function(){var p=m.connector.line;x.lineGroupStyle(v.select(this).selectAll("path"),p.width,p.color,p.dash)})})}G.exports={style:o}}}),ZF=Xe({"src/traces/funnel/hover.js"(Z,G){"use strict";var v=$n().opacity,x=f1().hoverOnBars,S=sa().formatPercent;G.exports=function(t,r,o,a,n){var i=x(t,r,o,a,n);if(i){var s=i.cd,h=s[0].trace,c=h.orientation==="h",m=i.index,p=s[m],T=c?"x":"y";i[T+"LabelVal"]=p.s,i.percentInitial=p.begR,i.percentInitialLabel=S(p.begR,1),i.percentPrevious=p.difR,i.percentPreviousLabel=S(p.difR,1),i.percentTotal=p.sumR,i.percentTotalLabel=S(p.sumR,1);var l=p.hi||h.hoverinfo,_=[];if(l&&l!=="none"&&l!=="skip"){var w=l==="all",A=l.split("+"),M=function(g){return w||A.indexOf(g)!==-1};M("percent initial")&&_.push(i.percentInitialLabel+" of initial"),M("percent previous")&&_.push(i.percentPreviousLabel+" of previous"),M("percent total")&&_.push(i.percentTotalLabel+" of total")}return i.extraText=_.join("
"),i.color=E(h,p),[i]}};function E(e,t){var r=e.marker,o=t.mc||r.color,a=t.mlc||r.line.color,n=t.mlw||r.line.width;if(v(o))return o;if(v(a)&&n)return a}}}),YF=Xe({"src/traces/funnel/event_data.js"(Z,G){"use strict";G.exports=function(x,S){return x.x="xVal"in S?S.xVal:S.x,x.y="yVal"in S?S.yVal:S.y,"percentInitial"in S&&(x.percentInitial=S.percentInitial),"percentPrevious"in S&&(x.percentPrevious=S.percentPrevious),"percentTotal"in S&&(x.percentTotal=S.percentTotal),S.xa&&(x.xaxis=S.xa),S.ya&&(x.yaxis=S.ya),x}}}),KF=Xe({"src/traces/funnel/index.js"(Z,G){"use strict";G.exports={attributes:kS(),layoutAttributes:CS(),supplyDefaults:LS().supplyDefaults,crossTraceDefaults:LS().crossTraceDefaults,supplyLayoutDefaults:qF(),calc:GF(),crossTraceCalc:HF(),plot:WF(),style:XF().style,hoverPoints:ZF(),eventData:YF(),selectPoints:h1(),moduleType:"trace",name:"funnel",basePlotModule:Kf(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}}}),JF=Xe({"lib/funnel.js"(Z,G){"use strict";G.exports=KF()}}),$F=Xe({"src/traces/waterfall/constants.js"(Z,G){"use strict";G.exports={eventDataKeys:["initial","delta","final"]}}}),PS=Xe({"src/traces/waterfall/attributes.js"(Z,G){"use strict";var v=Sv(),x=af().line,S=ru(),E=tf().axisHoverFormat,{hovertemplateAttrs:e,texttemplateAttrs:t,templatefallbackAttrs:r}=Jl(),o=$F(),a=Qo().extendFlat,n=$n();function i(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"}}G.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:E("x"),yhoverformat:E("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:i("increasing"),decreasing:i("decreasing"),totals:i("intermediate sums and total"),connector:{line:{color:a({},x.color,{dflt:n.defaultLine}),width:a({},x.width,{editType:"plot"}),dash:x.dash,editType:"plot"},mode:{valType:"enumerated",values:["spanning","between"],dflt:"between",editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:v.offsetgroup,alignmentgroup:v.alignmentgroup,zorder:v.zorder}}}),IS=Xe({"src/traces/waterfall/layout_attributes.js"(Z,G){"use strict";G.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=Xe({"src/constants/delta.js"(Z,G){"use strict";G.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"\u25B2"},DECREASING:{COLOR:"#FF4136",SYMBOL:"\u25BC"}}}}),RS=Xe({"src/traces/waterfall/defaults.js"(Z,G){"use strict";var v=sa(),x=Q0(),S=gd().handleText,E=n1(),e=Qd(),t=PS(),r=$n(),o=d1(),a=o.INCREASING.COLOR,n=o.DECREASING.COLOR,i="#4499FF";function s(m,p,T){m(p+".marker.color",T),m(p+".marker.line.color",r.defaultLine),m(p+".marker.line.width")}function h(m,p,T,l){function _(b,d){return v.coerce(m,p,t,b,d)}var w=E(m,p,l,_);if(!w){p.visible=!1;return}e(m,p,l,_),_("xhoverformat"),_("yhoverformat"),_("measure"),_("orientation",p.x&&!p.y?"h":"v"),_("base"),_("offset"),_("width"),_("text"),_("hovertext"),_("hovertemplate"),_("hovertemplatefallback");var A=_("textposition");S(m,p,l,_,A,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),p.textposition!=="none"&&(_("texttemplate"),_("texttemplatefallback"),p.texttemplate||_("textinfo")),s(_,"increasing",a),s(_,"decreasing",n),s(_,"totals",i);var M=_("connector.visible");if(M){_("connector.mode");var g=_("connector.line.width");g&&(_("connector.line.color"),_("connector.line.dash"))}_("zorder")}function c(m,p){var T,l;function _(A){return v.coerce(l._input,l,t,A)}if(p.waterfallmode==="group")for(var w=0;w0&&(_?f+="M"+u[0]+","+y[1]+"V"+y[0]:f+="M"+u[1]+","+y[0]+"H"+u[0]),w!=="between"&&(g.isSum||b path").each(function(p){if(!p.isBlank){var T=m[p.dir].marker;v.select(this).call(S.fill,T.color).call(S.stroke,T.line.color).call(x.dashLine,T.line.dash,T.line.width).style("opacity",m.selectedpoints&&!p.selected?E:1)}}),r(c,m,a),c.selectAll(".lines").each(function(){var p=m.connector.line;x.lineGroupStyle(v.select(this).selectAll("path"),p.width,p.color,p.dash)})})}G.exports={style:o}}}),iO=Xe({"src/traces/waterfall/hover.js"(Z,G){"use strict";var v=Go().hoverLabelText,x=$n().opacity,S=f1().hoverOnBars,E=d1(),e={increasing:E.INCREASING.SYMBOL,decreasing:E.DECREASING.SYMBOL};G.exports=function(o,a,n,i,s){var h=S(o,a,n,i,s);if(!h)return;var c=h.cd,m=c[0].trace,p=m.orientation==="h",T=p?"x":"y",l=p?o.xa:o.ya;function _(R){return v(l,R,m[T+"hoverformat"])}var w=h.index,A=c[w],M=A.isSum?A.b+A.s:A.rawS;h.initial=A.b+A.s-M,h.delta=M,h.final=h.initial+h.delta;var g=_(Math.abs(h.delta));h.deltaLabel=M<0?"("+g+")":g,h.finalLabel=_(h.final),h.initialLabel=_(h.initial);var b=A.hi||m.hoverinfo,d=[];if(b&&b!=="none"&&b!=="skip"){var u=b==="all",y=b.split("+"),f=function(R){return u||y.indexOf(R)!==-1};A.isSum||(f("final")&&(p?!f("x"):!f("y"))&&d.push(h.finalLabel),f("delta")&&(M<0?d.push(h.deltaLabel+" "+e.decreasing):d.push(h.deltaLabel+" "+e.increasing)),f("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,n=a.color,i=a.line.color,s=a.line.width;if(x(n))return n;if(x(i)&&s)return i}}}),nO=Xe({"src/traces/waterfall/event_data.js"(Z,G){"use strict";G.exports=function(x,S){return x.x="xVal"in S?S.xVal:S.x,x.y="yVal"in S?S.yVal:S.y,"initial"in S&&(x.initial=S.initial),"delta"in S&&(x.delta=S.delta),"final"in S&&(x.final=S.final),S.xa&&(x.xaxis=S.xa),S.ya&&(x.yaxis=S.ya),x}}}),oO=Xe({"src/traces/waterfall/index.js"(Z,G){"use strict";G.exports={attributes:PS(),layoutAttributes:IS(),supplyDefaults:RS().supplyDefaults,crossTraceDefaults:RS().crossTraceDefaults,supplyLayoutDefaults:QF(),calc:eO(),crossTraceCalc:tO(),plot:rO(),style:aO().style,hoverPoints:iO(),eventData:nO(),selectPoints:h1(),moduleType:"trace",name:"waterfall",basePlotModule:Kf(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}}}),sO=Xe({"lib/waterfall.js"(Z,G){"use strict";G.exports=oO()}}),v1=Xe({"src/traces/image/constants.js"(Z,G){"use strict";G.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 x=v.slice(0,3);return x[1]=x[1]+"%",x[2]=x[2]+"%",x},suffix:["\xB0","%","%"]},hsla:{min:[0,0,0,0],max:[360,100,100,1],fmt:function(v){var x=v.slice(0,4);return x[1]=x[1]+"%",x[2]=x[2]+"%",x},suffix:["\xB0","%","%",""]}}}}}),DS=Xe({"src/traces/image/attributes.js"(Z,G){"use strict";var v=ru(),x=af().zorder,{hovertemplateAttrs:S,templatefallbackAttrs:E}=Jl(),e=Qo().extendFlat,t=v1().colormodel,r=["rgb","rgba","rgba256","hsl","hsla"],o=[],a=[];for(i=0;i0)throw new Error("Invalid string. Length must be a multiple of 4");var m=h.indexOf("=");m===-1&&(m=c);var p=m===c?0:4-m%4;return[m,p]}function r(h){var c=t(h),m=c[0],p=c[1];return(m+p)*3/4-p}function o(h,c,m){return(c+m)*3/4-m}function a(h){var c,m=t(h),p=m[0],T=m[1],l=new x(o(h,p,T)),_=0,w=T>0?p-4:p,A;for(A=0;A>16&255,l[_++]=c>>8&255,l[_++]=c&255;return T===2&&(c=v[h.charCodeAt(A)]<<2|v[h.charCodeAt(A+1)]>>4,l[_++]=c&255),T===1&&(c=v[h.charCodeAt(A)]<<10|v[h.charCodeAt(A+1)]<<4|v[h.charCodeAt(A+2)]>>2,l[_++]=c>>8&255,l[_++]=c&255),l}function n(h){return G[h>>18&63]+G[h>>12&63]+G[h>>6&63]+G[h&63]}function i(h,c,m){for(var p,T=[],l=c;lw?w:_+l));return p===1?(c=h[m-1],T.push(G[c>>2]+G[c<<4&63]+"==")):p===2&&(c=(h[m-2]<<8)+h[m-1],T.push(G[c>>10]+G[c>>4&63]+G[c<<2&63]+"=")),T.join("")}}}),cO=Xe({"node_modules/ieee754/index.js"(Z){Z.read=function(G,v,x,S,E){var e,t,r=E*8-S-1,o=(1<>1,n=-7,i=x?E-1:0,s=x?-1:1,h=G[v+i];for(i+=s,e=h&(1<<-n)-1,h>>=-n,n+=r;n>0;e=e*256+G[v+i],i+=s,n-=8);for(t=e&(1<<-n)-1,e>>=-n,n+=S;n>0;t=t*256+G[v+i],i+=s,n-=8);if(e===0)e=1-a;else{if(e===o)return t?NaN:(h?-1:1)*(1/0);t=t+Math.pow(2,S),e=e-a}return(h?-1:1)*t*Math.pow(2,e-S)},Z.write=function(G,v,x,S,E,e){var t,r,o,a=e*8-E-1,n=(1<>1,s=E===23?Math.pow(2,-24)-Math.pow(2,-77):0,h=S?0:e-1,c=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=n):(t=Math.floor(Math.log(v)/Math.LN2),v*(o=Math.pow(2,-t))<1&&(t--,o*=2),t+i>=1?v+=s/o:v+=s*Math.pow(2,1-i),v*o>=2&&(t++,o/=2),t+i>=n?(r=0,t=n):t+i>=1?(r=(v*o-1)*Math.pow(2,E),t=t+i):(r=v*Math.pow(2,i-1)*Math.pow(2,E),t=0));E>=8;G[x+h]=r&255,h+=c,r/=256,E-=8);for(t=t<0;G[x+h]=t&255,h+=c,t/=256,a-=8);G[x+h-c]|=m*128}}}),rg=Xe({"node_modules/buffer/index.js"(Z){"use strict";var G=uO(),v=cO(),x=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Z.Buffer=t,Z.SlowBuffer=T,Z.INSPECT_MAX_BYTES=50;var S=2147483647;Z.kMaxLength=S,t.TYPED_ARRAY_SUPPORT=E(),!t.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function E(){try{let Me=new Uint8Array(1),ye={foo:function(){return 42}};return Object.setPrototypeOf(ye,Uint8Array.prototype),Object.setPrototypeOf(Me,ye),Me.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(Me){if(Me>S)throw new RangeError('The value "'+Me+'" is invalid for option "size"');let ye=new Uint8Array(Me);return Object.setPrototypeOf(ye,t.prototype),ye}function t(Me,ye,he){if(typeof Me=="number"){if(typeof ye=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return n(Me)}return r(Me,ye,he)}t.poolSize=8192;function r(Me,ye,he){if(typeof Me=="string")return i(Me,ye);if(ArrayBuffer.isView(Me))return h(Me);if(Me==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Me);if(Ze(Me,ArrayBuffer)||Me&&Ze(Me.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Ze(Me,SharedArrayBuffer)||Me&&Ze(Me.buffer,SharedArrayBuffer)))return c(Me,ye,he);if(typeof Me=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let Oe=Me.valueOf&&Me.valueOf();if(Oe!=null&&Oe!==Me)return t.from(Oe,ye,he);let tt=m(Me);if(tt)return tt;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof Me[Symbol.toPrimitive]=="function")return t.from(Me[Symbol.toPrimitive]("string"),ye,he);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Me)}t.from=function(Me,ye,he){return r(Me,ye,he)},Object.setPrototypeOf(t.prototype,Uint8Array.prototype),Object.setPrototypeOf(t,Uint8Array);function o(Me){if(typeof Me!="number")throw new TypeError('"size" argument must be of type number');if(Me<0)throw new RangeError('The value "'+Me+'" is invalid for option "size"')}function a(Me,ye,he){return o(Me),Me<=0?e(Me):ye!==void 0?typeof he=="string"?e(Me).fill(ye,he):e(Me).fill(ye):e(Me)}t.alloc=function(Me,ye,he){return a(Me,ye,he)};function n(Me){return o(Me),e(Me<0?0:p(Me)|0)}t.allocUnsafe=function(Me){return n(Me)},t.allocUnsafeSlow=function(Me){return n(Me)};function i(Me,ye){if((typeof ye!="string"||ye==="")&&(ye="utf8"),!t.isEncoding(ye))throw new TypeError("Unknown encoding: "+ye);let he=l(Me,ye)|0,Oe=e(he),tt=Oe.write(Me,ye);return tt!==he&&(Oe=Oe.slice(0,tt)),Oe}function s(Me){let ye=Me.length<0?0:p(Me.length)|0,he=e(ye);for(let Oe=0;Oe=S)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+S.toString(16)+" bytes");return Me|0}function T(Me){return+Me!=Me&&(Me=0),t.alloc(+Me)}t.isBuffer=function(ye){return ye!=null&&ye._isBuffer===!0&&ye!==t.prototype},t.compare=function(ye,he){if(Ze(ye,Uint8Array)&&(ye=t.from(ye,ye.offset,ye.byteLength)),Ze(he,Uint8Array)&&(he=t.from(he,he.offset,he.byteLength)),!t.isBuffer(ye)||!t.isBuffer(he))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(ye===he)return 0;let Oe=ye.length,tt=he.length;for(let ot=0,Qe=Math.min(Oe,tt);ottt.length?(t.isBuffer(Qe)||(Qe=t.from(Qe)),Qe.copy(tt,ot)):Uint8Array.prototype.set.call(tt,Qe,ot);else if(t.isBuffer(Qe))Qe.copy(tt,ot);else throw new TypeError('"list" argument must be an Array of Buffers');ot+=Qe.length}return tt};function l(Me,ye){if(t.isBuffer(Me))return Me.length;if(ArrayBuffer.isView(Me)||Ze(Me,ArrayBuffer))return Me.byteLength;if(typeof Me!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof Me);let he=Me.length,Oe=arguments.length>2&&arguments[2]===!0;if(!Oe&&he===0)return 0;let tt=!1;for(;;)switch(ye){case"ascii":case"latin1":case"binary":return he;case"utf8":case"utf-8":return ce(Me).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return he*2;case"hex":return he>>>1;case"base64":return De(Me).length;default:if(tt)return Oe?-1:ce(Me).length;ye=(""+ye).toLowerCase(),tt=!0}}t.byteLength=l;function _(Me,ye,he){let Oe=!1;if((ye===void 0||ye<0)&&(ye=0),ye>this.length||((he===void 0||he>this.length)&&(he=this.length),he<=0)||(he>>>=0,ye>>>=0,he<=ye))return"";for(Me||(Me="utf8");;)switch(Me){case"hex":return O(this,ye,he);case"utf8":case"utf-8":return R(this,ye,he);case"ascii":return F(this,ye,he);case"latin1":case"binary":return N(this,ye,he);case"base64":return f(this,ye,he);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,ye,he);default:if(Oe)throw new TypeError("Unknown encoding: "+Me);Me=(Me+"").toLowerCase(),Oe=!0}}t.prototype._isBuffer=!0;function w(Me,ye,he){let Oe=Me[ye];Me[ye]=Me[he],Me[he]=Oe}t.prototype.swap16=function(){let ye=this.length;if(ye%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let he=0;hehe&&(ye+=" ... "),""},x&&(t.prototype[x]=t.prototype.inspect),t.prototype.compare=function(ye,he,Oe,tt,ot){if(Ze(ye,Uint8Array)&&(ye=t.from(ye,ye.offset,ye.byteLength)),!t.isBuffer(ye))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof ye);if(he===void 0&&(he=0),Oe===void 0&&(Oe=ye?ye.length:0),tt===void 0&&(tt=0),ot===void 0&&(ot=this.length),he<0||Oe>ye.length||tt<0||ot>this.length)throw new RangeError("out of range index");if(tt>=ot&&he>=Oe)return 0;if(tt>=ot)return-1;if(he>=Oe)return 1;if(he>>>=0,Oe>>>=0,tt>>>=0,ot>>>=0,this===ye)return 0;let Qe=ot-tt,Pt=Oe-he,It=Math.min(Qe,Pt),qt=this.slice(tt,ot),Wt=ye.slice(he,Oe);for(let kr=0;kr2147483647?he=2147483647:he<-2147483648&&(he=-2147483648),he=+he,at(he)&&(he=tt?0:Me.length-1),he<0&&(he=Me.length+he),he>=Me.length){if(tt)return-1;he=Me.length-1}else if(he<0)if(tt)he=0;else return-1;if(typeof ye=="string"&&(ye=t.from(ye,Oe)),t.isBuffer(ye))return ye.length===0?-1:M(Me,ye,he,Oe,tt);if(typeof ye=="number")return ye=ye&255,typeof Uint8Array.prototype.indexOf=="function"?tt?Uint8Array.prototype.indexOf.call(Me,ye,he):Uint8Array.prototype.lastIndexOf.call(Me,ye,he):M(Me,[ye],he,Oe,tt);throw new TypeError("val must be string, number or Buffer")}function M(Me,ye,he,Oe,tt){let ot=1,Qe=Me.length,Pt=ye.length;if(Oe!==void 0&&(Oe=String(Oe).toLowerCase(),Oe==="ucs2"||Oe==="ucs-2"||Oe==="utf16le"||Oe==="utf-16le")){if(Me.length<2||ye.length<2)return-1;ot=2,Qe/=2,Pt/=2,he/=2}function It(Wt,kr){return ot===1?Wt[kr]:Wt.readUInt16BE(kr*ot)}let qt;if(tt){let Wt=-1;for(qt=he;qtQe&&(he=Qe-Pt),qt=he;qt>=0;qt--){let Wt=!0;for(let kr=0;krtt&&(Oe=tt)):Oe=tt;let ot=ye.length;Oe>ot/2&&(Oe=ot/2);let Qe;for(Qe=0;Qe>>0,isFinite(Oe)?(Oe=Oe>>>0,tt===void 0&&(tt="utf8")):(tt=Oe,Oe=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let ot=this.length-he;if((Oe===void 0||Oe>ot)&&(Oe=ot),ye.length>0&&(Oe<0||he<0)||he>this.length)throw new RangeError("Attempt to write outside buffer bounds");tt||(tt="utf8");let Qe=!1;for(;;)switch(tt){case"hex":return g(this,ye,he,Oe);case"utf8":case"utf-8":return b(this,ye,he,Oe);case"ascii":case"latin1":case"binary":return d(this,ye,he,Oe);case"base64":return u(this,ye,he,Oe);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return y(this,ye,he,Oe);default:if(Qe)throw new TypeError("Unknown encoding: "+tt);tt=(""+tt).toLowerCase(),Qe=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function f(Me,ye,he){return ye===0&&he===Me.length?G.fromByteArray(Me):G.fromByteArray(Me.slice(ye,he))}function R(Me,ye,he){he=Math.min(Me.length,he);let Oe=[],tt=ye;for(;tt239?4:ot>223?3:ot>191?2:1;if(tt+Pt<=he){let It,qt,Wt,kr;switch(Pt){case 1:ot<128&&(Qe=ot);break;case 2:It=Me[tt+1],(It&192)===128&&(kr=(ot&31)<<6|It&63,kr>127&&(Qe=kr));break;case 3:It=Me[tt+1],qt=Me[tt+2],(It&192)===128&&(qt&192)===128&&(kr=(ot&15)<<12|(It&63)<<6|qt&63,kr>2047&&(kr<55296||kr>57343)&&(Qe=kr));break;case 4:It=Me[tt+1],qt=Me[tt+2],Wt=Me[tt+3],(It&192)===128&&(qt&192)===128&&(Wt&192)===128&&(kr=(ot&15)<<18|(It&63)<<12|(qt&63)<<6|Wt&63,kr>65535&&kr<1114112&&(Qe=kr))}}Qe===null?(Qe=65533,Pt=1):Qe>65535&&(Qe-=65536,Oe.push(Qe>>>10&1023|55296),Qe=56320|Qe&1023),Oe.push(Qe),tt+=Pt}return z(Oe)}var L=4096;function z(Me){let ye=Me.length;if(ye<=L)return String.fromCharCode.apply(String,Me);let he="",Oe=0;for(;OeOe)&&(he=Oe);let tt="";for(let ot=ye;otOe&&(ye=Oe),he<0?(he+=Oe,he<0&&(he=0)):he>Oe&&(he=Oe),hehe)throw new RangeError("Trying to access beyond buffer length")}t.prototype.readUintLE=t.prototype.readUIntLE=function(ye,he,Oe){ye=ye>>>0,he=he>>>0,Oe||U(ye,he,this.length);let tt=this[ye],ot=1,Qe=0;for(;++Qe>>0,he=he>>>0,Oe||U(ye,he,this.length);let tt=this[ye+--he],ot=1;for(;he>0&&(ot*=256);)tt+=this[ye+--he]*ot;return tt},t.prototype.readUint8=t.prototype.readUInt8=function(ye,he){return ye=ye>>>0,he||U(ye,1,this.length),this[ye]},t.prototype.readUint16LE=t.prototype.readUInt16LE=function(ye,he){return ye=ye>>>0,he||U(ye,2,this.length),this[ye]|this[ye+1]<<8},t.prototype.readUint16BE=t.prototype.readUInt16BE=function(ye,he){return ye=ye>>>0,he||U(ye,2,this.length),this[ye]<<8|this[ye+1]},t.prototype.readUint32LE=t.prototype.readUInt32LE=function(ye,he){return ye=ye>>>0,he||U(ye,4,this.length),(this[ye]|this[ye+1]<<8|this[ye+2]<<16)+this[ye+3]*16777216},t.prototype.readUint32BE=t.prototype.readUInt32BE=function(ye,he){return ye=ye>>>0,he||U(ye,4,this.length),this[ye]*16777216+(this[ye+1]<<16|this[ye+2]<<8|this[ye+3])},t.prototype.readBigUInt64LE=rt(function(ye){ye=ye>>>0,ae(ye,"offset");let he=this[ye],Oe=this[ye+7];(he===void 0||Oe===void 0)&&j(ye,this.length-8);let tt=he+this[++ye]*2**8+this[++ye]*2**16+this[++ye]*2**24,ot=this[++ye]+this[++ye]*2**8+this[++ye]*2**16+Oe*2**24;return BigInt(tt)+(BigInt(ot)<>>0,ae(ye,"offset");let he=this[ye],Oe=this[ye+7];(he===void 0||Oe===void 0)&&j(ye,this.length-8);let tt=he*2**24+this[++ye]*2**16+this[++ye]*2**8+this[++ye],ot=this[++ye]*2**24+this[++ye]*2**16+this[++ye]*2**8+Oe;return(BigInt(tt)<>>0,he=he>>>0,Oe||U(ye,he,this.length);let tt=this[ye],ot=1,Qe=0;for(;++Qe=ot&&(tt-=Math.pow(2,8*he)),tt},t.prototype.readIntBE=function(ye,he,Oe){ye=ye>>>0,he=he>>>0,Oe||U(ye,he,this.length);let tt=he,ot=1,Qe=this[ye+--tt];for(;tt>0&&(ot*=256);)Qe+=this[ye+--tt]*ot;return ot*=128,Qe>=ot&&(Qe-=Math.pow(2,8*he)),Qe},t.prototype.readInt8=function(ye,he){return ye=ye>>>0,he||U(ye,1,this.length),this[ye]&128?(255-this[ye]+1)*-1:this[ye]},t.prototype.readInt16LE=function(ye,he){ye=ye>>>0,he||U(ye,2,this.length);let Oe=this[ye]|this[ye+1]<<8;return Oe&32768?Oe|4294901760:Oe},t.prototype.readInt16BE=function(ye,he){ye=ye>>>0,he||U(ye,2,this.length);let Oe=this[ye+1]|this[ye]<<8;return Oe&32768?Oe|4294901760:Oe},t.prototype.readInt32LE=function(ye,he){return ye=ye>>>0,he||U(ye,4,this.length),this[ye]|this[ye+1]<<8|this[ye+2]<<16|this[ye+3]<<24},t.prototype.readInt32BE=function(ye,he){return ye=ye>>>0,he||U(ye,4,this.length),this[ye]<<24|this[ye+1]<<16|this[ye+2]<<8|this[ye+3]},t.prototype.readBigInt64LE=rt(function(ye){ye=ye>>>0,ae(ye,"offset");let he=this[ye],Oe=this[ye+7];(he===void 0||Oe===void 0)&&j(ye,this.length-8);let tt=this[ye+4]+this[ye+5]*2**8+this[ye+6]*2**16+(Oe<<24);return(BigInt(tt)<>>0,ae(ye,"offset");let he=this[ye],Oe=this[ye+7];(he===void 0||Oe===void 0)&&j(ye,this.length-8);let tt=(he<<24)+this[++ye]*2**16+this[++ye]*2**8+this[++ye];return(BigInt(tt)<>>0,he||U(ye,4,this.length),v.read(this,ye,!0,23,4)},t.prototype.readFloatBE=function(ye,he){return ye=ye>>>0,he||U(ye,4,this.length),v.read(this,ye,!1,23,4)},t.prototype.readDoubleLE=function(ye,he){return ye=ye>>>0,he||U(ye,8,this.length),v.read(this,ye,!0,52,8)},t.prototype.readDoubleBE=function(ye,he){return ye=ye>>>0,he||U(ye,8,this.length),v.read(this,ye,!1,52,8)};function B(Me,ye,he,Oe,tt,ot){if(!t.isBuffer(Me))throw new TypeError('"buffer" argument must be a Buffer instance');if(ye>tt||yeMe.length)throw new RangeError("Index out of range")}t.prototype.writeUintLE=t.prototype.writeUIntLE=function(ye,he,Oe,tt){if(ye=+ye,he=he>>>0,Oe=Oe>>>0,!tt){let Pt=Math.pow(2,8*Oe)-1;B(this,ye,he,Oe,Pt,0)}let ot=1,Qe=0;for(this[he]=ye&255;++Qe>>0,Oe=Oe>>>0,!tt){let Pt=Math.pow(2,8*Oe)-1;B(this,ye,he,Oe,Pt,0)}let ot=Oe-1,Qe=1;for(this[he+ot]=ye&255;--ot>=0&&(Qe*=256);)this[he+ot]=ye/Qe&255;return he+Oe},t.prototype.writeUint8=t.prototype.writeUInt8=function(ye,he,Oe){return ye=+ye,he=he>>>0,Oe||B(this,ye,he,1,255,0),this[he]=ye&255,he+1},t.prototype.writeUint16LE=t.prototype.writeUInt16LE=function(ye,he,Oe){return ye=+ye,he=he>>>0,Oe||B(this,ye,he,2,65535,0),this[he]=ye&255,this[he+1]=ye>>>8,he+2},t.prototype.writeUint16BE=t.prototype.writeUInt16BE=function(ye,he,Oe){return ye=+ye,he=he>>>0,Oe||B(this,ye,he,2,65535,0),this[he]=ye>>>8,this[he+1]=ye&255,he+2},t.prototype.writeUint32LE=t.prototype.writeUInt32LE=function(ye,he,Oe){return ye=+ye,he=he>>>0,Oe||B(this,ye,he,4,4294967295,0),this[he+3]=ye>>>24,this[he+2]=ye>>>16,this[he+1]=ye>>>8,this[he]=ye&255,he+4},t.prototype.writeUint32BE=t.prototype.writeUInt32BE=function(ye,he,Oe){return ye=+ye,he=he>>>0,Oe||B(this,ye,he,4,4294967295,0),this[he]=ye>>>24,this[he+1]=ye>>>16,this[he+2]=ye>>>8,this[he+3]=ye&255,he+4};function X(Me,ye,he,Oe,tt){oe(ye,Oe,tt,Me,he,7);let ot=Number(ye&BigInt(4294967295));Me[he++]=ot,ot=ot>>8,Me[he++]=ot,ot=ot>>8,Me[he++]=ot,ot=ot>>8,Me[he++]=ot;let Qe=Number(ye>>BigInt(32)&BigInt(4294967295));return Me[he++]=Qe,Qe=Qe>>8,Me[he++]=Qe,Qe=Qe>>8,Me[he++]=Qe,Qe=Qe>>8,Me[he++]=Qe,he}function $(Me,ye,he,Oe,tt){oe(ye,Oe,tt,Me,he,7);let ot=Number(ye&BigInt(4294967295));Me[he+7]=ot,ot=ot>>8,Me[he+6]=ot,ot=ot>>8,Me[he+5]=ot,ot=ot>>8,Me[he+4]=ot;let Qe=Number(ye>>BigInt(32)&BigInt(4294967295));return Me[he+3]=Qe,Qe=Qe>>8,Me[he+2]=Qe,Qe=Qe>>8,Me[he+1]=Qe,Qe=Qe>>8,Me[he]=Qe,he+8}t.prototype.writeBigUInt64LE=rt(function(ye,he=0){return X(this,ye,he,BigInt(0),BigInt("0xffffffffffffffff"))}),t.prototype.writeBigUInt64BE=rt(function(ye,he=0){return $(this,ye,he,BigInt(0),BigInt("0xffffffffffffffff"))}),t.prototype.writeIntLE=function(ye,he,Oe,tt){if(ye=+ye,he=he>>>0,!tt){let It=Math.pow(2,8*Oe-1);B(this,ye,he,Oe,It-1,-It)}let ot=0,Qe=1,Pt=0;for(this[he]=ye&255;++ot>0)-Pt&255;return he+Oe},t.prototype.writeIntBE=function(ye,he,Oe,tt){if(ye=+ye,he=he>>>0,!tt){let It=Math.pow(2,8*Oe-1);B(this,ye,he,Oe,It-1,-It)}let ot=Oe-1,Qe=1,Pt=0;for(this[he+ot]=ye&255;--ot>=0&&(Qe*=256);)ye<0&&Pt===0&&this[he+ot+1]!==0&&(Pt=1),this[he+ot]=(ye/Qe>>0)-Pt&255;return he+Oe},t.prototype.writeInt8=function(ye,he,Oe){return ye=+ye,he=he>>>0,Oe||B(this,ye,he,1,127,-128),ye<0&&(ye=255+ye+1),this[he]=ye&255,he+1},t.prototype.writeInt16LE=function(ye,he,Oe){return ye=+ye,he=he>>>0,Oe||B(this,ye,he,2,32767,-32768),this[he]=ye&255,this[he+1]=ye>>>8,he+2},t.prototype.writeInt16BE=function(ye,he,Oe){return ye=+ye,he=he>>>0,Oe||B(this,ye,he,2,32767,-32768),this[he]=ye>>>8,this[he+1]=ye&255,he+2},t.prototype.writeInt32LE=function(ye,he,Oe){return ye=+ye,he=he>>>0,Oe||B(this,ye,he,4,2147483647,-2147483648),this[he]=ye&255,this[he+1]=ye>>>8,this[he+2]=ye>>>16,this[he+3]=ye>>>24,he+4},t.prototype.writeInt32BE=function(ye,he,Oe){return ye=+ye,he=he>>>0,Oe||B(this,ye,he,4,2147483647,-2147483648),ye<0&&(ye=4294967295+ye+1),this[he]=ye>>>24,this[he+1]=ye>>>16,this[he+2]=ye>>>8,this[he+3]=ye&255,he+4},t.prototype.writeBigInt64LE=rt(function(ye,he=0){return X(this,ye,he,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),t.prototype.writeBigInt64BE=rt(function(ye,he=0){return $(this,ye,he,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function se(Me,ye,he,Oe,tt,ot){if(he+Oe>Me.length)throw new RangeError("Index out of range");if(he<0)throw new RangeError("Index out of range")}function le(Me,ye,he,Oe,tt){return ye=+ye,he=he>>>0,tt||se(Me,ye,he,4,34028234663852886e22,-34028234663852886e22),v.write(Me,ye,he,Oe,23,4),he+4}t.prototype.writeFloatLE=function(ye,he,Oe){return le(this,ye,he,!0,Oe)},t.prototype.writeFloatBE=function(ye,he,Oe){return le(this,ye,he,!1,Oe)};function fe(Me,ye,he,Oe,tt){return ye=+ye,he=he>>>0,tt||se(Me,ye,he,8,17976931348623157e292,-17976931348623157e292),v.write(Me,ye,he,Oe,52,8),he+8}t.prototype.writeDoubleLE=function(ye,he,Oe){return fe(this,ye,he,!0,Oe)},t.prototype.writeDoubleBE=function(ye,he,Oe){return fe(this,ye,he,!1,Oe)},t.prototype.copy=function(ye,he,Oe,tt){if(!t.isBuffer(ye))throw new TypeError("argument should be a Buffer");if(Oe||(Oe=0),!tt&&tt!==0&&(tt=this.length),he>=ye.length&&(he=ye.length),he||(he=0),tt>0&&tt=this.length)throw new RangeError("Index out of range");if(tt<0)throw new RangeError("sourceEnd out of bounds");tt>this.length&&(tt=this.length),ye.length-he>>0,Oe=Oe===void 0?this.length:Oe>>>0,ye||(ye=0);let ot;if(typeof ye=="number")for(ot=he;ot2**32?tt=ee(String(he)):typeof he=="bigint"&&(tt=String(he),(he>BigInt(2)**BigInt(32)||he<-(BigInt(2)**BigInt(32)))&&(tt=ee(tt)),tt+="n"),Oe+=` It must be ${ye}. Received ${tt}`,Oe},RangeError);function ee(Me){let ye="",he=Me.length,Oe=Me[0]==="-"?1:0;for(;he>=Oe+4;he-=3)ye=`_${Me.slice(he-3,he)}${ye}`;return`${Me.slice(0,he)}${ye}`}function q(Me,ye,he){ae(ye,"offset"),(Me[ye]===void 0||Me[ye+he]===void 0)&&j(ye,Me.length-(he+1))}function oe(Me,ye,he,Oe,tt,ot){if(Me>he||Me3?ye===0||ye===BigInt(0)?Pt=`>= 0${Qe} and < 2${Qe} ** ${(ot+1)*8}${Qe}`:Pt=`>= -(2${Qe} ** ${(ot+1)*8-1}${Qe}) and < 2 ** ${(ot+1)*8-1}${Qe}`:Pt=`>= ${ye}${Qe} and <= ${he}${Qe}`,new V.ERR_OUT_OF_RANGE("value",Pt,Me)}q(Oe,tt,ot)}function ae(Me,ye){if(typeof Me!="number")throw new V.ERR_INVALID_ARG_TYPE(ye,"number",Me)}function j(Me,ye,he){throw Math.floor(Me)!==Me?(ae(Me,he),new V.ERR_OUT_OF_RANGE(he||"offset","an integer",Me)):ye<0?new V.ERR_BUFFER_OUT_OF_BOUNDS:new V.ERR_OUT_OF_RANGE(he||"offset",`>= ${he?1:0} and <= ${ye}`,Me)}var Q=/[^+/0-9A-Za-z-_]/g;function re(Me){if(Me=Me.split("=")[0],Me=Me.trim().replace(Q,""),Me.length<2)return"";for(;Me.length%4!==0;)Me=Me+"=";return Me}function ce(Me,ye){ye=ye||1/0;let he,Oe=Me.length,tt=null,ot=[];for(let Qe=0;Qe55295&&he<57344){if(!tt){if(he>56319){(ye-=3)>-1&&ot.push(239,191,189);continue}else if(Qe+1===Oe){(ye-=3)>-1&&ot.push(239,191,189);continue}tt=he;continue}if(he<56320){(ye-=3)>-1&&ot.push(239,191,189),tt=he;continue}he=(tt-55296<<10|he-56320)+65536}else tt&&(ye-=3)>-1&&ot.push(239,191,189);if(tt=null,he<128){if((ye-=1)<0)break;ot.push(he)}else if(he<2048){if((ye-=2)<0)break;ot.push(he>>6|192,he&63|128)}else if(he<65536){if((ye-=3)<0)break;ot.push(he>>12|224,he>>6&63|128,he&63|128)}else if(he<1114112){if((ye-=4)<0)break;ot.push(he>>18|240,he>>12&63|128,he>>6&63|128,he&63|128)}else throw new Error("Invalid code point")}return ot}function be(Me){let ye=[];for(let he=0;he>8,tt=he%256,ot.push(tt),ot.push(Oe);return ot}function De(Me){return G.toByteArray(re(Me))}function ze(Me,ye,he,Oe){let tt;for(tt=0;tt=ye.length||tt>=Me.length);++tt)ye[tt+he]=Me[tt];return tt}function Ze(Me,ye){return Me instanceof ye||Me!=null&&Me.constructor!=null&&Me.constructor.name!=null&&Me.constructor.name===ye.name}function at(Me){return Me!==Me}var nt=function(){let Me="0123456789abcdef",ye=new Array(256);for(let he=0;he<16;++he){let Oe=he*16;for(let tt=0;tt<16;++tt)ye[Oe+tt]=Me[he]+Me[tt]}return ye}();function rt(Me){return typeof BigInt>"u"?st:Me}function st(){throw new Error("BigInt not supported")}}}),p3=Xe({"node_modules/has-symbols/shams.js"(Z,G){"use strict";G.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var x={},S=Symbol("test"),E=Object(S);if(typeof S=="string"||Object.prototype.toString.call(S)!=="[object Symbol]"||Object.prototype.toString.call(E)!=="[object Symbol]")return!1;var e=42;x[S]=e;for(var t in x)return!1;if(typeof Object.keys=="function"&&Object.keys(x).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(x).length!==0)return!1;var r=Object.getOwnPropertySymbols(x);if(r.length!==1||r[0]!==S||!Object.prototype.propertyIsEnumerable.call(x,S))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(x,S);if(o.value!==e||o.enumerable!==!0)return!1}return!0}}}),W_=Xe({"node_modules/has-tostringtag/shams.js"(Z,G){"use strict";var v=p3();G.exports=function(){return v()&&!!Symbol.toStringTag}}}),FS=Xe({"node_modules/es-object-atoms/index.js"(Z,G){"use strict";G.exports=Object}}),fO=Xe({"node_modules/es-errors/index.js"(Z,G){"use strict";G.exports=Error}}),hO=Xe({"node_modules/es-errors/eval.js"(Z,G){"use strict";G.exports=EvalError}}),pO=Xe({"node_modules/es-errors/range.js"(Z,G){"use strict";G.exports=RangeError}}),dO=Xe({"node_modules/es-errors/ref.js"(Z,G){"use strict";G.exports=ReferenceError}}),OS=Xe({"node_modules/es-errors/syntax.js"(Z,G){"use strict";G.exports=SyntaxError}}),m1=Xe({"node_modules/es-errors/type.js"(Z,G){"use strict";G.exports=TypeError}}),vO=Xe({"node_modules/es-errors/uri.js"(Z,G){"use strict";G.exports=URIError}}),mO=Xe({"node_modules/math-intrinsics/abs.js"(Z,G){"use strict";G.exports=Math.abs}}),gO=Xe({"node_modules/math-intrinsics/floor.js"(Z,G){"use strict";G.exports=Math.floor}}),yO=Xe({"node_modules/math-intrinsics/max.js"(Z,G){"use strict";G.exports=Math.max}}),_O=Xe({"node_modules/math-intrinsics/min.js"(Z,G){"use strict";G.exports=Math.min}}),xO=Xe({"node_modules/math-intrinsics/pow.js"(Z,G){"use strict";G.exports=Math.pow}}),bO=Xe({"node_modules/math-intrinsics/round.js"(Z,G){"use strict";G.exports=Math.round}}),wO=Xe({"node_modules/math-intrinsics/isNaN.js"(Z,G){"use strict";G.exports=Number.isNaN||function(x){return x!==x}}}),TO=Xe({"node_modules/math-intrinsics/sign.js"(Z,G){"use strict";var v=wO();G.exports=function(S){return v(S)||S===0?S:S<0?-1:1}}}),AO=Xe({"node_modules/gopd/gOPD.js"(Z,G){"use strict";G.exports=Object.getOwnPropertyDescriptor}}),ag=Xe({"node_modules/gopd/index.js"(Z,G){"use strict";var v=AO();if(v)try{v([],"length")}catch{v=null}G.exports=v}}),X_=Xe({"node_modules/es-define-property/index.js"(Z,G){"use strict";var v=Object.defineProperty||!1;if(v)try{v({},"a",{value:1})}catch{v=!1}G.exports=v}}),SO=Xe({"node_modules/has-symbols/index.js"(Z,G){"use strict";var v=typeof Symbol<"u"&&Symbol,x=p3();G.exports=function(){return typeof v!="function"||typeof Symbol!="function"||typeof v("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:x()}}}),BS=Xe({"node_modules/get-proto/Reflect.getPrototypeOf.js"(Z,G){"use strict";G.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null}}),NS=Xe({"node_modules/get-proto/Object.getPrototypeOf.js"(Z,G){"use strict";var v=FS();G.exports=v.getPrototypeOf||null}}),MO=Xe({"node_modules/function-bind/implementation.js"(Z,G){"use strict";var v="Function.prototype.bind called on incompatible ",x=Object.prototype.toString,S=Math.max,E="[object Function]",e=function(a,n){for(var i=[],s=0;s"u"||!b?v:b(Uint8Array),z={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?v:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?v:ArrayBuffer,"%ArrayIteratorPrototype%":g&&b?b([][Symbol.iterator]()):v,"%AsyncFromSyncIteratorPrototype%":v,"%AsyncFunction%":R,"%AsyncGenerator%":R,"%AsyncGeneratorFunction%":R,"%AsyncIteratorPrototype%":R,"%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%":E,"%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%":R,"%Int8Array%":typeof Int8Array>"u"?v:Int8Array,"%Int16Array%":typeof Int16Array>"u"?v:Int16Array,"%Int32Array%":typeof Int32Array>"u"?v:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":g&&b?b(b([][Symbol.iterator]())):v,"%JSON%":typeof JSON=="object"?JSON:v,"%Map%":typeof Map>"u"?v:Map,"%MapIteratorPrototype%":typeof Map>"u"||!g||!b?v:b(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":x,"%Object.getOwnPropertyDescriptor%":_,"%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"||!g||!b?v:b(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?v:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":g&&b?b(""[Symbol.iterator]()):v,"%Symbol%":g?Symbol:v,"%SyntaxError%":r,"%ThrowTypeError%":M,"%TypedArray%":L,"%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%":f,"%Function.prototype.apply%":y,"%Object.defineProperty%":w,"%Object.getPrototypeOf%":d,"%Math.abs%":n,"%Math.floor%":i,"%Math.max%":s,"%Math.min%":h,"%Math.pow%":c,"%Math.round%":m,"%Math.sign%":p,"%Reflect.getPrototypeOf%":u};if(b)try{null.error}catch(q){F=b(b(q)),z["%Error.prototype%"]=F}var F,N=function q(oe){var ae;if(oe==="%AsyncFunction%")ae=l("async function () {}");else if(oe==="%GeneratorFunction%")ae=l("function* () {}");else if(oe==="%AsyncGeneratorFunction%")ae=l("async function* () {}");else if(oe==="%AsyncGenerator%"){var j=q("%AsyncGeneratorFunction%");j&&(ae=j.prototype)}else if(oe==="%AsyncIteratorPrototype%"){var Q=q("%AsyncGenerator%");Q&&b&&(ae=b(Q.prototype))}return z[oe]=ae,ae},O={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},P=g1(),U=IO(),B=P.call(f,Array.prototype.concat),X=P.call(y,Array.prototype.splice),$=P.call(f,String.prototype.replace),se=P.call(f,String.prototype.slice),le=P.call(f,RegExp.prototype.exec),fe=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,V=/\\(\\)?/g,Y=function(oe){var ae=se(oe,0,1),j=se(oe,-1);if(ae==="%"&&j!=="%")throw new r("invalid intrinsic syntax, expected closing `%`");if(j==="%"&&ae!=="%")throw new r("invalid intrinsic syntax, expected opening `%`");var Q=[];return $(oe,fe,function(re,ce,be,Ae){Q[Q.length]=be?$(Ae,V,"$1"):ce||re}),Q},ee=function(oe,ae){var j=oe,Q;if(U(O,j)&&(Q=O[j],j="%"+Q[0]+"%"),U(z,j)){var re=z[j];if(re===R&&(re=N(j)),typeof re>"u"&&!ae)throw new o("intrinsic "+oe+" exists, but is not available. Please file an issue!");return{alias:Q,name:j,value:re}}throw new r("intrinsic "+oe+" does not exist!")};G.exports=function(oe,ae){if(typeof oe!="string"||oe.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(le(/^%?[^%]*%?$/,oe)===null)throw new r("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var j=Y(oe),Q=j.length>0?j[0]:"",re=ee("%"+Q+"%",ae),ce=re.name,be=re.value,Ae=!1,De=re.alias;De&&(Q=De[0],X(j,B([0,1],De)));for(var ze=1,Ze=!0;ze=j.length){var st=_(be,at);Ze=!!st,Ze&&"get"in st&&!("originalValue"in st.get)?be=st.get:be=be[at]}else Ze=U(be,at),be=be[at];Ze&&!Ae&&(z[ce]=be)}}return be}}}),RO=Xe({"node_modules/define-data-property/index.js"(Z,G){"use strict";var v=X_(),x=OS(),S=m1(),E=ag();G.exports=function(t,r,o){if(!t||typeof t!="object"&&typeof t!="function")throw new S("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new S("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new S("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new S("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new S("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new S("`loose`, if provided, must be a boolean");var a=arguments.length>3?arguments[3]:null,n=arguments.length>4?arguments[4]:null,i=arguments.length>5?arguments[5]:null,s=arguments.length>6?arguments[6]:!1,h=!!E&&E(t,r);if(v)v(t,r,{configurable:i===null&&h?h.configurable:!i,enumerable:a===null&&h?h.enumerable:!a,value:o,writable:n===null&&h?h.writable:!n});else if(s||!a&&!n&&!i)t[r]=o;else throw new x("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}}}),jS=Xe({"node_modules/has-property-descriptors/index.js"(Z,G){"use strict";var v=X_(),x=function(){return!!v};x.hasArrayLengthDefineBug=function(){if(!v)return null;try{return v([],"length",{value:1}).length!==1}catch{return!0}},G.exports=x}}),DO=Xe({"node_modules/set-function-length/index.js"(Z,G){"use strict";var v=v3(),x=RO(),S=jS()(),E=ag(),e=m1(),t=v("%Math.floor%");G.exports=function(o,a){if(typeof o!="function")throw new e("`fn` is not a function");if(typeof a!="number"||a<0||a>4294967295||t(a)!==a)throw new e("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],i=!0,s=!0;if("length"in o&&E){var h=E(o,"length");h&&!h.configurable&&(i=!1),h&&!h.writable&&(s=!1)}return(i||s||!n)&&(S?x(o,"length",a,!0,!0):x(o,"length",a)),o}}}),Z_=Xe({"node_modules/call-bind/index.js"(Z,G){"use strict";var v=g1(),x=v3(),S=DO(),E=m1(),e=x("%Function.prototype.apply%"),t=x("%Function.prototype.call%"),r=x("%Reflect.apply%",!0)||v.call(t,e),o=X_(),a=x("%Math.max%");G.exports=function(s){if(typeof s!="function")throw new E("a function is required");var h=r(v,t,arguments);return S(h,1+a(0,s.length-(arguments.length-1)),!0)};var n=function(){return r(v,e,arguments)};o?o(G.exports,"apply",{value:n}):G.exports.apply=n}}),y1=Xe({"node_modules/call-bind/callBound.js"(Z,G){"use strict";var v=v3(),x=Z_(),S=x(v("String.prototype.indexOf"));G.exports=function(e,t){var r=v(e,!!t);return typeof r=="function"&&S(e,".prototype.")>-1?x(r):r}}}),zO=Xe({"node_modules/is-arguments/index.js"(Z,G){"use strict";var v=W_()(),x=y1(),S=x("Object.prototype.toString"),E=function(o){return v&&o&&typeof o=="object"&&Symbol.toStringTag in o?!1:S(o)==="[object Arguments]"},e=function(o){return E(o)?!0:o!==null&&typeof o=="object"&&typeof o.length=="number"&&o.length>=0&&S(o)!=="[object Array]"&&S(o.callee)==="[object Function]"},t=function(){return E(arguments)}();E.isLegacyArguments=e,G.exports=t?E:e}}),FO=Xe({"node_modules/is-generator-function/index.js"(Z,G){"use strict";var v=Object.prototype.toString,x=Function.prototype.toString,S=/^\s*(?:function)?\*/,E=W_()(),e=Object.getPrototypeOf,t=function(){if(!E)return!1;try{return Function("return function*() {}")()}catch{}},r;G.exports=function(a){if(typeof a!="function")return!1;if(S.test(x.call(a)))return!0;if(!E){var n=v.call(a);return n==="[object GeneratorFunction]"}if(!e)return!1;if(typeof r>"u"){var i=t();r=i?e(i):!1}return e(a)===r}}}),OO=Xe({"node_modules/is-callable/index.js"(Z,G){"use strict";var v=Function.prototype.toString,x=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,S,E;if(typeof x=="function"&&typeof Object.defineProperty=="function")try{S=Object.defineProperty({},"length",{get:function(){throw E}}),E={},x(function(){throw 42},null,S)}catch(_){_!==E&&(x=null)}else x=null;var e=/^\s*class\b/,t=function(w){try{var A=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]",n="[object Function]",i="[object GeneratorFunction]",s="[object HTMLAllCollection]",h="[object HTML document.all class]",c="[object HTMLCollection]",m=typeof Symbol=="function"&&!!Symbol.toStringTag,p=!(0 in[,]),T=function(){return!1};typeof document=="object"&&(l=document.all,o.call(l)===o.call(document.all)&&(T=function(w){if((p||!w)&&(typeof w>"u"||typeof w=="object"))try{var A=o.call(w);return(A===s||A===h||A===c||A===a)&&w("")==null}catch{}return!1}));var l;G.exports=x?function(w){if(T(w))return!0;if(!w||typeof w!="function"&&typeof w!="object")return!1;try{x(w,null,S)}catch(A){if(A!==E)return!1}return!t(w)&&r(w)}:function(w){if(T(w))return!0;if(!w||typeof w!="function"&&typeof w!="object")return!1;if(m)return r(w);if(t(w))return!1;var A=o.call(w);return A!==n&&A!==i&&!/^\[object HTML/.test(A)?!1:r(w)}}}),qS=Xe({"node_modules/for-each/index.js"(Z,G){"use strict";var v=OO(),x=Object.prototype.toString,S=Object.prototype.hasOwnProperty,E=function(a,n,i){for(var s=0,h=a.length;s=3&&(s=i),x.call(a)==="[object Array]"?E(a,n,s):typeof a=="string"?e(a,n,s):t(a,n,s)};G.exports=r}}),VS=Xe({"node_modules/available-typed-arrays/index.js"(Z,G){"use strict";var v=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],x=typeof globalThis>"u"?window:globalThis;G.exports=function(){for(var E=[],e=0;e"u"?window:globalThis,a=x(),n=E("String.prototype.slice"),i=Object.getPrototypeOf,s=E("Array.prototype.indexOf",!0)||function(T,l){for(var _=0;_-1?l:l!=="Object"?!1:m(T)}return e?c(T):null}}}),NO=Xe({"node_modules/is-typed-array/index.js"(Z,G){"use strict";var v=qS(),x=VS(),S=y1(),E=S("Object.prototype.toString"),e=W_()(),t=ag(),r=typeof globalThis>"u"?window:globalThis,o=x(),a=S("Array.prototype.indexOf",!0)||function(m,p){for(var T=0;T-1}return t?h(m):!1}}}),GS=Xe({"node_modules/util/support/types.js"(Z){"use strict";var G=zO(),v=FO(),x=BO(),S=NO();function E(Ae){return Ae.call.bind(Ae)}var e=typeof BigInt<"u",t=typeof Symbol<"u",r=E(Object.prototype.toString),o=E(Number.prototype.valueOf),a=E(String.prototype.valueOf),n=E(Boolean.prototype.valueOf);e&&(i=E(BigInt.prototype.valueOf));var i;t&&(s=E(Symbol.prototype.valueOf));var s;function h(Ae,De){if(typeof Ae!="object")return!1;try{return De(Ae),!0}catch{return!1}}Z.isArgumentsObject=G,Z.isGeneratorFunction=v,Z.isTypedArray=S;function c(Ae){return typeof Promise<"u"&&Ae instanceof Promise||Ae!==null&&typeof Ae=="object"&&typeof Ae.then=="function"&&typeof Ae.catch=="function"}Z.isPromise=c;function m(Ae){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(Ae):S(Ae)||X(Ae)}Z.isArrayBufferView=m;function p(Ae){return x(Ae)==="Uint8Array"}Z.isUint8Array=p;function T(Ae){return x(Ae)==="Uint8ClampedArray"}Z.isUint8ClampedArray=T;function l(Ae){return x(Ae)==="Uint16Array"}Z.isUint16Array=l;function _(Ae){return x(Ae)==="Uint32Array"}Z.isUint32Array=_;function w(Ae){return x(Ae)==="Int8Array"}Z.isInt8Array=w;function A(Ae){return x(Ae)==="Int16Array"}Z.isInt16Array=A;function M(Ae){return x(Ae)==="Int32Array"}Z.isInt32Array=M;function g(Ae){return x(Ae)==="Float32Array"}Z.isFloat32Array=g;function b(Ae){return x(Ae)==="Float64Array"}Z.isFloat64Array=b;function d(Ae){return x(Ae)==="BigInt64Array"}Z.isBigInt64Array=d;function u(Ae){return x(Ae)==="BigUint64Array"}Z.isBigUint64Array=u;function y(Ae){return r(Ae)==="[object Map]"}y.working=typeof Map<"u"&&y(new Map);function f(Ae){return typeof Map>"u"?!1:y.working?y(Ae):Ae instanceof Map}Z.isMap=f;function R(Ae){return r(Ae)==="[object Set]"}R.working=typeof Set<"u"&&R(new Set);function L(Ae){return typeof Set>"u"?!1:R.working?R(Ae):Ae instanceof Set}Z.isSet=L;function z(Ae){return r(Ae)==="[object WeakMap]"}z.working=typeof WeakMap<"u"&&z(new WeakMap);function F(Ae){return typeof WeakMap>"u"?!1:z.working?z(Ae):Ae instanceof WeakMap}Z.isWeakMap=F;function N(Ae){return r(Ae)==="[object WeakSet]"}N.working=typeof WeakSet<"u"&&N(new WeakSet);function O(Ae){return N(Ae)}Z.isWeakSet=O;function P(Ae){return r(Ae)==="[object ArrayBuffer]"}P.working=typeof ArrayBuffer<"u"&&P(new ArrayBuffer);function U(Ae){return typeof ArrayBuffer>"u"?!1:P.working?P(Ae):Ae instanceof ArrayBuffer}Z.isArrayBuffer=U;function B(Ae){return r(Ae)==="[object DataView]"}B.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&B(new DataView(new ArrayBuffer(1),0,1));function X(Ae){return typeof DataView>"u"?!1:B.working?B(Ae):Ae instanceof DataView}Z.isDataView=X;var $=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function se(Ae){return r(Ae)==="[object SharedArrayBuffer]"}function le(Ae){return typeof $>"u"?!1:(typeof se.working>"u"&&(se.working=se(new $)),se.working?se(Ae):Ae instanceof $)}Z.isSharedArrayBuffer=le;function fe(Ae){return r(Ae)==="[object AsyncFunction]"}Z.isAsyncFunction=fe;function V(Ae){return r(Ae)==="[object Map Iterator]"}Z.isMapIterator=V;function Y(Ae){return r(Ae)==="[object Set Iterator]"}Z.isSetIterator=Y;function ee(Ae){return r(Ae)==="[object Generator]"}Z.isGeneratorObject=ee;function q(Ae){return r(Ae)==="[object WebAssembly.Module]"}Z.isWebAssemblyCompiledModule=q;function oe(Ae){return h(Ae,o)}Z.isNumberObject=oe;function ae(Ae){return h(Ae,a)}Z.isStringObject=ae;function j(Ae){return h(Ae,n)}Z.isBooleanObject=j;function Q(Ae){return e&&h(Ae,i)}Z.isBigIntObject=Q;function re(Ae){return t&&h(Ae,s)}Z.isSymbolObject=re;function ce(Ae){return oe(Ae)||ae(Ae)||j(Ae)||Q(Ae)||re(Ae)}Z.isBoxedPrimitive=ce;function be(Ae){return typeof Uint8Array<"u"&&(U(Ae)||le(Ae))}Z.isAnyArrayBuffer=be,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(Ae){Object.defineProperty(Z,Ae,{enumerable:!1,value:function(){throw new Error(Ae+" is not supported in userland")}})})}}),HS=Xe({"node_modules/util/support/isBufferBrowser.js"(Z,G){G.exports=function(x){return x&&typeof x=="object"&&typeof x.copy=="function"&&typeof x.fill=="function"&&typeof x.readUInt8=="function"}}}),WS=Xe({"(disabled):node_modules/util/util.js"(Z){var G=Object.getOwnPropertyDescriptors||function(X){for(var $=Object.keys(X),se={},le=0;le<$.length;le++)se[$[le]]=Object.getOwnPropertyDescriptor(X,$[le]);return se},v=/%[sdj%]/g;Z.format=function(B){if(!w(B)){for(var X=[],$=0;$=le)return Y;switch(Y){case"%s":return String(se[$++]);case"%d":return Number(se[$++]);case"%j":try{return JSON.stringify(se[$++])}catch{return"[Circular]"}default:return Y}}),V=se[$];$"u")return function(){return Z.deprecate(B,X).apply(this,arguments)};var $=!1;function se(){if(!$){if(process.throwDeprecation)throw new Error(X);process.traceDeprecation?console.trace(X):console.error(X),$=!0}return B.apply(this,arguments)}return se};var x={},S=/^$/;E="false",E=E.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),S=new RegExp("^"+E+"$","i");var E;Z.debuglog=function(B){if(B=B.toUpperCase(),!x[B])if(S.test(B)){var X=process.pid;x[B]=function(){var $=Z.format.apply(Z,arguments);console.error("%s %d: %s",B,X,$)}}else x[B]=function(){};return x[B]};function e(B,X){var $={seen:[],stylize:r};return arguments.length>=3&&($.depth=arguments[2]),arguments.length>=4&&($.colors=arguments[3]),p(X)?$.showHidden=X:X&&Z._extend($,X),M($.showHidden)&&($.showHidden=!1),M($.depth)&&($.depth=2),M($.colors)&&($.colors=!1),M($.customInspect)&&($.customInspect=!0),$.colors&&($.stylize=t),a($,B,$.depth)}Z.inspect=e,e.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},e.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function t(B,X){var $=e.styles[X];return $?"\x1B["+e.colors[$][0]+"m"+B+"\x1B["+e.colors[$][1]+"m":B}function r(B,X){return B}function o(B){var X={};return B.forEach(function($,se){X[$]=!0}),X}function a(B,X,$){if(B.customInspect&&X&&y(X.inspect)&&X.inspect!==Z.inspect&&!(X.constructor&&X.constructor.prototype===X)){var se=X.inspect($,B);return w(se)||(se=a(B,se,$)),se}var le=n(B,X);if(le)return le;var fe=Object.keys(X),V=o(fe);if(B.showHidden&&(fe=Object.getOwnPropertyNames(X)),u(X)&&(fe.indexOf("message")>=0||fe.indexOf("description")>=0))return i(X);if(fe.length===0){if(y(X)){var Y=X.name?": "+X.name:"";return B.stylize("[Function"+Y+"]","special")}if(g(X))return B.stylize(RegExp.prototype.toString.call(X),"regexp");if(d(X))return B.stylize(Date.prototype.toString.call(X),"date");if(u(X))return i(X)}var ee="",q=!1,oe=["{","}"];if(m(X)&&(q=!0,oe=["[","]"]),y(X)){var ae=X.name?": "+X.name:"";ee=" [Function"+ae+"]"}if(g(X)&&(ee=" "+RegExp.prototype.toString.call(X)),d(X)&&(ee=" "+Date.prototype.toUTCString.call(X)),u(X)&&(ee=" "+i(X)),fe.length===0&&(!q||X.length==0))return oe[0]+ee+oe[1];if($<0)return g(X)?B.stylize(RegExp.prototype.toString.call(X),"regexp"):B.stylize("[Object]","special");B.seen.push(X);var j;return q?j=s(B,X,$,V,fe):j=fe.map(function(Q){return h(B,X,$,V,Q,q)}),B.seen.pop(),c(j,ee,oe)}function n(B,X){if(M(X))return B.stylize("undefined","undefined");if(w(X)){var $="'"+JSON.stringify(X).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return B.stylize($,"string")}if(_(X))return B.stylize(""+X,"number");if(p(X))return B.stylize(""+X,"boolean");if(T(X))return B.stylize("null","null")}function i(B){return"["+Error.prototype.toString.call(B)+"]"}function s(B,X,$,se,le){for(var fe=[],V=0,Y=X.length;V-1&&(fe?Y=Y.split(` `).map(function(q){return" "+q}).join(` `).slice(2):Y=` `+Y.split(` `).map(function(q){return" "+q}).join(` `))):Y=B.stylize("[Circular]","special")),M(V)){if(fe&&le.match(/^\d+$/))return Y;V=JSON.stringify(""+le),V.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(V=V.slice(1,-1),V=B.stylize(V,"name")):(V=V.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),V=B.stylize(V,"string"))}return V+": "+Y}function c(B,X,$){var se=0,le=B.reduce(function(fe,V){return se++,V.indexOf(` `)>=0&&se++,fe+V.replace(/\u001b\[\d\d?m/g,"").length+1},0);return le>60?$[0]+(X===""?"":X+` `)+" "+B.join(`, `)+" "+$[1]:$[0]+X+" "+B.join(", ")+" "+$[1]}Z.types=GS();function m(B){return Array.isArray(B)}Z.isArray=m;function p(B){return typeof B=="boolean"}Z.isBoolean=p;function T(B){return B===null}Z.isNull=T;function l(B){return B==null}Z.isNullOrUndefined=l;function _(B){return typeof B=="number"}Z.isNumber=_;function w(B){return typeof B=="string"}Z.isString=w;function A(B){return typeof B=="symbol"}Z.isSymbol=A;function M(B){return B===void 0}Z.isUndefined=M;function g(B){return b(B)&&R(B)==="[object RegExp]"}Z.isRegExp=g,Z.types.isRegExp=g;function b(B){return typeof B=="object"&&B!==null}Z.isObject=b;function d(B){return b(B)&&R(B)==="[object Date]"}Z.isDate=d,Z.types.isDate=d;function u(B){return b(B)&&(R(B)==="[object Error]"||B instanceof Error)}Z.isError=u,Z.types.isNativeError=u;function y(B){return typeof B=="function"}Z.isFunction=y;function f(B){return B===null||typeof B=="boolean"||typeof B=="number"||typeof B=="string"||typeof B=="symbol"||typeof B>"u"}Z.isPrimitive=f,Z.isBuffer=HS();function R(B){return Object.prototype.toString.call(B)}function L(B){return B<10?"0"+B.toString(10):B.toString(10)}var z=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function F(){var B=new Date,X=[L(B.getHours()),L(B.getMinutes()),L(B.getSeconds())].join(":");return[B.getDate(),z[B.getMonth()],X].join(" ")}Z.log=function(){console.log("%s - %s",F(),Z.format.apply(Z,arguments))},Z.inherits=Kv(),Z._extend=function(B,X){if(!X||!b(X))return B;for(var $=Object.keys(X),se=$.length;se--;)B[$[se]]=X[$[se]];return B};function N(B,X){return Object.prototype.hasOwnProperty.call(B,X)}var O=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;Z.promisify=function(X){if(typeof X!="function")throw new TypeError('The "original" argument must be of type Function');if(O&&X[O]){var $=X[O];if(typeof $!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty($,O,{value:$,enumerable:!1,writable:!1,configurable:!0}),$}function $(){for(var se,le,fe=new Promise(function(ee,q){se=ee,le=q}),V=[],Y=0;Y0?this.tail.next=p:this.head=p,this.tail=p,++this.length}},{key:"unshift",value:function(m){var p={data:m,next:this.head};this.length===0&&(this.tail=p),this.head=p,++this.length}},{key:"shift",value:function(){if(this.length!==0){var m=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,m}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(m){if(this.length===0)return"";for(var p=this.head,T=""+p.data;p=p.next;)T+=m+p.data;return T}},{key:"concat",value:function(m){if(this.length===0)return o.alloc(0);for(var p=o.allocUnsafe(m>>>0),T=this.head,l=0;T;)s(T.data,p,l),l+=T.data.length,T=T.next;return p}},{key:"consume",value:function(m,p){var T;return m_.length?_.length:m;if(w===_.length?l+=_:l+=_.slice(0,m),m-=w,m===0){w===_.length?(++T,p.next?this.head=p.next:this.head=this.tail=null):(this.head=p,p.data=_.slice(w));break}++T}return this.length-=T,l}},{key:"_getBuffer",value:function(m){var p=o.allocUnsafe(m),T=this.head,l=1;for(T.data.copy(p),m-=T.data.length;T=T.next;){var _=T.data,w=m>_.length?_.length:m;if(_.copy(p,p.length-m,0,w),m-=w,m===0){w===_.length?(++l,T.next?this.head=T.next:this.head=this.tail=null):(this.head=T,T.data=_.slice(w));break}++l}return this.length-=l,p}},{key:i,value:function(m,p){return n(this,x({},p,{depth:0,customInspect:!1}))}}]),h}()}}),XS=Xe({"node_modules/stream-browserify/node_modules/readable-stream/lib/internal/streams/destroy.js"(Z,G){"use strict";function v(r,o){var a=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?(o?o(r):r&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(e,this,r)):process.nextTick(e,this,r)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(r||null,function(s){!o&&s?a._writableState?a._writableState.errorEmitted?process.nextTick(S,a):(a._writableState.errorEmitted=!0,process.nextTick(x,a,s)):process.nextTick(x,a,s):o?(process.nextTick(S,a),o(s)):process.nextTick(S,a)}),this)}function x(r,o){e(r,o),S(r)}function S(r){r._writableState&&!r._writableState.emitClose||r._readableState&&!r._readableState.emitClose||r.emit("close")}function E(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function e(r,o){r.emit("error",o)}function t(r,o){var a=r._readableState,n=r._writableState;a&&a.autoDestroy||n&&n.autoDestroy?r.destroy(o):r.emit("error",o)}G.exports={destroy:v,undestroy:E,errorOrDestroy:t}}}),ig=Xe({"node_modules/stream-browserify/node_modules/readable-stream/errors-browser.js"(Z,G){"use strict";function v(o,a){o.prototype=Object.create(a.prototype),o.prototype.constructor=o,o.__proto__=a}var x={};function S(o,a,n){n||(n=Error);function i(h,c,m){return typeof a=="string"?a:a(h,c,m)}var s=function(h){v(c,h);function c(m,p,T){return h.call(this,i(m,p,T))||this}return c}(n);s.prototype.name=n.name,s.prototype.code=o,x[o]=s}function E(o,a){if(Array.isArray(o)){var n=o.length;return o=o.map(function(i){return String(i)}),n>2?"one of ".concat(a," ").concat(o.slice(0,n-1).join(", "),", or ")+o[n-1]:n===2?"one of ".concat(a," ").concat(o[0]," or ").concat(o[1]):"of ".concat(a," ").concat(o[0])}else return"of ".concat(a," ").concat(String(o))}function e(o,a,n){return o.substr(!n||n<0?0:+n,a.length)===a}function t(o,a,n){return(n===void 0||n>o.length)&&(n=o.length),o.substring(n-a.length,n)===a}function r(o,a,n){return typeof n!="number"&&(n=0),n+a.length>o.length?!1:o.indexOf(a,n)!==-1}S("ERR_INVALID_OPT_VALUE",function(o,a){return'The value "'+a+'" is invalid for option "'+o+'"'},TypeError),S("ERR_INVALID_ARG_TYPE",function(o,a,n){var i;typeof a=="string"&&e(a,"not ")?(i="must not be",a=a.replace(/^not /,"")):i="must be";var s;if(t(o," argument"))s="The ".concat(o," ").concat(i," ").concat(E(a,"type"));else{var h=r(o,".")?"property":"argument";s='The "'.concat(o,'" ').concat(h," ").concat(i," ").concat(E(a,"type"))}return s+=". Received type ".concat(typeof n),s},TypeError),S("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),S("ERR_METHOD_NOT_IMPLEMENTED",function(o){return"The "+o+" method is not implemented"}),S("ERR_STREAM_PREMATURE_CLOSE","Premature close"),S("ERR_STREAM_DESTROYED",function(o){return"Cannot call "+o+" after a stream was destroyed"}),S("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),S("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),S("ERR_STREAM_WRITE_AFTER_END","write after end"),S("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),S("ERR_UNKNOWN_ENCODING",function(o){return"Unknown encoding: "+o},TypeError),S("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),G.exports.codes=x}}),ZS=Xe({"node_modules/stream-browserify/node_modules/readable-stream/lib/internal/streams/state.js"(Z,G){"use strict";var v=ig().codes.ERR_INVALID_OPT_VALUE;function x(E,e,t){return E.highWaterMark!=null?E.highWaterMark:e?E[t]:null}function S(E,e,t,r){var o=x(e,r,t);if(o!=null){if(!(isFinite(o)&&Math.floor(o)===o)||o<0){var a=r?t:"highWaterMark";throw new v(a,o)}return Math.floor(o)}return E.objectMode?16:16*1024}G.exports={getHighWaterMark:S}}}),jO=Xe({"node_modules/util-deprecate/browser.js"(Z,G){G.exports=v;function v(S,E){if(x("noDeprecation"))return S;var e=!1;function t(){if(!e){if(x("throwDeprecation"))throw new Error(E);x("traceDeprecation")?console.trace(E):console.warn(E),e=!0}return S.apply(this,arguments)}return t}function x(S){try{if(!window.localStorage)return!1}catch{return!1}var E=window.localStorage[S];return E==null?!1:String(E).toLowerCase()==="true"}}}),YS=Xe({"node_modules/stream-browserify/node_modules/readable-stream/lib/_stream_writable.js"(Z,G){"use strict";G.exports=d;function v(V){var Y=this;this.next=null,this.entry=null,this.finish=function(){fe(Y,V)}}var x;d.WritableState=g;var S={deprecate:jO()},E=zS(),e=rg().Buffer,t=window.Uint8Array||function(){};function r(V){return e.from(V)}function o(V){return e.isBuffer(V)||V instanceof t}var a=XS(),n=ZS(),i=n.getHighWaterMark,s=ig().codes,h=s.ERR_INVALID_ARG_TYPE,c=s.ERR_METHOD_NOT_IMPLEMENTED,m=s.ERR_MULTIPLE_CALLBACK,p=s.ERR_STREAM_CANNOT_PIPE,T=s.ERR_STREAM_DESTROYED,l=s.ERR_STREAM_NULL_VALUES,_=s.ERR_STREAM_WRITE_AFTER_END,w=s.ERR_UNKNOWN_ENCODING,A=a.errorOrDestroy;Kv()(d,E);function M(){}function g(V,Y,ee){x=x||ng(),V=V||{},typeof ee!="boolean"&&(ee=Y instanceof x),this.objectMode=!!V.objectMode,ee&&(this.objectMode=this.objectMode||!!V.writableObjectMode),this.highWaterMark=i(this,V,"writableHighWaterMark",ee),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var q=V.decodeStrings===!1;this.decodeStrings=!q,this.defaultEncoding=V.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(oe){N(Y,oe)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=V.emitClose!==!1,this.autoDestroy=!!V.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new v(this)}g.prototype.getBuffer=function(){for(var Y=this.bufferedRequest,ee=[];Y;)ee.push(Y),Y=Y.next;return ee},function(){try{Object.defineProperty(g.prototype,"buffer",{get:S.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var b;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(b=Function.prototype[Symbol.hasInstance],Object.defineProperty(d,Symbol.hasInstance,{value:function(Y){return b.call(this,Y)?!0:this!==d?!1:Y&&Y._writableState instanceof g}})):b=function(Y){return Y instanceof this};function d(V){x=x||ng();var Y=this instanceof x;if(!Y&&!b.call(d,this))return new d(V);this._writableState=new g(V,this,Y),this.writable=!0,V&&(typeof V.write=="function"&&(this._write=V.write),typeof V.writev=="function"&&(this._writev=V.writev),typeof V.destroy=="function"&&(this._destroy=V.destroy),typeof V.final=="function"&&(this._final=V.final)),E.call(this)}d.prototype.pipe=function(){A(this,new p)};function u(V,Y){var ee=new _;A(V,ee),process.nextTick(Y,ee)}function y(V,Y,ee,q){var oe;return ee===null?oe=new l:typeof ee!="string"&&!Y.objectMode&&(oe=new h("chunk",["string","Buffer"],ee)),oe?(A(V,oe),process.nextTick(q,oe),!1):!0}d.prototype.write=function(V,Y,ee){var q=this._writableState,oe=!1,ae=!q.objectMode&&o(V);return ae&&!e.isBuffer(V)&&(V=r(V)),typeof Y=="function"&&(ee=Y,Y=null),ae?Y="buffer":Y||(Y=q.defaultEncoding),typeof ee!="function"&&(ee=M),q.ending?u(this,ee):(ae||y(this,q,V,ee))&&(q.pendingcb++,oe=R(this,q,ae,V,Y,ee)),oe},d.prototype.cork=function(){this._writableState.corked++},d.prototype.uncork=function(){var V=this._writableState;V.corked&&(V.corked--,!V.writing&&!V.corked&&!V.bufferProcessing&&V.bufferedRequest&&U(this,V))},d.prototype.setDefaultEncoding=function(Y){if(typeof Y=="string"&&(Y=Y.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((Y+"").toLowerCase())>-1))throw new w(Y);return this._writableState.defaultEncoding=Y,this},Object.defineProperty(d.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function f(V,Y,ee){return!V.objectMode&&V.decodeStrings!==!1&&typeof Y=="string"&&(Y=e.from(Y,ee)),Y}Object.defineProperty(d.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function R(V,Y,ee,q,oe,ae){if(!ee){var j=f(Y,q,oe);q!==j&&(ee=!0,oe="buffer",q=j)}var Q=Y.objectMode?1:q.length;Y.length+=Q;var re=Y.length>5===6?2:T>>4===14?3:T>>3===30?4:T>>6===2?-1:-2}function t(T,l,_){var w=l.length-1;if(w<_)return 0;var A=e(l[w]);return A>=0?(A>0&&(T.lastNeed=A-1),A):--w<_||A===-2?0:(A=e(l[w]),A>=0?(A>0&&(T.lastNeed=A-2),A):--w<_||A===-2?0:(A=e(l[w]),A>=0?(A>0&&(A===2?A=0:T.lastNeed=A-3),A):0))}function r(T,l,_){if((l[0]&192)!==128)return T.lastNeed=0,"\uFFFD";if(T.lastNeed>1&&l.length>1){if((l[1]&192)!==128)return T.lastNeed=1,"\uFFFD";if(T.lastNeed>2&&l.length>2&&(l[2]&192)!==128)return T.lastNeed=2,"\uFFFD"}}function o(T){var l=this.lastTotal-this.lastNeed,_=r(this,T,l);if(_!==void 0)return _;if(this.lastNeed<=T.length)return T.copy(this.lastChar,l,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);T.copy(this.lastChar,l,0,T.length),this.lastNeed-=T.length}function a(T,l){var _=t(this,T,l);if(!this.lastNeed)return T.toString("utf8",l);this.lastTotal=_;var w=T.length-(_-this.lastNeed);return T.copy(this.lastChar,0,w),T.toString("utf8",l,w)}function n(T){var l=T&&T.length?this.write(T):"";return this.lastNeed?l+"\uFFFD":l}function i(T,l){if((T.length-l)%2===0){var _=T.toString("utf16le",l);if(_){var w=_.charCodeAt(_.length-1);if(w>=55296&&w<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=T[T.length-2],this.lastChar[1]=T[T.length-1],_.slice(0,-1)}return _}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=T[T.length-1],T.toString("utf16le",l,T.length-1)}function s(T){var l=T&&T.length?this.write(T):"";if(this.lastNeed){var _=this.lastTotal-this.lastNeed;return l+this.lastChar.toString("utf16le",0,_)}return l}function h(T,l){var _=(T.length-l)%3;return _===0?T.toString("base64",l):(this.lastNeed=3-_,this.lastTotal=3,_===1?this.lastChar[0]=T[T.length-1]:(this.lastChar[0]=T[T.length-2],this.lastChar[1]=T[T.length-1]),T.toString("base64",l,T.length-_))}function c(T){var l=T&&T.length?this.write(T):"";return this.lastNeed?l+this.lastChar.toString("base64",0,3-this.lastNeed):l}function m(T){return T.toString(this.encoding)}function p(T){return T&&T.length?this.write(T):""}}}),m3=Xe({"node_modules/stream-browserify/node_modules/readable-stream/lib/internal/streams/end-of-stream.js"(Z,G){"use strict";var v=ig().codes.ERR_STREAM_PREMATURE_CLOSE;function x(t){var r=!1;return function(){if(!r){r=!0;for(var o=arguments.length,a=new Array(o),n=0;n0)if(typeof Q!="string"&&!Ae.objectMode&&Object.getPrototypeOf(Q)!==e.prototype&&(Q=r(Q)),ce)Ae.endEmitted?g(j,new _):R(j,Ae,Q,!0);else if(Ae.ended)g(j,new T);else{if(Ae.destroyed)return!1;Ae.reading=!1,Ae.decoder&&!re?(Q=Ae.decoder.write(Q),Ae.objectMode||Q.length!==0?R(j,Ae,Q,!1):B(j,Ae)):R(j,Ae,Q,!1)}else ce||(Ae.reading=!1,B(j,Ae))}return!Ae.ended&&(Ae.length=z?j=z:(j--,j|=j>>>1,j|=j>>>2,j|=j>>>4,j|=j>>>8,j|=j>>>16,j++),j}function N(j,Q){return j<=0||Q.length===0&&Q.ended?0:Q.objectMode?1:j!==j?Q.flowing&&Q.length?Q.buffer.head.data.length:Q.length:(j>Q.highWaterMark&&(Q.highWaterMark=F(j)),j<=Q.length?j:Q.ended?Q.length:(Q.needReadable=!0,0))}y.prototype.read=function(j){n("read",j),j=parseInt(j,10);var Q=this._readableState,re=j;if(j!==0&&(Q.emittedReadable=!1),j===0&&Q.needReadable&&((Q.highWaterMark!==0?Q.length>=Q.highWaterMark:Q.length>0)||Q.ended))return n("read: emitReadable",Q.length,Q.ended),Q.length===0&&Q.ended?q(this):P(this),null;if(j=N(j,Q),j===0&&Q.ended)return Q.length===0&&q(this),null;var ce=Q.needReadable;n("need readable",ce),(Q.length===0||Q.length-j0?be=ee(j,Q):be=null,be===null?(Q.needReadable=Q.length<=Q.highWaterMark,j=0):(Q.length-=j,Q.awaitDrain=0),Q.length===0&&(Q.ended||(Q.needReadable=!0),re!==j&&Q.ended&&q(this)),be!==null&&this.emit("data",be),be};function O(j,Q){if(n("onEofChunk"),!Q.ended){if(Q.decoder){var re=Q.decoder.end();re&&re.length&&(Q.buffer.push(re),Q.length+=Q.objectMode?1:re.length)}Q.ended=!0,Q.sync?P(j):(Q.needReadable=!1,Q.emittedReadable||(Q.emittedReadable=!0,U(j)))}}function P(j){var Q=j._readableState;n("emitReadable",Q.needReadable,Q.emittedReadable),Q.needReadable=!1,Q.emittedReadable||(n("emitReadable",Q.flowing),Q.emittedReadable=!0,process.nextTick(U,j))}function U(j){var Q=j._readableState;n("emitReadable_",Q.destroyed,Q.length,Q.ended),!Q.destroyed&&(Q.length||Q.ended)&&(j.emit("readable"),Q.emittedReadable=!1),Q.needReadable=!Q.flowing&&!Q.ended&&Q.length<=Q.highWaterMark,Y(j)}function B(j,Q){Q.readingMore||(Q.readingMore=!0,process.nextTick(X,j,Q))}function X(j,Q){for(;!Q.reading&&!Q.ended&&(Q.length1&&ae(ce.pipes,j)!==-1)&&!at&&(n("false write response, pause",ce.awaitDrain),ce.awaitDrain++),re.pause())}function st(Oe){n("onerror",Oe),he(),j.removeListener("error",st),S(j,"error")===0&&g(j,Oe)}d(j,"error",st);function Me(){j.removeListener("finish",ye),he()}j.once("close",Me);function ye(){n("onfinish"),j.removeListener("close",Me),he()}j.once("finish",ye);function he(){n("unpipe"),re.unpipe(j)}return j.emit("pipe",re),ce.flowing||(n("pipe resume"),re.resume()),j};function $(j){return function(){var re=j._readableState;n("pipeOnDrain",re.awaitDrain),re.awaitDrain&&re.awaitDrain--,re.awaitDrain===0&&S(j,"data")&&(re.flowing=!0,Y(j))}}y.prototype.unpipe=function(j){var Q=this._readableState,re={hasUnpiped:!1};if(Q.pipesCount===0)return this;if(Q.pipesCount===1)return j&&j!==Q.pipes?this:(j||(j=Q.pipes),Q.pipes=null,Q.pipesCount=0,Q.flowing=!1,j&&j.emit("unpipe",this,re),this);if(!j){var ce=Q.pipes,be=Q.pipesCount;Q.pipes=null,Q.pipesCount=0,Q.flowing=!1;for(var Ae=0;Ae0,ce.flowing!==!1&&this.resume()):j==="readable"&&!ce.endEmitted&&!ce.readableListening&&(ce.readableListening=ce.needReadable=!0,ce.flowing=!1,ce.emittedReadable=!1,n("on readable",ce.length,ce.reading),ce.length?P(this):ce.reading||process.nextTick(le,this)),re},y.prototype.addListener=y.prototype.on,y.prototype.removeListener=function(j,Q){var re=E.prototype.removeListener.call(this,j,Q);return j==="readable"&&process.nextTick(se,this),re},y.prototype.removeAllListeners=function(j){var Q=E.prototype.removeAllListeners.apply(this,arguments);return(j==="readable"||j===void 0)&&process.nextTick(se,this),Q};function se(j){var Q=j._readableState;Q.readableListening=j.listenerCount("readable")>0,Q.resumeScheduled&&!Q.paused?Q.flowing=!0:j.listenerCount("data")>0&&j.resume()}function le(j){n("readable nexttick read 0"),j.read(0)}y.prototype.resume=function(){var j=this._readableState;return j.flowing||(n("resume"),j.flowing=!j.readableListening,fe(this,j)),j.paused=!1,this};function fe(j,Q){Q.resumeScheduled||(Q.resumeScheduled=!0,process.nextTick(V,j,Q))}function V(j,Q){n("resume",Q.reading),Q.reading||j.read(0),Q.resumeScheduled=!1,j.emit("resume"),Y(j),Q.flowing&&!Q.reading&&j.read(0)}y.prototype.pause=function(){return n("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(n("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function Y(j){var Q=j._readableState;for(n("flow",Q.flowing);Q.flowing&&j.read()!==null;);}y.prototype.wrap=function(j){var Q=this,re=this._readableState,ce=!1;j.on("end",function(){if(n("wrapped end"),re.decoder&&!re.ended){var De=re.decoder.end();De&&De.length&&Q.push(De)}Q.push(null)}),j.on("data",function(De){if(n("wrapped data"),re.decoder&&(De=re.decoder.write(De)),!(re.objectMode&&De==null)&&!(!re.objectMode&&(!De||!De.length))){var ze=Q.push(De);ze||(ce=!0,j.pause())}});for(var be in j)this[be]===void 0&&typeof j[be]=="function"&&(this[be]=function(ze){return function(){return j[ze].apply(j,arguments)}}(be));for(var Ae=0;Ae=Q.length?(Q.decoder?re=Q.buffer.join(""):Q.buffer.length===1?re=Q.buffer.first():re=Q.buffer.concat(Q.length),Q.buffer.clear()):re=Q.buffer.consume(j,Q.decoder),re}function q(j){var Q=j._readableState;n("endReadable",Q.endEmitted),Q.endEmitted||(Q.ended=!0,process.nextTick(oe,Q,j))}function oe(j,Q){if(n("endReadableNT",j.endEmitted,j.length),!j.endEmitted&&j.length===0&&(j.endEmitted=!0,Q.readable=!1,Q.emit("end"),j.autoDestroy)){var re=Q._writableState;(!re||re.autoDestroy&&re.finished)&&Q.destroy()}}typeof Symbol=="function"&&(y.from=function(j,Q){return M===void 0&&(M=GO()),M(y,j,Q)});function ae(j,Q){for(var re=0,ce=j.length;re0;return o(_,A,M,function(g){T||(T=g),g&&l.forEach(a),!A&&(l.forEach(a),p(T))})});return c.reduce(n)}G.exports=s}}),XO=Xe({"node_modules/stream-browserify/index.js"(Z,G){G.exports=S;var v=Z0().EventEmitter,x=Kv();x(S,v),S.Readable=JS(),S.Writable=YS(),S.Duplex=ng(),S.Transform=$S(),S.PassThrough=HO(),S.finished=m3(),S.pipeline=WO(),S.Stream=S;function S(){v.call(this)}S.prototype.pipe=function(E,e){var t=this;function r(c){E.writable&&E.write(c)===!1&&t.pause&&t.pause()}t.on("data",r);function o(){t.readable&&t.resume&&t.resume()}E.on("drain",o),!E._isStdio&&(!e||e.end!==!1)&&(t.on("end",n),t.on("close",i));var a=!1;function n(){a||(a=!0,E.end())}function i(){a||(a=!0,typeof E.destroy=="function"&&E.destroy())}function s(c){if(h(),v.listenerCount(this,"error")===0)throw c}t.on("error",s),E.on("error",s);function h(){t.removeListener("data",r),E.removeListener("drain",o),t.removeListener("end",n),t.removeListener("close",i),t.removeListener("error",s),E.removeListener("error",s),t.removeListener("end",h),t.removeListener("close",h),E.removeListener("close",h)}return t.on("end",h),t.on("close",h),E.on("close",h),E.emit("pipe",t),E}}}),_1=Xe({"node_modules/util/util.js"(Z){var G=Object.getOwnPropertyDescriptors||function(X){for(var $=Object.keys(X),se={},le=0;le<$.length;le++)se[$[le]]=Object.getOwnPropertyDescriptor(X,$[le]);return se},v=/%[sdj%]/g;Z.format=function(B){if(!w(B)){for(var X=[],$=0;$=le)return Y;switch(Y){case"%s":return String(se[$++]);case"%d":return Number(se[$++]);case"%j":try{return JSON.stringify(se[$++])}catch{return"[Circular]"}default:return Y}}),V=se[$];$"u")return function(){return Z.deprecate(B,X).apply(this,arguments)};var $=!1;function se(){if(!$){if(process.throwDeprecation)throw new Error(X);process.traceDeprecation?console.trace(X):console.error(X),$=!0}return B.apply(this,arguments)}return se};var x={},S=/^$/;E="false",E=E.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),S=new RegExp("^"+E+"$","i");var E;Z.debuglog=function(B){if(B=B.toUpperCase(),!x[B])if(S.test(B)){var X=process.pid;x[B]=function(){var $=Z.format.apply(Z,arguments);console.error("%s %d: %s",B,X,$)}}else x[B]=function(){};return x[B]};function e(B,X){var $={seen:[],stylize:r};return arguments.length>=3&&($.depth=arguments[2]),arguments.length>=4&&($.colors=arguments[3]),p(X)?$.showHidden=X:X&&Z._extend($,X),M($.showHidden)&&($.showHidden=!1),M($.depth)&&($.depth=2),M($.colors)&&($.colors=!1),M($.customInspect)&&($.customInspect=!0),$.colors&&($.stylize=t),a($,B,$.depth)}Z.inspect=e,e.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},e.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function t(B,X){var $=e.styles[X];return $?"\x1B["+e.colors[$][0]+"m"+B+"\x1B["+e.colors[$][1]+"m":B}function r(B,X){return B}function o(B){var X={};return B.forEach(function($,se){X[$]=!0}),X}function a(B,X,$){if(B.customInspect&&X&&y(X.inspect)&&X.inspect!==Z.inspect&&!(X.constructor&&X.constructor.prototype===X)){var se=X.inspect($,B);return w(se)||(se=a(B,se,$)),se}var le=n(B,X);if(le)return le;var fe=Object.keys(X),V=o(fe);if(B.showHidden&&(fe=Object.getOwnPropertyNames(X)),u(X)&&(fe.indexOf("message")>=0||fe.indexOf("description")>=0))return i(X);if(fe.length===0){if(y(X)){var Y=X.name?": "+X.name:"";return B.stylize("[Function"+Y+"]","special")}if(g(X))return B.stylize(RegExp.prototype.toString.call(X),"regexp");if(d(X))return B.stylize(Date.prototype.toString.call(X),"date");if(u(X))return i(X)}var ee="",q=!1,oe=["{","}"];if(m(X)&&(q=!0,oe=["[","]"]),y(X)){var ae=X.name?": "+X.name:"";ee=" [Function"+ae+"]"}if(g(X)&&(ee=" "+RegExp.prototype.toString.call(X)),d(X)&&(ee=" "+Date.prototype.toUTCString.call(X)),u(X)&&(ee=" "+i(X)),fe.length===0&&(!q||X.length==0))return oe[0]+ee+oe[1];if($<0)return g(X)?B.stylize(RegExp.prototype.toString.call(X),"regexp"):B.stylize("[Object]","special");B.seen.push(X);var j;return q?j=s(B,X,$,V,fe):j=fe.map(function(Q){return h(B,X,$,V,Q,q)}),B.seen.pop(),c(j,ee,oe)}function n(B,X){if(M(X))return B.stylize("undefined","undefined");if(w(X)){var $="'"+JSON.stringify(X).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return B.stylize($,"string")}if(_(X))return B.stylize(""+X,"number");if(p(X))return B.stylize(""+X,"boolean");if(T(X))return B.stylize("null","null")}function i(B){return"["+Error.prototype.toString.call(B)+"]"}function s(B,X,$,se,le){for(var fe=[],V=0,Y=X.length;V-1&&(fe?Y=Y.split(` `).map(function(q){return" "+q}).join(` `).slice(2):Y=` `+Y.split(` `).map(function(q){return" "+q}).join(` `))):Y=B.stylize("[Circular]","special")),M(V)){if(fe&&le.match(/^\d+$/))return Y;V=JSON.stringify(""+le),V.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(V=V.slice(1,-1),V=B.stylize(V,"name")):(V=V.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),V=B.stylize(V,"string"))}return V+": "+Y}function c(B,X,$){var se=0,le=B.reduce(function(fe,V){return se++,V.indexOf(` `)>=0&&se++,fe+V.replace(/\u001b\[\d\d?m/g,"").length+1},0);return le>60?$[0]+(X===""?"":X+` `)+" "+B.join(`, `)+" "+$[1]:$[0]+X+" "+B.join(", ")+" "+$[1]}Z.types=GS();function m(B){return Array.isArray(B)}Z.isArray=m;function p(B){return typeof B=="boolean"}Z.isBoolean=p;function T(B){return B===null}Z.isNull=T;function l(B){return B==null}Z.isNullOrUndefined=l;function _(B){return typeof B=="number"}Z.isNumber=_;function w(B){return typeof B=="string"}Z.isString=w;function A(B){return typeof B=="symbol"}Z.isSymbol=A;function M(B){return B===void 0}Z.isUndefined=M;function g(B){return b(B)&&R(B)==="[object RegExp]"}Z.isRegExp=g,Z.types.isRegExp=g;function b(B){return typeof B=="object"&&B!==null}Z.isObject=b;function d(B){return b(B)&&R(B)==="[object Date]"}Z.isDate=d,Z.types.isDate=d;function u(B){return b(B)&&(R(B)==="[object Error]"||B instanceof Error)}Z.isError=u,Z.types.isNativeError=u;function y(B){return typeof B=="function"}Z.isFunction=y;function f(B){return B===null||typeof B=="boolean"||typeof B=="number"||typeof B=="string"||typeof B=="symbol"||typeof B>"u"}Z.isPrimitive=f,Z.isBuffer=HS();function R(B){return Object.prototype.toString.call(B)}function L(B){return B<10?"0"+B.toString(10):B.toString(10)}var z=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function F(){var B=new Date,X=[L(B.getHours()),L(B.getMinutes()),L(B.getSeconds())].join(":");return[B.getDate(),z[B.getMonth()],X].join(" ")}Z.log=function(){console.log("%s - %s",F(),Z.format.apply(Z,arguments))},Z.inherits=Kv(),Z._extend=function(B,X){if(!X||!b(X))return B;for(var $=Object.keys(X),se=$.length;se--;)B[$[se]]=X[$[se]];return B};function N(B,X){return Object.prototype.hasOwnProperty.call(B,X)}var O=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;Z.promisify=function(X){if(typeof X!="function")throw new TypeError('The "original" argument must be of type Function');if(O&&X[O]){var $=X[O];if(typeof $!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty($,O,{value:$,enumerable:!1,writable:!1,configurable:!0}),$}function $(){for(var se,le,fe=new Promise(function(ee,q){se=ee,le=q}),V=[],Y=0;Y"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function h(M){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(b){return b.__proto__||Object.getPrototypeOf(b)},h(M)}var c={},m,p;function T(M,g,b){b||(b=Error);function d(y,f,R){return typeof g=="string"?g:g(y,f,R)}var u=function(y){r(R,y);var f=a(R);function R(L,z,F){var N;return t(this,R),N=f.call(this,d(L,z,F)),N.code=M,N}return S(R)}(b);c[M]=u}function l(M,g){if(Array.isArray(M)){var b=M.length;return M=M.map(function(d){return String(d)}),b>2?"one of ".concat(g," ").concat(M.slice(0,b-1).join(", "),", or ")+M[b-1]:b===2?"one of ".concat(g," ").concat(M[0]," or ").concat(M[1]):"of ".concat(g," ").concat(M[0])}else return"of ".concat(g," ").concat(String(M))}function _(M,g,b){return M.substr(!b||b<0?0:+b,g.length)===g}function w(M,g,b){return(b===void 0||b>M.length)&&(b=M.length),M.substring(b-g.length,b)===g}function A(M,g,b){return typeof b!="number"&&(b=0),b+g.length>M.length?!1:M.indexOf(g,b)!==-1}T("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),T("ERR_INVALID_ARG_TYPE",function(M,g,b){m===void 0&&(m=K_()),m(typeof M=="string","'name' must be a string");var d;typeof g=="string"&&_(g,"not ")?(d="must not be",g=g.replace(/^not /,"")):d="must be";var u;if(w(M," argument"))u="The ".concat(M," ").concat(d," ").concat(l(g,"type"));else{var y=A(M,".")?"property":"argument";u='The "'.concat(M,'" ').concat(y," ").concat(d," ").concat(l(g,"type"))}return u+=". Received type ".concat(v(b)),u},TypeError),T("ERR_INVALID_ARG_VALUE",function(M,g){var b=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";p===void 0&&(p=_1());var d=p.inspect(g);return d.length>128&&(d="".concat(d.slice(0,128),"...")),"The argument '".concat(M,"' ").concat(b,". Received ").concat(d)},TypeError,RangeError),T("ERR_INVALID_RETURN_VALUE",function(M,g,b){var d;return b&&b.constructor&&b.constructor.name?d="instance of ".concat(b.constructor.name):d="type ".concat(v(b)),"Expected ".concat(M,' to be returned from the "').concat(g,'"')+" function but got ".concat(d,".")},TypeError),T("ERR_MISSING_ARGS",function(){for(var M=arguments.length,g=new Array(M),b=0;b0,"At least one arg needs to be specified");var d="The ",u=g.length;switch(g=g.map(function(y){return'"'.concat(y,'"')}),u){case 1:d+="".concat(g[0]," argument");break;case 2:d+="".concat(g[0]," and ").concat(g[1]," arguments");break;default:d+=g.slice(0,u-1).join(", "),d+=", and ".concat(g[u-1]," arguments");break}return"".concat(d," must be specified")},TypeError),G.exports.codes=c}}),ZO=Xe({"node_modules/assert/build/internal/assert/assertion_error.js"(Z,G){"use strict";function v(U,B){var X=Object.keys(U);if(Object.getOwnPropertySymbols){var $=Object.getOwnPropertySymbols(U);B&&($=$.filter(function(se){return Object.getOwnPropertyDescriptor(U,se).enumerable})),X.push.apply(X,$)}return X}function x(U){for(var B=1;B"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function p(U){return Function.toString.call(U).indexOf("[native code]")!==-1}function T(U,B){return T=Object.setPrototypeOf?Object.setPrototypeOf.bind():function($,se){return $.__proto__=se,$},T(U,B)}function l(U){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(X){return X.__proto__||Object.getPrototypeOf(X)},l(U)}function _(U){"@babel/helpers - typeof";return _=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(B){return typeof B}:function(B){return B&&typeof Symbol=="function"&&B.constructor===Symbol&&B!==Symbol.prototype?"symbol":typeof B},_(U)}var w=_1(),A=w.inspect,M=QS(),g=M.codes.ERR_INVALID_ARG_TYPE;function b(U,B,X){return(X===void 0||X>U.length)&&(X=U.length),U.substring(X-B.length,X)===B}function d(U,B){if(B=Math.floor(B),U.length==0||B==0)return"";var X=U.length*B;for(B=Math.floor(Math.log(B)/Math.log(2));B;)U+=U,B--;return U+=U.substring(0,X-U.length),U}var u="",y="",f="",R="",L={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"},z=10;function F(U){var B=Object.keys(U),X=Object.create(Object.getPrototypeOf(U));return B.forEach(function($){X[$]=U[$]}),Object.defineProperty(X,"message",{value:U.message}),X}function N(U){return A(U,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function O(U,B,X){var $="",se="",le=0,fe="",V=!1,Y=N(U),ee=Y.split(` `),q=N(B).split(` `),oe=0,ae="";if(X==="strictEqual"&&_(U)==="object"&&_(B)==="object"&&U!==null&&B!==null&&(X="strictEqualObject"),ee.length===1&&q.length===1&&ee[0]!==q[0]){var j=ee[0].length+q[0].length;if(j<=z){if((_(U)!=="object"||U===null)&&(_(B)!=="object"||B===null)&&(U!==0||B!==0))return"".concat(L[X],` `)+"".concat(ee[0]," !== ").concat(q[0],` `)}else if(X!=="strictEqualObject"){var Q=process.stderr&&process.stderr.isTTY?process.stderr.columns:80;if(j2&&(ae=` `.concat(d(" ",oe),"^"),oe=0)}}}for(var re=ee[ee.length-1],ce=q[q.length-1];re===ce&&(oe++<2?fe=` `.concat(re).concat(fe):$=re,ee.pop(),q.pop(),!(ee.length===0||q.length===0));)re=ee[ee.length-1],ce=q[q.length-1];var be=Math.max(ee.length,q.length);if(be===0){var Ae=Y.split(` `);if(Ae.length>30)for(Ae[26]="".concat(u,"...").concat(R);Ae.length>27;)Ae.pop();return"".concat(L.notIdentical,` `).concat(Ae.join(` `),` `)}oe>3&&(fe=` `.concat(u,"...").concat(R).concat(fe),V=!0),$!==""&&(fe=` `.concat($).concat(fe),$="");var De=0,ze=L[X]+` `.concat(y,"+ actual").concat(R," ").concat(f,"- expected").concat(R),Ze=" ".concat(u,"...").concat(R," Lines skipped");for(oe=0;oe1&&oe>2&&(at>4?(se+=` `.concat(u,"...").concat(R),V=!0):at>3&&(se+=` `.concat(q[oe-2]),De++),se+=` `.concat(q[oe-1]),De++),le=oe,$+=` `.concat(f,"-").concat(R," ").concat(q[oe]),De++;else if(q.length1&&oe>2&&(at>4?(se+=` `.concat(u,"...").concat(R),V=!0):at>3&&(se+=` `.concat(ee[oe-2]),De++),se+=` `.concat(ee[oe-1]),De++),le=oe,se+=` `.concat(y,"+").concat(R," ").concat(ee[oe]),De++;else{var nt=q[oe],rt=ee[oe],st=rt!==nt&&(!b(rt,",")||rt.slice(0,-1)!==nt);st&&b(nt,",")&&nt.slice(0,-1)===rt&&(st=!1,rt+=","),st?(at>1&&oe>2&&(at>4?(se+=` `.concat(u,"...").concat(R),V=!0):at>3&&(se+=` `.concat(ee[oe-2]),De++),se+=` `.concat(ee[oe-1]),De++),le=oe,se+=` `.concat(y,"+").concat(R," ").concat(rt),$+=` `.concat(f,"-").concat(R," ").concat(nt),De+=2):(se+=$,$="",(at===1||oe===0)&&(se+=` `.concat(rt),De++))}if(De>20&&oe30)for(j[26]="".concat(u,"...").concat(R);j.length>27;)j.pop();j.length===1?le=X.call(this,"".concat(ae," ").concat(j[0])):le=X.call(this,"".concat(ae,` `).concat(j.join(` `),` `))}else{var Q=N(ee),re="",ce=L[V];V==="notDeepEqual"||V==="notEqual"?(Q="".concat(L[V],` `).concat(Q),Q.length>1024&&(Q="".concat(Q.slice(0,1021),"..."))):(re="".concat(N(q)),Q.length>512&&(Q="".concat(Q.slice(0,509),"...")),re.length>512&&(re="".concat(re.slice(0,509),"...")),V==="deepEqual"||V==="equal"?Q="".concat(ce,` `).concat(Q,` should equal `):re=" ".concat(V," ").concat(re)),le=X.call(this,"".concat(Q).concat(re))}return Error.stackTraceLimit=oe,le.generatedMessage=!fe,Object.defineProperty(s(le),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),le.code="ERR_ASSERTION",le.actual=ee,le.expected=q,le.operator=V,Error.captureStackTrace&&Error.captureStackTrace(s(le),Y),le.stack,le.name="AssertionError",i(le)}return t($,[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:B,value:function(le,fe){return A(this,x(x({},fe),{},{customInspect:!1,depth:0}))}}]),$}(h(Error),A.custom);G.exports=P}}),eM=Xe({"node_modules/object-keys/isArguments.js"(Z,G){"use strict";var v=Object.prototype.toString;G.exports=function(S){var E=v.call(S),e=E==="[object Arguments]";return e||(e=E!=="[object Array]"&&S!==null&&typeof S=="object"&&typeof S.length=="number"&&S.length>=0&&v.call(S.callee)==="[object Function]"),e}}}),YO=Xe({"node_modules/object-keys/implementation.js"(Z,G){"use strict";var v;Object.keys||(x=Object.prototype.hasOwnProperty,S=Object.prototype.toString,E=eM(),e=Object.prototype.propertyIsEnumerable,t=!e.call({toString:null},"toString"),r=e.call(function(){},"prototype"),o=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],a=function(h){var c=h.constructor;return c&&c.prototype===h},n={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},i=function(){if(typeof window>"u")return!1;for(var h in window)try{if(!n["$"+h]&&x.call(window,h)&&window[h]!==null&&typeof window[h]=="object")try{a(window[h])}catch{return!0}}catch{return!0}return!1}(),s=function(h){if(typeof window>"u"||!i)return a(h);try{return a(h)}catch{return!1}},v=function(c){var m=c!==null&&typeof c=="object",p=S.call(c)==="[object Function]",T=E(c),l=m&&S.call(c)==="[object String]",_=[];if(!m&&!p&&!T)throw new TypeError("Object.keys called on a non-object");var w=r&&p;if(l&&c.length>0&&!x.call(c,0))for(var A=0;A0)for(var M=0;M2?arguments[2]:{},c=v(s);x&&(c=E.call(c,Object.getOwnPropertySymbols(s)));for(var m=0;mMe.length)&&(ye=Me.length);for(var he=0,Oe=new Array(ye);he10)return!0;for(var ye=0;ye57)return!0}return Me.length===10&&Me>=Math.pow(2,32)}function P(Me){return Object.keys(Me).filter(O).concat(s(Me).filter(Object.prototype.propertyIsEnumerable.bind(Me)))}function U(Me,ye){if(Me===ye)return 0;for(var he=Me.length,Oe=ye.length,tt=0,ot=Math.min(he,Oe);tt1?q-1:0),ae=1;ae1?q-1:0),ae=1;ae1?q-1:0),ae=1;ae1?q-1:0),ae=1;ae0)return t(n);if(s==="number"&&isNaN(n)===!1)return i.long?o(n):r(n);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(n))};function t(n){if(n=String(n),!(n.length>100)){var i=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(n);if(i){var s=parseFloat(i[1]),h=(i[2]||"ms").toLowerCase();switch(h){case"years":case"year":case"yrs":case"yr":case"y":return s*e;case"days":case"day":case"d":return s*E;case"hours":case"hour":case"hrs":case"hr":case"h":return s*S;case"minutes":case"minute":case"mins":case"min":case"m":return s*x;case"seconds":case"second":case"secs":case"sec":case"s":return s*v;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}function r(n){return n>=E?Math.round(n/E)+"d":n>=S?Math.round(n/S)+"h":n>=x?Math.round(n/x)+"m":n>=v?Math.round(n/v)+"s":n+"ms"}function o(n){return a(n,E,"day")||a(n,S,"hour")||a(n,x,"minute")||a(n,v,"second")||n+" ms"}function a(n,i,s){if(!(n=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}Z.formatters.j=function(r){try{return JSON.stringify(r)}catch(o){return"[UnexpectedJSONParseError]: "+o.message}};function x(r){var o=this.useColors;if(r[0]=(o?"%c":"")+this.namespace+(o?" %c":" ")+r[0]+(o?"%c ":" ")+"+"+Z.humanize(this.diff),!!o){var a="color: "+this.color;r.splice(1,0,a,"color: inherit");var n=0,i=0;r[0].replace(/%[a-zA-Z%]/g,function(s){s!=="%%"&&(n++,s==="%c"&&(i=n))}),r.splice(i,0,a)}}function S(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function E(r){try{r==null?Z.storage.removeItem("debug"):Z.storage.debug=r}catch{}}function e(){var r;try{r=Z.storage.debug}catch{}return!r&&typeof process<"u"&&"env"in process&&(r=process.env.DEBUG),r}Z.enable(e());function t(){try{return window.localStorage}catch{}}}}),oB=Xe({"node_modules/stream-parser/index.js"(Z,G){var v=K_(),x=nB()("stream-parser");G.exports=r;var S=-1,E=0,e=1,t=2;function r(l){var _=l&&typeof l._transform=="function",w=l&&typeof l._write=="function";if(!_&&!w)throw new Error("must pass a Writable or Transform stream in");x("extending Parser into stream"),l._bytes=a,l._skipBytes=n,_&&(l._passthrough=i),_?l._transform=h:l._write=s}function o(l){x("initializing parser stream"),l._parserBytesLeft=0,l._parserBuffers=[],l._parserBuffered=0,l._parserState=S,l._parserCallback=null,typeof l.push=="function"&&(l._parserOutput=l.push.bind(l)),l._parserInit=!0}function a(l,_){v(!this._parserCallback,'there is already a "callback" set!'),v(isFinite(l)&&l>0,'can only buffer a finite number of bytes > 0, got "'+l+'"'),this._parserInit||o(this),x("buffering %o bytes",l),this._parserBytesLeft=l,this._parserCallback=_,this._parserState=E}function n(l,_){v(!this._parserCallback,'there is already a "callback" set!'),v(l>0,'can only skip > 0 bytes, got "'+l+'"'),this._parserInit||o(this),x("skipping %o bytes",l),this._parserBytesLeft=l,this._parserCallback=_,this._parserState=e}function i(l,_){v(!this._parserCallback,'There is already a "callback" set!'),v(l>0,'can only pass through > 0 bytes, got "'+l+'"'),this._parserInit||o(this),x("passing through %o bytes",l),this._parserBytesLeft=l,this._parserCallback=_,this._parserState=t}function s(l,_,w){this._parserInit||o(this),x("write(%o bytes)",l.length),typeof _=="function"&&(w=_),p(this,l,null,w)}function h(l,_,w){this._parserInit||o(this),x("transform(%o bytes)",l.length),typeof _!="function"&&(_=this._parserOutput),p(this,l,_,w)}function c(l,_,w,A){return l._parserBytesLeft<=0?A(new Error("got data but not currently parsing anything")):_.length<=l._parserBytesLeft?function(){return m(l,_,w,A)}:function(){var M=_.slice(0,l._parserBytesLeft);return m(l,M,w,function(g){if(g)return A(g);if(_.length>M.length)return function(){return c(l,_.slice(M.length),w,A)}})}}function m(l,_,w,A){if(l._parserBytesLeft-=_.length,x("%o bytes left for stream piece",l._parserBytesLeft),l._parserState===E?(l._parserBuffers.push(_),l._parserBuffered+=_.length):l._parserState===t&&w(_),l._parserBytesLeft===0){var M=l._parserCallback;if(M&&l._parserState===E&&l._parserBuffers.length>1&&(_=Buffer.concat(l._parserBuffers,l._parserBuffered)),l._parserState!==E&&(_=null),l._parserCallback=null,l._parserBuffered=0,l._parserState=S,l._parserBuffers.splice(0),M){var g=[];_&&g.push(_),w&&g.push(w);var b=M.length>g.length;b&&g.push(T(A));var d=M.apply(l,g);if(!b||A===d)return A}}else return A}var p=T(c);function T(l){return function(){for(var _=l.apply(this,arguments);typeof _=="function";)_=_();return _}}}}),ac=Xe({"node_modules/probe-image-size/lib/common.js"(Z){"use strict";var G=XO().Transform,v=oB();function x(){G.call(this,{readableObjectMode:!0})}x.prototype=Object.create(G.prototype),x.prototype.constructor=x,v(x.prototype),Z.ParserStream=x,Z.sliceEq=function(E,e,t){for(var r=e,o=0;o>4&15,c=i[4]&15,m=i[5]>>4&15,p=v(i,6),T=8,l=0;lp.width||m.width===p.width&&m.height>p.height?m:p}),h=i.reduce(function(m,p){return m.height>p.height||m.height===p.height&&m.width>p.width?m:p}),c;return s.width>h.height||s.width===h.height&&s.height>h.width?c=s:c=h,c}G.exports.readSizeFromMeta=function(i){var s={sizes:[],transforms:[],item_inf:{},item_loc:{}};if(a(i,s),!!s.sizes.length){var h=n(s.sizes),c=1;s.transforms.forEach(function(p){var T={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},l={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if(p.type==="imir"&&(p.value===0?c=l[c]:(c=l[c],c=T[c],c=T[c])),p.type==="irot")for(var _=0;_0&&!this.aborted;){var t=this.ifds_to_read.shift();t.offset&&this.scan_ifd(t.id,t.offset,E)}},S.prototype.read_uint16=function(E){var e=this.input;if(E+2>e.length)throw v("unexpected EOF","EBADDATA");return this.big_endian?e[E]*256+e[E+1]:e[E]+e[E+1]*256},S.prototype.read_uint32=function(E){var e=this.input;if(E+4>e.length)throw v("unexpected EOF","EBADDATA");return this.big_endian?e[E]*16777216+e[E+1]*65536+e[E+2]*256+e[E+3]:e[E]+e[E+1]*256+e[E+2]*65536+e[E+3]*16777216},S.prototype.is_subifd_link=function(E,e){return E===0&&e===34665||E===0&&e===34853||E===34665&&e===40965},S.prototype.exif_format_length=function(E){switch(E){case 1:case 2:case 6:case 7:return 1;case 3:case 8:return 2;case 4:case 9:case 11:return 4;case 5:case 10:case 12:return 8;default:return 0}},S.prototype.exif_format_read=function(E,e){var t;switch(E){case 1:case 2:return t=this.input[e],t;case 6:return t=this.input[e],t|(t&128)*33554430;case 3:return t=this.read_uint16(e),t;case 8:return t=this.read_uint16(e),t|(t&32768)*131070;case 4:return t=this.read_uint32(e),t;case 9:return t=this.read_uint32(e),t|0;case 5:case 10:case 11:case 12:return null;case 7:return null;default:return null}},S.prototype.scan_ifd=function(E,e,t){var r=this.read_uint16(e);e+=2;for(var o=0;othis.input.length)throw v("unexpected EOF","EBADDATA");for(var p=[],T=c,l=0;l0&&(this.ifds_to_read.push({id:a,offset:p[0]}),m=!0);var w={is_big_endian:this.big_endian,ifd:E,tag:a,format:n,count:i,entry_offset:e+this.start,data_length:h,data_offset:c+this.start,value:p,is_subifd_link:m};if(t(w)===!1){this.aborted=!0;return}e+=12}E===0&&this.ifds_to_read.push({id:1,offset:this.read_uint32(e)})},G.exports.ExifParser=S,G.exports.get_orientation=function(E){var e=0;try{return new S(E,0,E.length).each(function(t){if(t.ifd===0&&t.tag===274&&Array.isArray(t.value))return e=t.value[0],!1}),e}catch{return-1}}}}),lB=Xe({"node_modules/probe-image-size/lib/parse_sync/avif.js"(Z,G){"use strict";var v=ac().str2arr,x=ac().sliceEq,S=ac().readUInt32BE,E=sB(),e=y3(),t=v("ftyp");G.exports=function(r){if(x(r,4,t)){var o=E.unbox(r,0);if(o){var a=E.getMimeType(o.data);if(a){for(var n,i=o.end;;){var s=E.unbox(r,i);if(!s)break;if(i=s.end,s.boxtype==="mdat")return;if(s.boxtype==="meta"){n=s.data;break}}if(n){var h=E.readSizeFromMeta(n);if(h){var c={width:h.width,height:h.height,type:a.type,mime:a.mime,wUnits:"px",hUnits:"px"};if(h.variants.length>1&&(c.variants=h.variants),h.orientation&&(c.orientation=h.orientation),h.exif_location&&h.exif_location.offset+h.exif_location.length<=r.length){var m=S(r,h.exif_location.offset),p=r.slice(h.exif_location.offset+m+4,h.exif_location.offset+h.exif_location.length),T=e.get_orientation(p);T>0&&(c.orientation=T)}return c}}}}}}}}),uB=Xe({"node_modules/probe-image-size/lib/parse_sync/bmp.js"(Z,G){"use strict";var v=ac().str2arr,x=ac().sliceEq,S=ac().readUInt16LE,E=v("BM");G.exports=function(e){if(!(e.length<26)&&x(e,0,E))return{width:S(e,18),height:S(e,22),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}}}}),cB=Xe({"node_modules/probe-image-size/lib/parse_sync/gif.js"(Z,G){"use strict";var v=ac().str2arr,x=ac().sliceEq,S=ac().readUInt16LE,E=v("GIF87a"),e=v("GIF89a");G.exports=function(t){if(!(t.length<10)&&!(!x(t,0,E)&&!x(t,0,e)))return{width:S(t,6),height:S(t,8),type:"gif",mime:"image/gif",wUnits:"px",hUnits:"px"}}}}),fB=Xe({"node_modules/probe-image-size/lib/parse_sync/ico.js"(Z,G){"use strict";var v=ac().readUInt16LE,x=0,S=1,E=16;G.exports=function(e){var t=v(e,0),r=v(e,2),o=v(e,4);if(!(t!==x||r!==S||!o)){for(var a=[],n={width:0,height:0},i=0;in.width||h>n.height)&&(n=c)}return{width:n.width,height:n.height,variants:a,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}}}}}),hB=Xe({"node_modules/probe-image-size/lib/parse_sync/jpeg.js"(Z,G){"use strict";var v=ac().readUInt16BE,x=ac().str2arr,S=ac().sliceEq,E=y3(),e=x("Exif\0\0");G.exports=function(t){if(!(t.length<2)&&!(t[0]!==255||t[1]!==216||t[2]!==255))for(var r=2;;){for(;;){if(t.length-r<2)return;if(t[r++]===255)break}for(var o=t[r++],a;o===255;)o=t[r++];if(208<=o&&o<=217||o===1)a=0;else if(192<=o&&o<=254){if(t.length-r<2)return;a=v(t,r)-2,r+=2}else return;if(o===217||o===218)return;var n;if(o===225&&a>=10&&S(t,r,e)&&(n=E.get_orientation(t.slice(r+6,r+a))),a>=5&&192<=o&&o<=207&&o!==196&&o!==200&&o!==204){if(t.length-r0&&(i.orientation=n),i}r+=a}}}}),pB=Xe({"node_modules/probe-image-size/lib/parse_sync/png.js"(Z,G){"use strict";var v=ac().str2arr,x=ac().sliceEq,S=ac().readUInt32BE,E=v(`\x89PNG\r  `),e=v("IHDR");G.exports=function(t){if(!(t.length<24)&&x(t,0,E)&&x(t,12,e))return{width:S(t,16),height:S(t,20),type:"png",mime:"image/png",wUnits:"px",hUnits:"px"}}}}),dB=Xe({"node_modules/probe-image-size/lib/parse_sync/psd.js"(Z,G){"use strict";var v=ac().str2arr,x=ac().sliceEq,S=ac().readUInt32BE,E=v("8BPS\0");G.exports=function(e){if(!(e.length<22)&&x(e,0,E))return{width:S(e,18),height:S(e,14),type:"psd",mime:"image/vnd.adobe.photoshop",wUnits:"px",hUnits:"px"}}}}),vB=Xe({"node_modules/probe-image-size/lib/parse_sync/svg.js"(Z,G){"use strict";function v(s){return s===32||s===9||s===13||s===10}function x(s){return typeof s=="number"&&isFinite(s)&&s>0}function S(s){var h=0,c=s.length;for(s[0]===239&&s[1]===187&&s[2]===191&&(h=3);h]*>/,e=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,t=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,r=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,o=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,a=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function n(s){var h=s.match(t),c=s.match(r),m=s.match(o);return{width:h&&(h[1]||h[2]),height:c&&(c[1]||c[2]),viewbox:m&&(m[1]||m[2])}}function i(s){return a.test(s)?s.match(a)[0]:"px"}G.exports=function(s){if(S(s)){for(var h="",c=0;c>14&16383)+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}function n(i,s){return{width:(i[s+6]<<16|i[s+5]<<8|i[s+4])+1,height:(i[s+9]<i.length)){for(;s+8=10?h=h||o(i,s+8):p==="VP8L"&&T>=9?h=h||a(i,s+8):p==="VP8X"&&T>=10?h=h||n(i,s+8):p==="EXIF"&&(c=e.get_orientation(i.slice(s+8,s+8+T)),s=1/0),s+=8+T}if(h)return c>0&&(h.orientation=c),h}}}}}),yB=Xe({"node_modules/probe-image-size/lib/parsers_sync.js"(Z,G){"use strict";G.exports={avif:lB(),bmp:uB(),gif:cB(),ico:fB(),jpeg:hB(),png:pB(),psd:dB(),svg:vB(),tiff:mB(),webp:gB()}}}),_B=Xe({"node_modules/probe-image-size/sync.js"(Z,G){"use strict";var v=yB();function x(S){for(var E=Object.keys(v),e=0;e0;)R=h.c2p(M+N*u),N--;for(N=0;z===void 0&&N0;)F=c.c2p(g+N*y),N--;if(RV[0];if(Y||ee){var q=f+P/2,oe=z+U/2;le+="transform:"+S(q+"px",oe+"px")+"scale("+(Y?-1:1)+","+(ee?-1:1)+")"+S(-q+"px",-oe+"px")+";"}}se.attr("style",le);var ae=new Promise(function(j){if(_._hasZ)j();else if(_._hasSource)if(_._canvas&&_._canvas.el.width===b&&_._canvas.el.height===d&&_._canvas.source===_.source)j();else{var Q=document.createElement("canvas");Q.width=b,Q.height=d;var re=Q.getContext("2d",{willReadFrequently:!0});_._image=_._image||new Image;var ce=_._image;ce.onload=function(){re.drawImage(ce,0,0),_._canvas={el:Q,source:_.source},j()},ce.setAttribute("src",_.source)}}).then(function(){var j,Q;if(_._hasZ)Q=$(function(be,Ae){var De=A[Ae][be];return x.isTypedArray(De)&&(De=Array.from(De)),De}),j=Q.toDataURL("image/png");else if(_._hasSource)if(w)j=_.source;else{var re=_._canvas.el.getContext("2d",{willReadFrequently:!0}),ce=re.getImageData(0,0,b,d).data;Q=$(function(be,Ae){var De=4*(Ae*b+be);return[ce[De],ce[De+1],ce[De+2],ce[De+3]]}),j=Q.toDataURL("image/png")}se.attr({"xlink:href":j,height:U,width:P,x:f,y:z})});a._promises.push(ae)})}}}),TB=Xe({"src/traces/image/style.js"(Z,G){"use strict";var v=Hn();G.exports=function(S){v.select(S).selectAll(".im image").style("opacity",function(E){return E[0].trace.opacity})}}}),AB=Xe({"src/traces/image/hover.js"(Z,G){"use strict";var v=rf(),x=sa(),S=x.isArrayOrTypedArray,E=v1();G.exports=function(t,r,o){var a=t.cd[0],n=a.trace,i=t.xa,s=t.ya;if(!(v.inbox(r-a.x0,r-(a.x0+a.w*n.dx),0)>0||v.inbox(o-a.y0,o-(a.y0+a.h*n.dy),0)>0)){var h=Math.floor((r-a.x0)/n.dx),c=Math.floor(Math.abs(o-a.y0)/n.dy),m;if(n._hasZ?m=a.z[c][h]:n._hasSource&&(m=n._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(h,c,1,1).data),!!m){var p=a.hi||n.hoverinfo,T;if(p){var l=p.split("+");l.indexOf("all")!==-1&&(l=["color"]),l.indexOf("color")!==-1&&(T=!0)}var _=E.colormodel[n.colormodel],w=_.colormodel||n.colormodel,A=w.length,M=n._scaler(m),g=_.suffix,b=[];(n.hovertemplate||T)&&(b.push("["+[M[0]+g[0],M[1]+g[1],M[2]+g[2]].join(", ")),A===4&&b.push(", "+M[3]+g[3]),b.push("]"),b=b.join(""),t.extraText=w.toUpperCase()+": "+b);var d;S(n.hovertext)&&S(n.hovertext[c])?d=n.hovertext[c][h]:S(n.text)&&S(n.text[c])&&(d=n.text[c][h]);var u=s.c2p(a.y0+(c+.5)*n.dy),y=a.x0+(h+.5)*n.dx,f=a.y0+(c+.5)*n.dy,R="["+m.slice(0,n.colormodel.length).join(", ")+"]";return[x.extendFlat(t,{index:[c,h],x0:i.c2p(a.x0+h*n.dx),x1:i.c2p(a.x0+(h+1)*n.dx),y0:u,y1:u,color:M,xVal:y,xLabelVal:y,yVal:f,yLabelVal:f,zLabelVal:R,text:d,hovertemplateLabels:{zLabel:R,colorLabel:b,"color[0]Label":M[0]+g[0],"color[1]Label":M[1]+g[1],"color[2]Label":M[2]+g[2],"color[3]Label":M[3]+g[3]}})]}}}}}),SB=Xe({"src/traces/image/event_data.js"(Z,G){"use strict";G.exports=function(x,S){return"xVal"in S&&(x.x=S.xVal),"yVal"in S&&(x.y=S.yVal),S.xa&&(x.xaxis=S.xa),S.ya&&(x.yaxis=S.ya),x.color=S.color,x.colormodel=S.trace.colormodel,x.z||(x.z=S.color),x}}}),MB=Xe({"src/traces/image/index.js"(Z,G){"use strict";G.exports={attributes:DS(),supplyDefaults:lO(),calc:bB(),plot:wB(),style:TB(),hoverPoints:AB(),eventData:SB(),moduleType:"trace",name:"image",basePlotModule:Kf(),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{}}}}),EB=Xe({"lib/image.js"(Z,G){"use strict";G.exports=MB()}}),og=Xe({"src/traces/pie/attributes.js"(Z,G){"use strict";var v=ru(),x=wc().attributes,S=tc(),E=sh(),{hovertemplateAttrs:e,texttemplateAttrs:t,templatefallbackAttrs:r}=Jl(),o=Qo().extendFlat,a=Gh().pattern,n=S({editType:"plot",arrayOk:!0,colorEditType:"plot"});G.exports={labels:{valType:"data_array",editType:"calc"},label0:{valType:"number",dflt:0,editType:"calc"},dlabel:{valType:"number",dflt:1,editType:"calc"},values:{valType:"data_array",editType:"calc"},marker:{colors:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:E.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},pattern:a,editType:"calc"},text:{valType:"data_array",editType:"plot"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style"},scalegroup:{valType:"string",dflt:"",editType:"calc"},textinfo:{valType:"flaglist",flags:["label","text","value","percent"],extras:["none"],editType:"calc"},hoverinfo:o({},v.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:e({},{keys:["label","color","value","percent","text"]}),hovertemplatefallback:r(),texttemplate:t({editType:"plot"},{keys:["label","color","value","percent","text"]}),texttemplatefallback:r({editType:"plot"}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:o({},n,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:o({},n,{}),outsidetextfont:o({},n,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},showlegend:o({},v.showlegend,{arrayOk:!0}),legend:o({},v.legend,{arrayOk:!0}),title:{text:{valType:"string",dflt:"",editType:"plot"},font:o({},n,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:x({name:"pie",trace:!0,editType:"calc"}),hole:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},sort:{valType:"boolean",dflt:!0,editType:"calc"},direction:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"counterclockwise",editType:"calc"},rotation:{valType:"angle",dflt:0,editType:"calc"},pull:{valType:"number",min:0,max:1,dflt:0,arrayOk:!0,editType:"calc"}}}}),sg=Xe({"src/traces/pie/defaults.js"(Z,G){"use strict";var v=rs(),x=sa(),S=og(),E=wc().defaults,e=gd().handleText,t=sa().coercePattern;function r(n,i){var s=x.isArrayOrTypedArray(n),h=x.isArrayOrTypedArray(i),c=Math.min(s?n.length:1/0,h?i.length:1/0);if(isFinite(c)||(c=0),c&&h){for(var m,p=0;p0){m=!0;break}}m||(c=0)}return{hasLabels:s,hasValues:h,len:c}}function o(n,i,s,h,c){var m=h("marker.line.width");m&&h("marker.line.color",c?void 0:s.paper_bgcolor);var p=h("marker.colors");t(h,"marker.pattern",p),n.marker&&!i.marker.pattern.fgcolor&&(i.marker.pattern.fgcolor=n.marker.colors),i.marker.pattern.bgcolor||(i.marker.pattern.bgcolor=s.paper_bgcolor)}function a(n,i,s,h){function c(f,R){return x.coerce(n,i,S,f,R)}var m=c("labels"),p=c("values"),T=r(m,p),l=T.len;if(i._hasLabels=T.hasLabels,i._hasValues=T.hasValues,!i._hasLabels&&i._hasValues&&(c("label0"),c("dlabel")),!l){i.visible=!1;return}i._length=l,o(n,i,h,c,!0),c("scalegroup");var _=c("text"),w=c("texttemplate");c("texttemplatefallback");var A;if(w||(A=c("textinfo",x.isArrayOrTypedArray(_)?"text+percent":"percent")),c("hovertext"),c("hovertemplate"),c("hovertemplatefallback"),w||A&&A!=="none"){var M=c("textposition");e(n,i,h,c,M,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1});var g=Array.isArray(M)||M==="auto",b=g||M==="outside";b&&c("automargin"),(M==="inside"||M==="auto"||Array.isArray(M))&&c("insidetextorientation")}else A==="none"&&c("textposition","none");E(i,h,c);var d=c("hole"),u=c("title.text");if(u){var y=c("title.position",d?"middle center":"top center");!d&&y==="middle center"&&(i.title.position="top center"),x.coerceFont(c,"title.font",h.font)}c("sort"),c("direction"),c("rotation"),c("pull")}G.exports={handleLabelsAndValues:r,handleMarkerDefaults:o,supplyDefaults:a}}}),_3=Xe({"src/traces/pie/layout_attributes.js"(Z,G){"use strict";G.exports={hiddenlabels:{valType:"data_array",editType:"calc"},piecolorway:{valType:"colorlist",editType:"calc"},extendpiecolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),kB=Xe({"src/traces/pie/layout_defaults.js"(Z,G){"use strict";var v=sa(),x=_3();G.exports=function(E,e){function t(r,o){return v.coerce(E,e,x,r,o)}t("hiddenlabels"),t("piecolorway",e.colorway),t("extendpiecolors")}}}),x1=Xe({"src/traces/pie/calc.js"(Z,G){"use strict";var v=rs(),x=Ch(),S=$n(),E={};function e(a,n){var i=[],s=a._fullLayout,h=s.hiddenlabels||[],c=n.labels,m=n.marker.colors||[],p=n.values,T=n._length,l=n._hasValues&&T,_,w;if(n.dlabel)for(c=new Array(T),_=0;_=0});var R=n.type==="funnelarea"?b:n.sort;return R&&i.sort(function(L,z){return z.v-L.v}),i[0]&&(i[0].vTotal=g),i}function t(a){return function(i,s){return!i||(i=x(i),!i.isValid())?!1:(i=S.addOpacity(i,i.getAlpha()),a[s]||(a[s]=i),i)}}function r(a,n){var i=(n||{}).type;i||(i="pie");var s=a._fullLayout,h=a.calcdata,c=s[i+"colorway"],m=s["_"+i+"colormap"];s["extend"+i+"colors"]&&(c=o(c,E));for(var p=0,T=0;T0&&(tt+=It*he.pxmid[0],ot+=It*he.pxmid[1])}he.cxFinal=tt,he.cyFinal=ot;function qt(wt,Ne,Ke,Te){var Ie=Te*(Ne[0]-wt[0]),Ve=Te*(Ne[1]-wt[1]);return"a"+Te*ce.r+","+Te*ce.r+" 0 "+he.largeArc+(Ke?" 1 ":" 0 ")+Ie+","+Ve}var Wt=be.hole;if(he.v===ce.vTotal){var kr="M"+(tt+he.px0[0])+","+(ot+he.px0[1])+qt(he.px0,he.pxmid,!0,1)+qt(he.pxmid,he.px0,!0,1)+"Z";Wt?Pt.attr("d","M"+(tt+Wt*he.px0[0])+","+(ot+Wt*he.px0[1])+qt(he.px0,he.pxmid,!1,Wt)+qt(he.pxmid,he.px0,!1,Wt)+"Z"+kr):Pt.attr("d",kr)}else{var mr=qt(he.px0,he.px1,!0,1);if(Wt){var qr=1-Wt;Pt.attr("d","M"+(tt+Wt*he.px1[0])+","+(ot+Wt*he.px1[1])+qt(he.px1,he.px0,!1,Wt)+"l"+qr*he.px0[0]+","+qr*he.px0[1]+mr+"Z")}else Pt.attr("d","M"+tt+","+ot+"l"+he.px0[0]+","+he.px0[1]+mr+"Z")}fe(Y,he,ce);var Sr=c.castOption(be.textposition,he.pts),Rr=Qe.selectAll("g.slicetext").data(he.text&&Sr!=="none"?[0]:[]);Rr.enter().append("g").classed("slicetext",!0),Rr.exit().remove(),Rr.each(function(){var wt=t.ensureSingle(v.select(this),"text","",function(Pe){Pe.attr("data-notex",1)}),Ne=t.ensureUniformFontSize(Y,Sr==="outside"?w(be,he,oe.font):A(be,he,oe.font));wt.text(he.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(e.font,Ne).call(a.convertToTspans,Y);var Ke=e.bBox(wt.node()),Te;if(Sr==="outside")Te=z(Ke,he);else if(Te=g(Ke,he,ce),Sr==="auto"&&Te.scale<1){var Ie=t.ensureUniformFontSize(Y,be.outsidetextfont);wt.call(e.font,Ie),Ke=e.bBox(wt.node()),Te=z(Ke,he)}var Ve=Te.textPosAngle,Ce=Ve===void 0?he.pxmid:le(ce.r,Ve);if(Te.targetX=tt+Ce[0]*Te.rCenter+(Te.x||0),Te.targetY=ot+Ce[1]*Te.rCenter+(Te.y||0),V(Te,Ke),Te.outside){var Ee=Te.targetY;he.yLabelMin=Ee-Ke.height/2,he.yLabelMid=Ee,he.yLabelMax=Ee+Ke.height/2,he.labelExtraX=0,he.labelExtraY=0,ze=!0}Te.fontSize=Ne.size,i(be.type,Te,oe),Q[Oe].transform=Te,t.setTransormAndDisplay(wt,Te)})});var Ze=v.select(this).selectAll("g.titletext").data(be.title.text?[0]:[]);if(Ze.enter().append("g").classed("titletext",!0),Ze.exit().remove(),Ze.each(function(){var he=t.ensureSingle(v.select(this),"text","",function(ot){ot.attr("data-notex",1)}),Oe=be.title.text;be._meta&&(Oe=t.templateString(Oe,be._meta)),he.text(Oe).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(e.font,be.title.font).call(a.convertToTspans,Y);var tt;be.title.position==="middle center"?tt=F(ce):tt=N(ce,ae),he.attr("transform",o(tt.x,tt.y)+r(Math.min(1,tt.scale))+o(tt.tx,tt.ty))}),ze&&B(De,be),l(Ae,be),ze&&be.automargin){var at=e.bBox(re.node()),nt=be.domain,rt=ae.w*(nt.x[1]-nt.x[0]),st=ae.h*(nt.y[1]-nt.y[0]),Me=(.5*rt-ce.r)/ae.w,ye=(.5*st-ce.r)/ae.h;x.autoMargin(Y,"pie."+be.uid+".automargin",{xl:nt.x[0]-Me,xr:nt.x[1]+Me,yb:nt.y[0]-ye,yt:nt.y[1]+ye,l:Math.max(ce.cx-ce.r-at.left,0),r:Math.max(at.right-(ce.cx+ce.r),0),b:Math.max(at.bottom-(ce.cy+ce.r),0),t:Math.max(ce.cy-ce.r-at.top,0),pad:5})}})});setTimeout(function(){j.selectAll("tspan").each(function(){var Q=v.select(this);Q.attr("dy")&&Q.attr("dy",Q.attr("dy"))})},0)}function l(Y,ee){Y.each(function(q){var oe=v.select(this);if(!q.labelExtraX&&!q.labelExtraY){oe.select("path.textline").remove();return}var ae=oe.select("g.slicetext text");q.transform.targetX+=q.labelExtraX,q.transform.targetY+=q.labelExtraY,t.setTransormAndDisplay(ae,q.transform);var j=q.cxFinal+q.pxmid[0],Q=q.cyFinal+q.pxmid[1],re="M"+j+","+Q,ce=(q.yLabelMax-q.yLabelMin)*(q.pxmid[0]<0?-1:1)/4;if(q.labelExtraX){var be=q.labelExtraX*q.pxmid[1]/q.pxmid[0],Ae=q.yLabelMid+q.labelExtraY-(q.cyFinal+q.pxmid[1]);Math.abs(be)>Math.abs(Ae)?re+="l"+Ae*q.pxmid[0]/q.pxmid[1]+","+Ae+"H"+(j+q.labelExtraX+ce):re+="l"+q.labelExtraX+","+be+"v"+(Ae-be)+"h"+ce}else re+="V"+(q.yLabelMid+q.labelExtraY)+"h"+ce;t.ensureSingle(oe,"path","textline").call(E.stroke,ee.outsidetextfont.color).attr({"stroke-width":Math.min(2,ee.outsidetextfont.size/8),d:re,fill:"none"})})}function _(Y,ee,q){var oe=q[0],ae=oe.cx,j=oe.cy,Q=oe.trace,re=Q.type==="funnelarea";"_hasHoverLabel"in Q||(Q._hasHoverLabel=!1),"_hasHoverEvent"in Q||(Q._hasHoverEvent=!1),Y.on("mouseover",function(ce){var be=ee._fullLayout,Ae=ee._fullData[Q.index];if(!(ee._dragging||be.hovermode===!1)){var De=Ae.hoverinfo;if(Array.isArray(De)&&(De=S.castHoverinfo({hoverinfo:[c.castOption(De,ce.pts)],_module:Q._module},be,0)),De==="all"&&(De="label+text+value+percent+name"),Ae.hovertemplate||De!=="none"&&De!=="skip"&&De){var ze=ce.rInscribed||0,Ze=ae+ce.pxmid[0]*(1-ze),at=j+ce.pxmid[1]*(1-ze),nt=be.separators,rt=[];if(De&&De.indexOf("label")!==-1&&rt.push(ce.label),ce.text=c.castOption(Ae.hovertext||Ae.text,ce.pts),De&&De.indexOf("text")!==-1){var st=ce.text;t.isValidTextValue(st)&&rt.push(st)}ce.value=ce.v,ce.valueLabel=c.formatPieValue(ce.v,nt),De&&De.indexOf("value")!==-1&&rt.push(ce.valueLabel),ce.percent=ce.v/oe.vTotal,ce.percentLabel=c.formatPiePercent(ce.percent,nt),De&&De.indexOf("percent")!==-1&&rt.push(ce.percentLabel);var Me=Ae.hoverlabel,ye=Me.font,he=[];S.loneHover({trace:Q,x0:Ze-ze*oe.r,x1:Ze+ze*oe.r,y:at,_x0:re?ae+ce.TL[0]:Ze-ze*oe.r,_x1:re?ae+ce.TR[0]:Ze+ze*oe.r,_y0:re?j+ce.TL[1]:at-ze*oe.r,_y1:re?j+ce.BL[1]:at+ze*oe.r,text:rt.join("
"),name:Ae.hovertemplate||De.indexOf("name")!==-1?Ae.name:void 0,idealAlign:ce.pxmid[0]<0?"left":"right",color:c.castOption(Me.bgcolor,ce.pts)||ce.color,borderColor:c.castOption(Me.bordercolor,ce.pts),fontFamily:c.castOption(ye.family,ce.pts),fontSize:c.castOption(ye.size,ce.pts),fontColor:c.castOption(ye.color,ce.pts),nameLength:c.castOption(Me.namelength,ce.pts),textAlign:c.castOption(Me.align,ce.pts),hovertemplate:c.castOption(Ae.hovertemplate,ce.pts),hovertemplateLabels:ce,eventData:[m(ce,Ae)]},{container:be._hoverlayer.node(),outerContainer:be._paper.node(),gd:ee,inOut_bbox:he}),ce.bbox=he[0],Q._hasHoverLabel=!0}Q._hasHoverEvent=!0,ee.emit("plotly_hover",{points:[m(ce,Ae)],event:v.event})}}),Y.on("mouseout",function(ce){var be=ee._fullLayout,Ae=ee._fullData[Q.index],De=v.select(this).datum();Q._hasHoverEvent&&(ce.originalEvent=v.event,ee.emit("plotly_unhover",{points:[m(De,Ae)],event:v.event}),Q._hasHoverEvent=!1),Q._hasHoverLabel&&(S.loneUnhover(be._hoverlayer.node()),Q._hasHoverLabel=!1)}),Y.on("click",function(ce){var be=ee._fullLayout,Ae=ee._fullData[Q.index];ee._dragging||be.hovermode===!1||(ee._hoverdata=[m(ce,Ae)],S.click(ee,v.event))})}function w(Y,ee,q){var oe=c.castOption(Y.outsidetextfont.color,ee.pts)||c.castOption(Y.textfont.color,ee.pts)||q.color,ae=c.castOption(Y.outsidetextfont.family,ee.pts)||c.castOption(Y.textfont.family,ee.pts)||q.family,j=c.castOption(Y.outsidetextfont.size,ee.pts)||c.castOption(Y.textfont.size,ee.pts)||q.size,Q=c.castOption(Y.outsidetextfont.weight,ee.pts)||c.castOption(Y.textfont.weight,ee.pts)||q.weight,re=c.castOption(Y.outsidetextfont.style,ee.pts)||c.castOption(Y.textfont.style,ee.pts)||q.style,ce=c.castOption(Y.outsidetextfont.variant,ee.pts)||c.castOption(Y.textfont.variant,ee.pts)||q.variant,be=c.castOption(Y.outsidetextfont.textcase,ee.pts)||c.castOption(Y.textfont.textcase,ee.pts)||q.textcase,Ae=c.castOption(Y.outsidetextfont.lineposition,ee.pts)||c.castOption(Y.textfont.lineposition,ee.pts)||q.lineposition,De=c.castOption(Y.outsidetextfont.shadow,ee.pts)||c.castOption(Y.textfont.shadow,ee.pts)||q.shadow;return{color:oe,family:ae,size:j,weight:Q,style:re,variant:ce,textcase:be,lineposition:Ae,shadow:De}}function A(Y,ee,q){var oe=c.castOption(Y.insidetextfont.color,ee.pts);!oe&&Y._input.textfont&&(oe=c.castOption(Y._input.textfont.color,ee.pts));var ae=c.castOption(Y.insidetextfont.family,ee.pts)||c.castOption(Y.textfont.family,ee.pts)||q.family,j=c.castOption(Y.insidetextfont.size,ee.pts)||c.castOption(Y.textfont.size,ee.pts)||q.size,Q=c.castOption(Y.insidetextfont.weight,ee.pts)||c.castOption(Y.textfont.weight,ee.pts)||q.weight,re=c.castOption(Y.insidetextfont.style,ee.pts)||c.castOption(Y.textfont.style,ee.pts)||q.style,ce=c.castOption(Y.insidetextfont.variant,ee.pts)||c.castOption(Y.textfont.variant,ee.pts)||q.variant,be=c.castOption(Y.insidetextfont.textcase,ee.pts)||c.castOption(Y.textfont.textcase,ee.pts)||q.textcase,Ae=c.castOption(Y.insidetextfont.lineposition,ee.pts)||c.castOption(Y.textfont.lineposition,ee.pts)||q.lineposition,De=c.castOption(Y.insidetextfont.shadow,ee.pts)||c.castOption(Y.textfont.shadow,ee.pts)||q.shadow;return{color:oe||E.contrast(ee.color),family:ae,size:j,weight:Q,style:re,variant:ce,textcase:be,lineposition:Ae,shadow:De}}function M(Y,ee){for(var q,oe,ae=0;ae=-4;Me-=2)st(Math.PI*Me,"tan");for(Me=4;Me>=-4;Me-=2)st(Math.PI*(Me+1),"tan")}if(De||Ze){for(Me=4;Me>=-4;Me-=2)st(Math.PI*(Me+1.5),"rad");for(Me=4;Me>=-4;Me-=2)st(Math.PI*(Me+.5),"rad")}}if(re||at||De){var ye=Math.sqrt(Y.width*Y.width+Y.height*Y.height);if(rt={scale:ae*oe*2/ye,rCenter:1-ae,rotate:0},rt.textPosAngle=(ee.startangle+ee.stopangle)/2,rt.scale>=1)return rt;nt.push(rt)}(at||Ze)&&(rt=d(Y,oe,Q,ce,be),rt.textPosAngle=(ee.startangle+ee.stopangle)/2,nt.push(rt)),(at||ze)&&(rt=u(Y,oe,Q,ce,be),rt.textPosAngle=(ee.startangle+ee.stopangle)/2,nt.push(rt));for(var he=0,Oe=0,tt=0;tt=1)break}return nt[he]}function b(Y,ee){var q=Y.startangle,oe=Y.stopangle;return q>ee&&ee>oe||q0?1:-1)/2,y:j/(1+q*q/(oe*oe)),outside:!0}}function F(Y){var ee=Math.sqrt(Y.titleBox.width*Y.titleBox.width+Y.titleBox.height*Y.titleBox.height);return{x:Y.cx,y:Y.cy,scale:Y.trace.hole*Y.r*2/ee,tx:0,ty:-Y.titleBox.height/2+Y.trace.title.font.size}}function N(Y,ee){var q=1,oe=1,ae,j=Y.trace,Q={x:Y.cx,y:Y.cy},re={tx:0,ty:0};re.ty+=j.title.font.size,ae=U(j),j.title.position.indexOf("top")!==-1?(Q.y-=(1+ae)*Y.r,re.ty-=Y.titleBox.height):j.title.position.indexOf("bottom")!==-1&&(Q.y+=(1+ae)*Y.r);var ce=O(Y.r,Y.trace.aspectratio),be=ee.w*(j.domain.x[1]-j.domain.x[0])/2;return j.title.position.indexOf("left")!==-1?(be=be+ce,Q.x-=(1+ae)*ce,re.tx+=Y.titleBox.width/2):j.title.position.indexOf("center")!==-1?be*=2:j.title.position.indexOf("right")!==-1&&(be=be+ce,Q.x+=(1+ae)*ce,re.tx-=Y.titleBox.width/2),q=be/Y.titleBox.width,oe=P(Y,ee)/Y.titleBox.height,{x:Q.x,y:Q.y,scale:Math.min(q,oe),tx:re.tx,ty:re.ty}}function O(Y,ee){return Y/(ee===void 0?1:ee)}function P(Y,ee){var q=Y.trace,oe=ee.h*(q.domain.y[1]-q.domain.y[0]);return Math.min(Y.titleBox.height,oe/2)}function U(Y){var ee=Y.pull;if(!ee)return 0;var q;if(t.isArrayOrTypedArray(ee))for(ee=0,q=0;qee&&(ee=Y.pull[q]);return ee}function B(Y,ee){var q,oe,ae,j,Q,re,ce,be,Ae,De,ze,Ze,at;function nt(ye,he){return ye.pxmid[1]-he.pxmid[1]}function rt(ye,he){return he.pxmid[1]-ye.pxmid[1]}function st(ye,he){he||(he={});var Oe=he.labelExtraY+(oe?he.yLabelMax:he.yLabelMin),tt=oe?ye.yLabelMin:ye.yLabelMax,ot=oe?ye.yLabelMax:ye.yLabelMin,Qe=ye.cyFinal+Q(ye.px0[1],ye.px1[1]),Pt=Oe-tt,It,qt,Wt,kr,mr,qr;if(Pt*ce>0&&(ye.labelExtraY=Pt),!!t.isArrayOrTypedArray(ee.pull))for(qt=0;qt=(c.castOption(ee.pull,Wt.pts)||0))&&((ye.pxmid[1]-Wt.pxmid[1])*ce>0?(kr=Wt.cyFinal+Q(Wt.px0[1],Wt.px1[1]),Pt=kr-tt-ye.labelExtraY,Pt*ce>0&&(ye.labelExtraY+=Pt)):(ot+ye.labelExtraY-Qe)*ce>0&&(It=3*re*Math.abs(qt-De.indexOf(ye)),mr=Wt.cxFinal+j(Wt.px0[0],Wt.px1[0]),qr=mr+It-(ye.cxFinal+ye.pxmid[0])-ye.labelExtraX,qr*re>0&&(ye.labelExtraX+=qr)))}for(oe=0;oe<2;oe++)for(ae=oe?nt:rt,Q=oe?Math.max:Math.min,ce=oe?1:-1,q=0;q<2;q++){for(j=q?Math.max:Math.min,re=q?1:-1,be=Y[oe][q],be.sort(ae),Ae=Y[1-oe][q],De=Ae.concat(be),Ze=[],ze=0;ze1?(be=q.r,Ae=be/ae.aspectratio):(Ae=q.r,be=Ae*ae.aspectratio),be*=(1+ae.baseratio)/2,ce=be*Ae}Q=Math.min(Q,ce/q.vTotal)}for(oe=0;oeee.vTotal/2?1:0,be.halfangle=Math.PI*Math.min(be.v/ee.vTotal,.5),be.ring=1-oe.hole,be.rInscribed=L(be,ee))}function le(Y,ee){return[Y*Math.sin(ee),-Y*Math.cos(ee)]}function fe(Y,ee,q){var oe=Y._fullLayout,ae=q.trace,j=ae.texttemplate,Q=ae.textinfo;if(!j&&Q&&Q!=="none"){var re=Q.split("+"),ce=function(he){return re.indexOf(he)!==-1},be=ce("label"),Ae=ce("text"),De=ce("value"),ze=ce("percent"),Ze=oe.separators,at;if(at=be?[ee.label]:[],Ae){var nt=c.getFirstFilled(ae.text,ee.pts);p(nt)&&at.push(nt)}De&&at.push(c.formatPieValue(ee.v,Ze)),ze&&at.push(c.formatPiePercent(ee.v/q.vTotal,Ze)),ee.text=at.join("
")}function rt(he){return{label:he.label,value:he.v,valueLabel:c.formatPieValue(he.v,oe.separators),percent:he.v/q.vTotal,percentLabel:c.formatPiePercent(he.v/q.vTotal,oe.separators),color:he.color,text:he.text,customdata:t.castOption(ae,he.i,"customdata")}}if(j){var st=t.castOption(ae,ee.i,"texttemplate");if(!st)ee.text="";else{var Me=rt(ee),ye=c.getFirstFilled(ae.text,ee.pts);(p(ye)||ye==="")&&(Me.text=ye),ee.text=t.texttemplateString({data:[Me,ae._meta],fallback:ae.texttemplatefallback,labels:Me,locale:Y._fullLayout._d3locale,template:st})}}}function V(Y,ee){var q=Y.rotate*Math.PI/180,oe=Math.cos(q),ae=Math.sin(q),j=(ee.left+ee.right)/2,Q=(ee.top+ee.bottom)/2;Y.textX=j*oe-Q*ae,Y.textY=j*ae+Q*oe,Y.noCenter=!0}G.exports={plot:T,formatSliceLabel:fe,transformInsideText:g,determineInsideTextFont:A,positionTitleOutside:N,prerenderTitles:M,layoutAreas:X,attachFxHandlers:_,computeTransform:V}}}),LB=Xe({"src/traces/pie/style.js"(Z,G){"use strict";var v=Hn(),x=i1(),S=Sp().resizeText;G.exports=function(e){var t=e._fullLayout._pielayer.selectAll(".trace");S(e,t,"pie"),t.each(function(r){var o=r[0],a=o.trace,n=v.select(this);n.style({opacity:a.opacity}),n.selectAll("path.surface").each(function(i){v.select(this).call(x,i,a,e)})})}}}),PB=Xe({"src/traces/pie/base_plot.js"(Z){"use strict";var G=bc();Z.name="pie",Z.plot=function(v,x,S,E){G.plotBasePlot(Z.name,v,x,S,E)},Z.clean=function(v,x,S,E){G.cleanBasePlot(Z.name,v,x,S,E)}}}),IB=Xe({"src/traces/pie/index.js"(Z,G){"use strict";G.exports={attributes:og(),supplyDefaults:sg().supplyDefaults,supplyLayoutDefaults:kB(),layoutAttributes:_3(),calc:x1().calc,crossTraceCalc:x1().crossTraceCalc,plot:x3().plot,style:LB(),styleOne:i1(),moduleType:"trace",name:"pie",basePlotModule:PB(),categories:["pie-like","pie","showLegend"],meta:{}}}}),RB=Xe({"lib/pie.js"(Z,G){"use strict";G.exports=IB()}}),DB=Xe({"src/traces/sunburst/base_plot.js"(Z){"use strict";var G=bc();Z.name="sunburst",Z.plot=function(v,x,S,E){G.plotBasePlot(Z.name,v,x,S,E)},Z.clean=function(v,x,S,E){G.cleanBasePlot(Z.name,v,x,S,E)}}}),nM=Xe({"src/traces/sunburst/constants.js"(Z,G){"use strict";G.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"linear",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"]}}}),J_=Xe({"src/traces/sunburst/attributes.js"(Z,G){"use strict";var v=ru(),{hovertemplateAttrs:x,texttemplateAttrs:S,templatefallbackAttrs:E}=Jl(),e=ku(),t=wc().attributes,r=og(),o=nM(),a=Qo().extendFlat,n=Gh().pattern;G.exports={labels:{valType:"data_array",editType:"calc"},parents:{valType:"data_array",editType:"calc"},values:{valType:"data_array",editType:"calc"},branchvalues:{valType:"enumerated",values:["remainder","total"],dflt:"remainder",editType:"calc"},count:{valType:"flaglist",flags:["branches","leaves"],dflt:"leaves",editType:"calc"},level:{valType:"any",editType:"plot",anim:!0},maxdepth:{valType:"integer",editType:"plot",dflt:-1},marker:a({colors:{valType:"data_array",editType:"calc"},line:{color:a({},r.marker.line.color,{dflt:null}),width:a({},r.marker.line.width,{dflt:1}),editType:"calc"},pattern:n,editType:"calc"},e("marker",{colorAttr:"colors",anim:!1})),leaf:{opacity:{valType:"number",editType:"style",min:0,max:1},editType:"plot"},text:r.text,textinfo:{valType:"flaglist",flags:["label","text","value","current path","percent root","percent entry","percent parent"],extras:["none"],editType:"plot"},texttemplate:S({editType:"plot"},{keys:o.eventDataKeys.concat(["label","value"])}),texttemplatefallback:E({editType:"plot"}),hovertext:r.hovertext,hoverinfo:a({},v.hoverinfo,{flags:["label","text","value","name","current path","percent root","percent entry","percent parent"],dflt:"label+text+value+name"}),hovertemplate:x({},{keys:o.eventDataKeys}),hovertemplatefallback:E(),textfont:r.textfont,insidetextorientation:r.insidetextorientation,insidetextfont:r.insidetextfont,outsidetextfont:a({},r.outsidetextfont,{}),rotation:{valType:"angle",dflt:0,editType:"plot"},sort:r.sort,root:{color:{valType:"color",editType:"calc",dflt:"rgba(0,0,0,0)"},editType:"calc"},domain:t({name:"sunburst",trace:!0,editType:"calc"})}}}),oM=Xe({"src/traces/sunburst/layout_attributes.js"(Z,G){"use strict";G.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),zB=Xe({"src/traces/sunburst/defaults.js"(Z,G){"use strict";var v=sa(),x=J_(),S=wc().defaults,E=gd().handleText,e=sg().handleMarkerDefaults,t=rc(),r=t.hasColorscale,o=t.handleDefaults;G.exports=function(n,i,s,h){function c(A,M){return v.coerce(n,i,x,A,M)}var m=c("labels"),p=c("parents");if(!m||!m.length||!p||!p.length){i.visible=!1;return}var T=c("values");T&&T.length?c("branchvalues"):c("count"),c("level"),c("maxdepth"),e(n,i,h,c);var l=i._hasColorscale=r(n,"marker","colors")||(n.marker||{}).coloraxis;l&&o(n,i,h,c,{prefix:"marker.",cLetter:"c"}),c("leaf.opacity",l?1:.7);var _=c("text");c("texttemplate"),c("texttemplatefallback"),i.texttemplate||c("textinfo",v.isArrayOrTypedArray(_)?"text+label":"label"),c("hovertext"),c("hovertemplate"),c("hovertemplatefallback");var w="auto";E(n,i,h,c,w,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),c("insidetextorientation"),c("sort"),c("rotation"),c("root.color"),S(i,h,c),i._length=null}}}),FB=Xe({"src/traces/sunburst/layout_defaults.js"(Z,G){"use strict";var v=sa(),x=oM();G.exports=function(E,e){function t(r,o){return v.coerce(E,e,x,r,o)}t("sunburstcolorway",e.colorway),t("extendsunburstcolors")}}}),$_=Xe({"node_modules/d3-hierarchy/dist/d3-hierarchy.js"(Z,G){(function(v,x){typeof Z=="object"&&typeof G<"u"?x(Z):(v=v||self,x(v.d3=v.d3||{}))})(Z,function(v){"use strict";function x(Te,Ie){return Te.parent===Ie.parent?1:2}function S(Te){return Te.reduce(E,0)/Te.length}function E(Te,Ie){return Te+Ie.x}function e(Te){return 1+Te.reduce(t,0)}function t(Te,Ie){return Math.max(Te,Ie.y)}function r(Te){for(var Ie;Ie=Te.children;)Te=Ie[0];return Te}function o(Te){for(var Ie;Ie=Te.children;)Te=Ie[Ie.length-1];return Te}function a(){var Te=x,Ie=1,Ve=1,Ce=!1;function Ee(Pe){var ft,ct=0;Pe.eachAfter(function(er){var Lr=er.children;Lr?(er.x=S(Lr),er.y=e(Lr)):(er.x=ft?ct+=Te(er,ft):0,er.y=0,ft=er)});var _t=r(Pe),Ct=o(Pe),ir=_t.x-Te(_t,Ct)/2,rr=Ct.x+Te(Ct,_t)/2;return Pe.eachAfter(Ce?function(er){er.x=(er.x-Pe.x)*Ie,er.y=(Pe.y-er.y)*Ve}:function(er){er.x=(er.x-ir)/(rr-ir)*Ie,er.y=(1-(Pe.y?er.y/Pe.y:1))*Ve})}return Ee.separation=function(Pe){return arguments.length?(Te=Pe,Ee):Te},Ee.size=function(Pe){return arguments.length?(Ce=!1,Ie=+Pe[0],Ve=+Pe[1],Ee):Ce?null:[Ie,Ve]},Ee.nodeSize=function(Pe){return arguments.length?(Ce=!0,Ie=+Pe[0],Ve=+Pe[1],Ee):Ce?[Ie,Ve]:null},Ee}function n(Te){var Ie=0,Ve=Te.children,Ce=Ve&&Ve.length;if(!Ce)Ie=1;else for(;--Ce>=0;)Ie+=Ve[Ce].value;Te.value=Ie}function i(){return this.eachAfter(n)}function s(Te){var Ie=this,Ve,Ce=[Ie],Ee,Pe,ft;do for(Ve=Ce.reverse(),Ce=[];Ie=Ve.pop();)if(Te(Ie),Ee=Ie.children,Ee)for(Pe=0,ft=Ee.length;Pe=0;--Ee)Ve.push(Ce[Ee]);return this}function c(Te){for(var Ie=this,Ve=[Ie],Ce=[],Ee,Pe,ft;Ie=Ve.pop();)if(Ce.push(Ie),Ee=Ie.children,Ee)for(Pe=0,ft=Ee.length;Pe=0;)Ve+=Ce[Ee].value;Ie.value=Ve})}function p(Te){return this.eachBefore(function(Ie){Ie.children&&Ie.children.sort(Te)})}function T(Te){for(var Ie=this,Ve=l(Ie,Te),Ce=[Ie];Ie!==Ve;)Ie=Ie.parent,Ce.push(Ie);for(var Ee=Ce.length;Te!==Ve;)Ce.splice(Ee,0,Te),Te=Te.parent;return Ce}function l(Te,Ie){if(Te===Ie)return Te;var Ve=Te.ancestors(),Ce=Ie.ancestors(),Ee=null;for(Te=Ve.pop(),Ie=Ce.pop();Te===Ie;)Ee=Te,Te=Ve.pop(),Ie=Ce.pop();return Ee}function _(){for(var Te=this,Ie=[Te];Te=Te.parent;)Ie.push(Te);return Ie}function w(){var Te=[];return this.each(function(Ie){Te.push(Ie)}),Te}function A(){var Te=[];return this.eachBefore(function(Ie){Ie.children||Te.push(Ie)}),Te}function M(){var Te=this,Ie=[];return Te.each(function(Ve){Ve!==Te&&Ie.push({source:Ve.parent,target:Ve})}),Ie}function g(Te,Ie){var Ve=new f(Te),Ce=+Te.value&&(Ve.value=Te.value),Ee,Pe=[Ve],ft,ct,_t,Ct;for(Ie==null&&(Ie=d);Ee=Pe.pop();)if(Ce&&(Ee.value=+Ee.data.value),(ct=Ie(Ee.data))&&(Ct=ct.length))for(Ee.children=new Array(Ct),_t=Ct-1;_t>=0;--_t)Pe.push(ft=Ee.children[_t]=new f(ct[_t])),ft.parent=Ee,ft.depth=Ee.depth+1;return Ve.eachBefore(y)}function b(){return g(this).eachBefore(u)}function d(Te){return Te.children}function u(Te){Te.data=Te.data.data}function y(Te){var Ie=0;do Te.height=Ie;while((Te=Te.parent)&&Te.height<++Ie)}function f(Te){this.data=Te,this.depth=this.height=0,this.parent=null}f.prototype=g.prototype={constructor:f,count:i,each:s,eachAfter:c,eachBefore:h,sum:m,sort:p,path:T,ancestors:_,descendants:w,leaves:A,links:M,copy:b};var R=Array.prototype.slice;function L(Te){for(var Ie=Te.length,Ve,Ce;Ie;)Ce=Math.random()*Ie--|0,Ve=Te[Ie],Te[Ie]=Te[Ce],Te[Ce]=Ve;return Te}function z(Te){for(var Ie=0,Ve=(Te=L(R.call(Te))).length,Ce=[],Ee,Pe;Ie0&&Ve*Ve>Ce*Ce+Ee*Ee}function P(Te,Ie){for(var Ve=0;Ve_t?(Ee=(Ct+_t-Pe)/(2*Ct),ct=Math.sqrt(Math.max(0,_t/Ct-Ee*Ee)),Ve.x=Te.x-Ee*Ce-ct*ft,Ve.y=Te.y-Ee*ft+ct*Ce):(Ee=(Ct+Pe-_t)/(2*Ct),ct=Math.sqrt(Math.max(0,Pe/Ct-Ee*Ee)),Ve.x=Ie.x+Ee*Ce-ct*ft,Ve.y=Ie.y+Ee*ft+ct*Ce)):(Ve.x=Ie.x+Ve.r,Ve.y=Ie.y)}function le(Te,Ie){var Ve=Te.r+Ie.r-1e-6,Ce=Ie.x-Te.x,Ee=Ie.y-Te.y;return Ve>0&&Ve*Ve>Ce*Ce+Ee*Ee}function fe(Te){var Ie=Te._,Ve=Te.next._,Ce=Ie.r+Ve.r,Ee=(Ie.x*Ve.r+Ve.x*Ie.r)/Ce,Pe=(Ie.y*Ve.r+Ve.y*Ie.r)/Ce;return Ee*Ee+Pe*Pe}function V(Te){this._=Te,this.next=null,this.previous=null}function Y(Te){if(!(Ee=Te.length))return 0;var Ie,Ve,Ce,Ee,Pe,ft,ct,_t,Ct,ir,rr;if(Ie=Te[0],Ie.x=0,Ie.y=0,!(Ee>1))return Ie.r;if(Ve=Te[1],Ie.x=-Ve.r,Ve.x=Ie.r,Ve.y=0,!(Ee>2))return Ie.r+Ve.r;se(Ve,Ie,Ce=Te[2]),Ie=new V(Ie),Ve=new V(Ve),Ce=new V(Ce),Ie.next=Ce.previous=Ve,Ve.next=Ie.previous=Ce,Ce.next=Ve.previous=Ie;e:for(ct=3;ct0)throw new Error("cycle");return ct}return Ve.id=function(Ce){return arguments.length?(Te=oe(Ce),Ve):Te},Ve.parentId=function(Ce){return arguments.length?(Ie=oe(Ce),Ve):Ie},Ve}function he(Te,Ie){return Te.parent===Ie.parent?1:2}function Oe(Te){var Ie=Te.children;return Ie?Ie[0]:Te.t}function tt(Te){var Ie=Te.children;return Ie?Ie[Ie.length-1]:Te.t}function ot(Te,Ie,Ve){var Ce=Ve/(Ie.i-Te.i);Ie.c-=Ce,Ie.s+=Ve,Te.c+=Ce,Ie.z+=Ve,Ie.m+=Ve}function Qe(Te){for(var Ie=0,Ve=0,Ce=Te.children,Ee=Ce.length,Pe;--Ee>=0;)Pe=Ce[Ee],Pe.z+=Ie,Pe.m+=Ie,Ie+=Pe.s+(Ve+=Pe.c)}function Pt(Te,Ie,Ve){return Te.a.parent===Ie.parent?Te.a:Ve}function It(Te,Ie){this._=Te,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=Ie}It.prototype=Object.create(f.prototype);function qt(Te){for(var Ie=new It(Te,0),Ve,Ce=[Ie],Ee,Pe,ft,ct;Ve=Ce.pop();)if(Pe=Ve._.children)for(Ve.children=new Array(ct=Pe.length),ft=ct-1;ft>=0;--ft)Ce.push(Ee=Ve.children[ft]=new It(Pe[ft],ft)),Ee.parent=Ve;return(Ie.parent=new It(null,0)).children=[Ie],Ie}function Wt(){var Te=he,Ie=1,Ve=1,Ce=null;function Ee(Ct){var ir=qt(Ct);if(ir.eachAfter(Pe),ir.parent.m=-ir.z,ir.eachBefore(ft),Ce)Ct.eachBefore(_t);else{var rr=Ct,er=Ct,Lr=Ct;Ct.eachBefore(function(Wa){Wa.xer.x&&(er=Wa),Wa.depth>Lr.depth&&(Lr=Wa)});var fa=rr===er?1:Te(rr,er)/2,Da=fa-rr.x,Ia=Ie/(er.x+fa+Da),qa=Ve/(Lr.depth||1);Ct.eachBefore(function(Wa){Wa.x=(Wa.x+Da)*Ia,Wa.y=Wa.depth*qa})}return Ct}function Pe(Ct){var ir=Ct.children,rr=Ct.parent.children,er=Ct.i?rr[Ct.i-1]:null;if(ir){Qe(Ct);var Lr=(ir[0].z+ir[ir.length-1].z)/2;er?(Ct.z=er.z+Te(Ct._,er._),Ct.m=Ct.z-Lr):Ct.z=Lr}else er&&(Ct.z=er.z+Te(Ct._,er._));Ct.parent.A=ct(Ct,er,Ct.parent.A||rr[0])}function ft(Ct){Ct._.x=Ct.z+Ct.parent.m,Ct.m+=Ct.parent.m}function ct(Ct,ir,rr){if(ir){for(var er=Ct,Lr=Ct,fa=ir,Da=er.parent.children[0],Ia=er.m,qa=Lr.m,Wa=fa.m,Ca=Da.m,hi;fa=tt(fa),er=Oe(er),fa&&er;)Da=Oe(Da),Lr=tt(Lr),Lr.a=Ct,hi=fa.z+Wa-er.z-Ia+Te(fa._,er._),hi>0&&(ot(Pt(fa,Ct,rr),Ct,hi),Ia+=hi,qa+=hi),Wa+=fa.m,Ia+=er.m,Ca+=Da.m,qa+=Lr.m;fa&&!tt(Lr)&&(Lr.t=fa,Lr.m+=Wa-qa),er&&!Oe(Da)&&(Da.t=er,Da.m+=Ia-Ca,rr=Ct)}return rr}function _t(Ct){Ct.x*=Ie,Ct.y=Ct.depth*Ve}return Ee.separation=function(Ct){return arguments.length?(Te=Ct,Ee):Te},Ee.size=function(Ct){return arguments.length?(Ce=!1,Ie=+Ct[0],Ve=+Ct[1],Ee):Ce?null:[Ie,Ve]},Ee.nodeSize=function(Ct){return arguments.length?(Ce=!0,Ie=+Ct[0],Ve=+Ct[1],Ee):Ce?[Ie,Ve]:null},Ee}function kr(Te,Ie,Ve,Ce,Ee){for(var Pe=Te.children,ft,ct=-1,_t=Pe.length,Ct=Te.value&&(Ee-Ve)/Te.value;++ct<_t;)ft=Pe[ct],ft.x0=Ie,ft.x1=Ce,ft.y0=Ve,ft.y1=Ve+=ft.value*Ct}var mr=(1+Math.sqrt(5))/2;function qr(Te,Ie,Ve,Ce,Ee,Pe){for(var ft=[],ct=Ie.children,_t,Ct,ir=0,rr=0,er=ct.length,Lr,fa,Da=Ie.value,Ia,qa,Wa,Ca,hi,wi,Kt;irWa&&(Wa=Ct),Kt=Ia*Ia*wi,Ca=Math.max(Wa/Kt,Kt/qa),Ca>hi){Ia-=Ct;break}hi=Ca}ft.push(_t={value:Ia,dice:Lr1?Ce:1)},Ve}(mr);function Rr(){var Te=Sr,Ie=!1,Ve=1,Ce=1,Ee=[0],Pe=ae,ft=ae,ct=ae,_t=ae,Ct=ae;function ir(er){return er.x0=er.y0=0,er.x1=Ve,er.y1=Ce,er.eachBefore(rr),Ee=[0],Ie&&er.eachBefore(De),er}function rr(er){var Lr=Ee[er.depth],fa=er.x0+Lr,Da=er.y0+Lr,Ia=er.x1-Lr,qa=er.y1-Lr;Ia=er-1){var Wa=Pe[rr];Wa.x0=fa,Wa.y0=Da,Wa.x1=Ia,Wa.y1=qa;return}for(var Ca=Ct[rr],hi=Lr/2+Ca,wi=rr+1,Kt=er-1;wi>>1;Ct[Ft]qa-Da){var Fr=(fa*Jt+Ia*Yt)/Lr;ir(rr,wi,Yt,fa,Da,Fr,qa),ir(wi,er,Jt,Fr,Da,Ia,qa)}else{var ta=(Da*Jt+qa*Yt)/Lr;ir(rr,wi,Yt,fa,Da,Ia,ta),ir(wi,er,Jt,fa,ta,Ia,qa)}}}function Ne(Te,Ie,Ve,Ce,Ee){(Te.depth&1?kr:ze)(Te,Ie,Ve,Ce,Ee)}var Ke=function Te(Ie){function Ve(Ce,Ee,Pe,ft,ct){if((_t=Ce._squarify)&&_t.ratio===Ie)for(var _t,Ct,ir,rr,er=-1,Lr,fa=_t.length,Da=Ce.value;++er1?Ce:1)},Ve}(mr);v.cluster=a,v.hierarchy=g,v.pack=re,v.packEnclose=z,v.packSiblings=ee,v.partition=Ze,v.stratify=ye,v.tree=Wt,v.treemap=Rr,v.treemapBinary=wt,v.treemapDice=ze,v.treemapResquarify=Ke,v.treemapSlice=kr,v.treemapSliceDice=Ne,v.treemapSquarify=Sr,Object.defineProperty(v,"__esModule",{value:!0})})}}),Q_=Xe({"src/traces/sunburst/calc.js"(Z){"use strict";var G=$_(),v=rs(),x=sa(),S=rc().makeColorScaleFuncFromTrace,E=x1().makePullColorFn,e=x1().generateExtendedColors,t=rc().calc,r=Hs().ALMOST_EQUAL,o={},a={},n={};Z.calc=function(s,h){var c=s._fullLayout,m=h.ids,p=x.isArrayOrTypedArray(m),T=h.labels,l=h.parents,_=h.values,w=x.isArrayOrTypedArray(_),A=[],M={},g={},b=function(ee,q){M[ee]?M[ee].push(q):M[ee]=[q],g[q]=1},d=function(ee){return ee||typeof ee=="number"},u=function(ee){return!w||v(_[ee])&&_[ee]>=0},y,f,R;p?(y=Math.min(m.length,l.length),f=function(ee){return d(m[ee])&&u(ee)},R=function(ee){return String(m[ee])}):(y=Math.min(T.length,l.length),f=function(ee){return d(T[ee])&&u(ee)},R=function(ee){return String(T[ee])}),w&&(y=Math.min(y,_.length));for(var L=0;L1){for(var U=x.randstr(),B=0;B>8&15|G>>4&240,G>>4&15|G&240,(G&15)<<4|G&15,1):v===8?ex(G>>24&255,G>>16&255,G>>8&255,(G&255)/255):v===4?ex(G>>12&15|G>>8&240,G>>8&15|G>>4&240,G>>4&15|G&240,((G&15)<<4|G&15)/255):null):(G=mM.exec(Z))?new Xh(G[1],G[2],G[3],1):(G=gM.exec(Z))?new Xh(G[1]*255/100,G[2]*255/100,G[3]*255/100,1):(G=yM.exec(Z))?ex(G[1],G[2],G[3],G[4]):(G=_M.exec(Z))?ex(G[1]*255/100,G[2]*255/100,G[3]*255/100,G[4]):(G=xM.exec(Z))?hM(G[1],G[2]/100,G[3]/100,1):(G=bM.exec(Z))?hM(G[1],G[2]/100,G[3]/100,G[4]):S3.hasOwnProperty(Z)?uM(S3[Z]):Z==="transparent"?new Xh(NaN,NaN,NaN,0):null}function uM(Z){return new Xh(Z>>16&255,Z>>8&255,Z&255,1)}function ex(Z,G,v,x){return x<=0&&(Z=G=v=NaN),new Xh(Z,G,v,x)}function w3(Z){return Z instanceof Jv||(Z=w1(Z)),Z?(Z=Z.rgb(),new Xh(Z.r,Z.g,Z.b,Z.opacity)):new Xh}function tx(Z,G,v,x){return arguments.length===1?w3(Z):new Xh(Z,G,v,x??1)}function Xh(Z,G,v,x){this.r=+Z,this.g=+G,this.b=+v,this.opacity=+x}function cM(){return`#${l0(this.r)}${l0(this.g)}${l0(this.b)}`}function NB(){return`#${l0(this.r)}${l0(this.g)}${l0(this.b)}${l0((isNaN(this.opacity)?1:this.opacity)*255)}`}function fM(){let Z=rx(this.opacity);return`${Z===1?"rgb(":"rgba("}${s0(this.r)}, ${s0(this.g)}, ${s0(this.b)}${Z===1?")":`, ${Z})`}`}function rx(Z){return isNaN(Z)?1:Math.max(0,Math.min(1,Z))}function s0(Z){return Math.max(0,Math.min(255,Math.round(Z)||0))}function l0(Z){return Z=s0(Z),(Z<16?"0":"")+Z.toString(16)}function hM(Z,G,v,x){return x<=0?Z=G=v=NaN:v<=0||v>=1?Z=G=NaN:G<=0&&(Z=NaN),new Ud(Z,G,v,x)}function pM(Z){if(Z instanceof Ud)return new Ud(Z.h,Z.s,Z.l,Z.opacity);if(Z instanceof Jv||(Z=w1(Z)),!Z)return new Ud;if(Z instanceof Ud)return Z;Z=Z.rgb();var G=Z.r/255,v=Z.g/255,x=Z.b/255,S=Math.min(G,v,x),E=Math.max(G,v,x),e=NaN,t=E-S,r=(E+S)/2;return t?(G===E?e=(v-x)/t+(v0&&r<1?0:e,new Ud(e,t,r,Z.opacity)}function T3(Z,G,v,x){return arguments.length===1?pM(Z):new Ud(Z,G,v,x??1)}function Ud(Z,G,v,x){this.h=+Z,this.s=+G,this.l=+v,this.opacity=+x}function dM(Z){return Z=(Z||0)%360,Z<0?Z+360:Z}function ax(Z){return Math.max(0,Math.min(1,Z||0))}function A3(Z,G,v){return(Z<60?G+(v-G)*Z/60:Z<180?v:Z<240?G+(v-G)*(240-Z)/60:G)*255}var $v,u0,c0,ug,jd,vM,mM,gM,yM,_M,xM,bM,S3,M3=Vo({"node_modules/d3-color/src/color.js"(){b3(),$v=.7,u0=1/$v,c0="\\s*([+-]?\\d+)\\s*",ug="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",jd="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",vM=/^#([0-9a-f]{3,8})$/,mM=new RegExp(`^rgb\\(${c0},${c0},${c0}\\)$`),gM=new RegExp(`^rgb\\(${jd},${jd},${jd}\\)$`),yM=new RegExp(`^rgba\\(${c0},${c0},${c0},${ug}\\)$`),_M=new RegExp(`^rgba\\(${jd},${jd},${jd},${ug}\\)$`),xM=new RegExp(`^hsl\\(${ug},${jd},${jd}\\)$`),bM=new RegExp(`^hsla\\(${ug},${jd},${jd},${ug}\\)$`),S3={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},lg(Jv,w1,{copy(Z){return Object.assign(new this.constructor,this,Z)},displayable(){return this.rgb().displayable()},hex:sM,formatHex:sM,formatHex8:OB,formatHsl:BB,formatRgb:lM,toString:lM}),lg(Xh,tx,b1(Jv,{brighter(Z){return Z=Z==null?u0:Math.pow(u0,Z),new Xh(this.r*Z,this.g*Z,this.b*Z,this.opacity)},darker(Z){return Z=Z==null?$v:Math.pow($v,Z),new Xh(this.r*Z,this.g*Z,this.b*Z,this.opacity)},rgb(){return this},clamp(){return new Xh(s0(this.r),s0(this.g),s0(this.b),rx(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:cM,formatHex:cM,formatHex8:NB,formatRgb:fM,toString:fM})),lg(Ud,T3,b1(Jv,{brighter(Z){return Z=Z==null?u0:Math.pow(u0,Z),new Ud(this.h,this.s,this.l*Z,this.opacity)},darker(Z){return Z=Z==null?$v:Math.pow($v,Z),new Ud(this.h,this.s,this.l*Z,this.opacity)},rgb(){var Z=this.h%360+(this.h<0)*360,G=isNaN(Z)||isNaN(this.s)?0:this.s,v=this.l,x=v+(v<.5?v:1-v)*G,S=2*v-x;return new Xh(A3(Z>=240?Z-240:Z+120,S,x),A3(Z,S,x),A3(Z<120?Z+240:Z-120,S,x),this.opacity)},clamp(){return new Ud(dM(this.h),ax(this.s),ax(this.l),rx(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let Z=rx(this.opacity);return`${Z===1?"hsl(":"hsla("}${dM(this.h)}, ${ax(this.s)*100}%, ${ax(this.l)*100}%${Z===1?")":`, ${Z})`}`}}))}}),E3,k3,wM=Vo({"node_modules/d3-color/src/math.js"(){E3=Math.PI/180,k3=180/Math.PI}});function TM(Z){if(Z instanceof rv)return new rv(Z.l,Z.a,Z.b,Z.opacity);if(Z instanceof Mv)return AM(Z);Z instanceof Xh||(Z=w3(Z));var G=R3(Z.r),v=R3(Z.g),x=R3(Z.b),S=L3((.2225045*G+.7168786*v+.0606169*x)/F3),E,e;return G===v&&v===x?E=e=S:(E=L3((.4360747*G+.3850649*v+.1430804*x)/z3),e=L3((.0139322*G+.0971045*v+.7141733*x)/O3)),new rv(116*S-16,500*(E-S),200*(S-e),Z.opacity)}function C3(Z,G,v,x){return arguments.length===1?TM(Z):new rv(Z,G,v,x??1)}function rv(Z,G,v,x){this.l=+Z,this.a=+G,this.b=+v,this.opacity=+x}function L3(Z){return Z>SM?Math.pow(Z,.3333333333333333):Z/N3+B3}function P3(Z){return Z>f0?Z*Z*Z:N3*(Z-B3)}function I3(Z){return 255*(Z<=.0031308?12.92*Z:1.055*Math.pow(Z,.4166666666666667)-.055)}function R3(Z){return(Z/=255)<=.04045?Z/12.92:Math.pow((Z+.055)/1.055,2.4)}function UB(Z){if(Z instanceof Mv)return new Mv(Z.h,Z.c,Z.l,Z.opacity);if(Z instanceof rv||(Z=TM(Z)),Z.a===0&&Z.b===0)return new Mv(NaN,0=1?(v=1,G-1):Math.floor(v*G),S=Z[x],E=Z[x+1],e=x>0?Z[x-1]:2*S-E,t=x()=>Z}});function PM(Z,G){return function(v){return Z+v*G}}function GB(Z,G,v){return Z=Math.pow(Z,v),G=Math.pow(G,v)-Z,v=1/v,function(x){return Math.pow(Z+x*G,v)}}function ox(Z,G){var v=G-Z;return v?PM(Z,v>180||v<-180?v-360*Math.round(v/360):v):S1(isNaN(Z)?G:Z)}function HB(Z){return(Z=+Z)==1?Zh:function(G,v){return v-G?GB(G,v,Z):S1(isNaN(G)?v:G)}}function Zh(Z,G){var v=G-Z;return v?PM(Z,v):S1(isNaN(Z)?G:Z)}var hg=Vo({"node_modules/d3-interpolate/src/color.js"(){LM()}});function IM(Z){return function(G){var v=G.length,x=new Array(v),S=new Array(v),E=new Array(v),e,t;for(e=0;ev&&(E=G.slice(v,E),t[e]?t[e]+=E:t[++e]=E),(x=x[0])===(S=S[0])?t[e]?t[e]+=S:t[++e]=S:(t[++e]=null,r.push({i:e,x:av(x,S)})),v=cx.lastIndex;return v180?a+=360:a-o>180&&(o+=360),i.push({i:n.push(S(n)+"rotate(",null,x)-2,x:av(o,a)})):a&&n.push(S(n)+"rotate("+a+x)}function t(o,a,n,i){o!==a?i.push({i:n.push(S(n)+"skewX(",null,x)-2,x:av(o,a)}):a&&n.push(S(n)+"skewX("+a+x)}function r(o,a,n,i,s,h){if(o!==n||a!==i){var c=s.push(S(s)+"scale(",null,",",null,")");h.push({i:c-4,x:av(o,n)},{i:c-2,x:av(a,i)})}else(n!==1||i!==1)&&s.push(S(s)+"scale("+n+","+i+")")}return function(o,a){var n=[],i=[];return o=Z(o),a=Z(a),E(o.translateX,o.translateY,a.translateX,a.translateY,n,i),e(o.rotate,a.rotate,n,i),t(o.skewX,a.skewX,n,i),r(o.scaleX,o.scaleY,a.scaleX,a.scaleY,n,i),o=a=null,function(s){for(var h=-1,c=i.length,m;++hfx,interpolateArray:()=>WB,interpolateBasis:()=>EM,interpolateBasisClosed:()=>kM,interpolateCubehelix:()=>nE,interpolateCubehelixLong:()=>oE,interpolateDate:()=>NM,interpolateDiscrete:()=>YB,interpolateHcl:()=>rE,interpolateHclLong:()=>aE,interpolateHsl:()=>QM,interpolateHslLong:()=>eE,interpolateHue:()=>JB,interpolateLab:()=>cN,interpolateNumber:()=>av,interpolateNumberArray:()=>W3,interpolateObject:()=>jM,interpolateRgb:()=>sx,interpolateRgbBasis:()=>RM,interpolateRgbBasisClosed:()=>DM,interpolateRound:()=>QB,interpolateString:()=>VM,interpolateTransformCss:()=>XM,interpolateTransformSvg:()=>ZM,interpolateZoom:()=>JM,piecewise:()=>dN,quantize:()=>mN});var pg=Vo({"node_modules/d3-interpolate/src/index.js"(){hx(),BM(),H3(),CM(),UM(),KB(),$B(),lx(),X3(),qM(),eN(),GM(),nN(),lN(),zM(),uN(),fN(),hN(),pN(),vN(),gN()}}),Y3=Xe({"src/traces/sunburst/fill_one.js"(Z,G){"use strict";var v=es(),x=$n();G.exports=function(E,e,t,r,o){var a=e.data.data,n=a.i,i=o||a.color;if(n>=0){e.i=a.i;var s=t.marker;s.pattern?(!s.colors||!s.pattern.shape)&&(s.color=i,e.color=i):(s.color=i,e.color=i),v.pointStyle(E,t,r,e)}else x.fill(E,i)}}}),sE=Xe({"src/traces/sunburst/style.js"(Z,G){"use strict";var v=Hn(),x=$n(),S=sa(),E=Sp().resizeText,e=Y3();function t(o){var a=o._fullLayout._sunburstlayer.selectAll(".trace");E(o,a,"sunburst"),a.each(function(n){var i=v.select(this),s=n[0],h=s.trace;i.style("opacity",h.opacity),i.selectAll("path.surface").each(function(c){v.select(this).call(r,c,h,o)})})}function r(o,a,n,i){var s=a.data.data,h=!a.children,c=s.i,m=S.castOption(n,c,"marker.line.color")||x.defaultLine,p=S.castOption(n,c,"marker.line.width")||0;o.call(e,a,n,i).style("stroke-width",p).call(x.stroke,m).style("opacity",h?n.leaf.opacity:null)}G.exports={style:t,styleOne:r}}}),Qv=Xe({"src/traces/sunburst/helpers.js"(Z){"use strict";var G=sa(),v=$n(),x=Kd(),S=t0();Z.findEntryWithLevel=function(r,o){var a;return o&&r.eachAfter(function(n){if(Z.getPtId(n)===o)return a=n.copy()}),a||r},Z.findEntryWithChild=function(r,o){var a;return r.eachAfter(function(n){for(var i=n.children||[],s=0;s0)},Z.getMaxDepth=function(r){return r.maxdepth>=0?r.maxdepth:1/0},Z.isHeader=function(r,o){return!(Z.isLeaf(r)||r.depth===o._maxDepth-1)};function t(r){return r.data.data.pid}Z.getParent=function(r,o){return Z.findEntryWithLevel(r,t(o))},Z.listPath=function(r,o){var a=r.parent;if(!a)return[];var n=o?[a.data[o]]:[a];return Z.listPath(a,o).concat(n)},Z.getPath=function(r){return Z.listPath(r,"label").join("/")+"/"},Z.formatValue=S.formatPieValue,Z.formatPercent=function(r,o){var a=G.formatPercent(r,0);return a==="0%"&&(a=S.formatPiePercent(r,o)),a}}}),vx=Xe({"src/traces/sunburst/fx.js"(Z,G){"use strict";var v=Hn(),x=so(),S=$p().appendArrayPointValue,E=rf(),e=sa(),t=Qy(),r=Qv(),o=t0(),a=o.formatPieValue;G.exports=function(s,h,c,m,p){var T=m[0],l=T.trace,_=T.hierarchy,w=l.type==="sunburst",A=l.type==="treemap"||l.type==="icicle";"_hasHoverLabel"in l||(l._hasHoverLabel=!1),"_hasHoverEvent"in l||(l._hasHoverEvent=!1);var M=function(d){var u=c._fullLayout;if(!(c._dragging||u.hovermode===!1)){var y=c._fullData[l.index],f=d.data.data,R=f.i,L=r.isHierarchyRoot(d),z=r.getParent(_,d),F=r.getValue(d),N=function(Q){return e.castOption(y,R,Q)},O=N("hovertemplate"),P=E.castHoverinfo(y,u,R),U=u.separators,B;if(O||P&&P!=="none"&&P!=="skip"){var X,$;w&&(X=T.cx+d.pxmid[0]*(1-d.rInscribed),$=T.cy+d.pxmid[1]*(1-d.rInscribed)),A&&(X=d._hoverX,$=d._hoverY);var se={},le=[],fe=[],V=function(Q){return le.indexOf(Q)!==-1};P&&(le=P==="all"?y._module.attributes.hoverinfo.flags:P.split("+")),se.label=f.label,V("label")&&se.label&&fe.push(se.label),f.hasOwnProperty("v")&&(se.value=f.v,se.valueLabel=a(se.value,U),V("value")&&fe.push(se.valueLabel)),se.currentPath=d.currentPath=r.getPath(d.data),V("current path")&&!L&&fe.push(se.currentPath);var Y,ee=[],q=function(){ee.indexOf(Y)===-1&&(fe.push(Y),ee.push(Y))};se.percentParent=d.percentParent=F/r.getValue(z),se.parent=d.parentString=r.getPtLabel(z),V("percent parent")&&(Y=r.formatPercent(se.percentParent,U)+" of "+se.parent,q()),se.percentEntry=d.percentEntry=F/r.getValue(h),se.entry=d.entry=r.getPtLabel(h),V("percent entry")&&!L&&!d.onPathbar&&(Y=r.formatPercent(se.percentEntry,U)+" of "+se.entry,q()),se.percentRoot=d.percentRoot=F/r.getValue(_),se.root=d.root=r.getPtLabel(_),V("percent root")&&!L&&(Y=r.formatPercent(se.percentRoot,U)+" of "+se.root,q()),se.text=N("hovertext")||N("text"),V("text")&&(Y=se.text,e.isValidTextValue(Y)&&fe.push(Y)),B=[n(d,y,p.eventDataKeys)];var oe={trace:y,y:$,_x0:d._x0,_x1:d._x1,_y0:d._y0,_y1:d._y1,text:fe.join("
"),name:O||V("name")?y.name:void 0,color:N("hoverlabel.bgcolor")||f.color,borderColor:N("hoverlabel.bordercolor"),fontFamily:N("hoverlabel.font.family"),fontSize:N("hoverlabel.font.size"),fontColor:N("hoverlabel.font.color"),fontWeight:N("hoverlabel.font.weight"),fontStyle:N("hoverlabel.font.style"),fontVariant:N("hoverlabel.font.variant"),nameLength:N("hoverlabel.namelength"),textAlign:N("hoverlabel.align"),hovertemplate:O,hovertemplateLabels:se,eventData:B};w&&(oe.x0=X-d.rInscribed*d.rpx1,oe.x1=X+d.rInscribed*d.rpx1,oe.idealAlign=d.pxmid[0]<0?"left":"right"),A&&(oe.x=X,oe.idealAlign=X<0?"left":"right");var ae=[];E.loneHover(oe,{container:u._hoverlayer.node(),outerContainer:u._paper.node(),gd:c,inOut_bbox:ae}),B[0].bbox=ae[0],l._hasHoverLabel=!0}if(A){var j=s.select("path.surface");p.styleOne(j,d,y,c,{hovered:!0})}l._hasHoverEvent=!0,c.emit("plotly_hover",{points:B||[n(d,y,p.eventDataKeys)],event:v.event})}},g=function(d){var u=c._fullLayout,y=c._fullData[l.index],f=v.select(this).datum();if(l._hasHoverEvent&&(d.originalEvent=v.event,c.emit("plotly_unhover",{points:[n(f,y,p.eventDataKeys)],event:v.event}),l._hasHoverEvent=!1),l._hasHoverLabel&&(E.loneUnhover(u._hoverlayer.node()),l._hasHoverLabel=!1),A){var R=s.select("path.surface");p.styleOne(R,f,y,c,{hovered:!1})}},b=function(d){var u=c._fullLayout,y=c._fullData[l.index],f=w&&(r.isHierarchyRoot(d)||r.isLeaf(d)),R=r.getPtId(d),L=r.isEntry(d)?r.findEntryWithChild(_,R):r.findEntryWithLevel(_,R),z=r.getPtId(L),F={points:[n(d,y,p.eventDataKeys)],event:v.event};f||(F.nextLevel=z);var N=t.triggerHandler(c,"plotly_"+l.type+"click",F);if(N!==!1&&u.hovermode&&(c._hoverdata=[n(d,y,p.eventDataKeys)],E.click(c,v.event)),!f&&N!==!1&&!c._dragging&&!c._transitioning){x.call("_storeDirectGUIEdit",y,u._tracePreGUI[y.uid],{level:y.level});var O={data:[{level:z}],traces:[l.index]},P={frame:{redraw:!1,duration:p.transitionTime},transition:{duration:p.transitionTime,easing:p.transitionEasing},mode:"immediate",fromcurrent:!0};E.loneUnhover(u._hoverlayer.node()),x.call("animate",c,O,P)}};s.on("mouseover",M),s.on("mouseout",g),s.on("click",b)};function n(i,s,h){for(var c=i.data.data,m={curveNumber:s.index,pointNumber:c.i,data:s._input,fullData:s},p=0;pot.x1?2*Math.PI:0)+Q;Qe=he.rpx1Ze?2*Math.PI:0)+Q;tt={x0:Qe,x1:Qe}}else tt={rpx0:le,rpx1:le},E.extendFlat(tt,ye(he));else tt={rpx0:0,rpx1:0};else tt={x0:Q,x1:Q};return x(tt,ot)}function Me(he){var Oe=ee[T.getPtId(he)],tt,ot=he.transform;if(Oe)tt=Oe;else if(tt={rpx1:he.rpx1,transform:{textPosAngle:ot.textPosAngle,scale:0,rotate:ot.rotate,rCenter:ot.rCenter,x:ot.x,y:ot.y}},Y)if(he.parent)if(Ze){var Qe=he.x1>Ze?2*Math.PI:0;tt.x0=tt.x1=Qe}else E.extendFlat(tt,ye(he));else tt.x0=tt.x1=Q;else tt.x0=tt.x1=Q;var Pt=x(tt.transform.textPosAngle,he.transform.textPosAngle),It=x(tt.rpx1,he.rpx1),qt=x(tt.x0,he.x0),Wt=x(tt.x1,he.x1),kr=x(tt.transform.scale,ot.scale),mr=x(tt.transform.rotate,ot.rotate),qr=ot.rCenter===0?3:tt.transform.rCenter===0?1/3:1,Sr=x(tt.transform.rCenter,ot.rCenter),Rr=function(wt){return Sr(Math.pow(wt,qr))};return function(wt){var Ne=It(wt),Ke=qt(wt),Te=Wt(wt),Ie=Rr(wt),Ve=be(Ne,(Ke+Te)/2),Ce=Pt(wt),Ee={pxmid:Ve,rpx1:Ne,transform:{textPosAngle:Ce,rCenter:Ie,x:ot.x,y:ot.y}};return r(N.type,ot,f),{transform:{targetX:De(Ee),targetY:ze(Ee),scale:kr(wt),rotate:mr(wt),rCenter:Ie}}}}function ye(he){var Oe=he.parent,tt=ee[T.getPtId(Oe)],ot={};if(tt){var Qe=Oe.children,Pt=Qe.indexOf(he),It=Qe.length,qt=x(tt.x0,tt.x1);ot.x0=qt(Pt/It),ot.x1=qt(Pt/It)}else ot.x0=ot.x1=0;return ot}}function _(g){return v.partition().size([2*Math.PI,g.height+1])(g)}Z.formatSliceLabel=function(g,b,d,u,y){var f=d.texttemplate,R=d.textinfo;if(!f&&(!R||R==="none"))return"";var L=y.separators,z=u[0],F=g.data.data,N=z.hierarchy,O=T.isHierarchyRoot(g),P=T.getParent(N,g),U=T.getValue(g);if(!f){var B=R.split("+"),X=function(ae){return B.indexOf(ae)!==-1},$=[],se;if(X("label")&&F.label&&$.push(F.label),F.hasOwnProperty("v")&&X("value")&&$.push(T.formatValue(F.v,L)),!O){X("current path")&&$.push(T.getPath(g.data));var le=0;X("percent parent")&&le++,X("percent entry")&&le++,X("percent root")&&le++;var fe=le>1;if(le){var V,Y=function(ae){se=T.formatPercent(V,L),fe&&(se+=" of "+ae),$.push(se)};X("percent parent")&&!O&&(V=U/T.getValue(P),Y("parent")),X("percent entry")&&(V=U/T.getValue(b),Y("entry")),X("percent root")&&(V=U/T.getValue(N),Y("root"))}}return X("text")&&(se=E.castOption(d,F.i,"text"),E.isValidTextValue(se)&&$.push(se)),$.join("
")}var ee=E.castOption(d,F.i,"texttemplate");if(!ee)return"";var q={};F.label&&(q.label=F.label),F.hasOwnProperty("v")&&(q.value=F.v,q.valueLabel=T.formatValue(F.v,L)),q.currentPath=T.getPath(g.data),O||(q.percentParent=U/T.getValue(P),q.percentParentLabel=T.formatPercent(q.percentParent,L),q.parent=T.getPtLabel(P)),q.percentEntry=U/T.getValue(b),q.percentEntryLabel=T.formatPercent(q.percentEntry,L),q.entry=T.getPtLabel(b),q.percentRoot=U/T.getValue(N),q.percentRootLabel=T.formatPercent(q.percentRoot,L),q.root=T.getPtLabel(N),F.hasOwnProperty("color")&&(q.color=F.color);var oe=E.castOption(d,F.i,"text");return(E.isValidTextValue(oe)||oe==="")&&(q.text=oe),q.customdata=E.castOption(d,F.i,"customdata"),E.texttemplateString({data:[q,d._meta],fallback:d.texttemplatefallback,labels:q,locale:y._d3locale,template:ee})};function w(g){return g.rpx0===0&&E.isFullCircle([g.x0,g.x1])?1:Math.max(0,Math.min(1/(1+1/Math.sin(g.halfangle)),g.ring/2))}function A(g){return M(g.rpx1,g.transform.textPosAngle)}function M(g,b){return[g*Math.sin(b),-g*Math.cos(b)]}}}),yN=Xe({"src/traces/sunburst/index.js"(Z,G){"use strict";G.exports={moduleType:"trace",name:"sunburst",basePlotModule:DB(),categories:[],animatable:!0,attributes:J_(),layoutAttributes:oM(),supplyDefaults:zB(),supplyLayoutDefaults:FB(),calc:Q_().calc,crossTraceCalc:Q_().crossTraceCalc,plot:K3().plot,style:sE().style,colorbar:pp(),meta:{}}}}),_N=Xe({"lib/sunburst.js"(Z,G){"use strict";G.exports=yN()}}),xN=Xe({"src/traces/treemap/base_plot.js"(Z){"use strict";var G=bc();Z.name="treemap",Z.plot=function(v,x,S,E){G.plotBasePlot(Z.name,v,x,S,E)},Z.clean=function(v,x,S,E){G.cleanBasePlot(Z.name,v,x,S,E)}}}),dg=Xe({"src/traces/treemap/constants.js"(Z,G){"use strict";G.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}}}),J3=Xe({"src/traces/treemap/attributes.js"(Z,G){"use strict";var{hovertemplateAttrs:v,texttemplateAttrs:x,templatefallbackAttrs:S}=Jl(),E=ku(),e=wc().attributes,t=og(),r=J_(),o=dg(),a=Qo().extendFlat,n=Gh().pattern;G.exports={labels:r.labels,parents:r.parents,values:r.values,branchvalues:r.branchvalues,count:r.count,level:r.level,maxdepth:r.maxdepth,tiling:{packing:{valType:"enumerated",values:["squarify","binary","dice","slice","slice-dice","dice-slice"],dflt:"squarify",editType:"plot"},squarifyratio:{valType:"number",min:1,dflt:1,editType:"plot"},flip:{valType:"flaglist",flags:["x","y"],dflt:"",editType:"plot"},pad:{valType:"number",min:0,dflt:3,editType:"plot"},editType:"calc"},marker:a({pad:{t:{valType:"number",min:0,editType:"plot"},l:{valType:"number",min:0,editType:"plot"},r:{valType:"number",min:0,editType:"plot"},b:{valType:"number",min:0,editType:"plot"},editType:"calc"},colors:r.marker.colors,pattern:n,depthfade:{valType:"enumerated",values:[!0,!1,"reversed"],editType:"style"},line:r.marker.line,cornerradius:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},E("marker",{colorAttr:"colors",anim:!1})),pathbar:{visible:{valType:"boolean",dflt:!0,editType:"plot"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},edgeshape:{valType:"enumerated",values:[">","<","|","/","\\"],dflt:">",editType:"plot"},thickness:{valType:"number",min:12,editType:"plot"},textfont:a({},t.textfont,{}),editType:"calc"},text:t.text,textinfo:r.textinfo,texttemplate:x({editType:"plot"},{keys:o.eventDataKeys.concat(["label","value"])}),texttemplatefallback:S({editType:"plot"}),hovertext:t.hovertext,hoverinfo:r.hoverinfo,hovertemplate:v({},{keys:o.eventDataKeys}),hovertemplatefallback:S(),textfont:t.textfont,insidetextfont:t.insidetextfont,outsidetextfont:a({},t.outsidetextfont,{}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"top left",editType:"plot"},sort:t.sort,root:r.root,domain:e({name:"treemap",trace:!0,editType:"calc"})}}}),lE=Xe({"src/traces/treemap/layout_attributes.js"(Z,G){"use strict";G.exports={treemapcolorway:{valType:"colorlist",editType:"calc"},extendtreemapcolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),bN=Xe({"src/traces/treemap/defaults.js"(Z,G){"use strict";var v=sa(),x=J3(),S=$n(),E=wc().defaults,e=gd().handleText,t=i0().TEXTPAD,r=sg().handleMarkerDefaults,o=rc(),a=o.hasColorscale,n=o.handleDefaults;G.exports=function(s,h,c,m){function p(y,f){return v.coerce(s,h,x,y,f)}var T=p("labels"),l=p("parents");if(!T||!T.length||!l||!l.length){h.visible=!1;return}var _=p("values");_&&_.length?p("branchvalues"):p("count"),p("level"),p("maxdepth");var w=p("tiling.packing");w==="squarify"&&p("tiling.squarifyratio"),p("tiling.flip"),p("tiling.pad");var A=p("text");p("texttemplate"),p("texttemplatefallback"),h.texttemplate||p("textinfo",v.isArrayOrTypedArray(A)?"text+label":"label"),p("hovertext"),p("hovertemplate"),p("hovertemplatefallback");var M=p("pathbar.visible"),g="auto";e(s,h,m,p,g,{hasPathbar:M,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),p("textposition");var b=h.textposition.indexOf("bottom")!==-1;r(s,h,m,p);var d=h._hasColorscale=a(s,"marker","colors")||(s.marker||{}).coloraxis;d?n(s,h,m,p,{prefix:"marker.",cLetter:"c"}):p("marker.depthfade",!(h.marker.colors||[]).length);var u=h.textfont.size*2;p("marker.pad.t",b?u/4:u),p("marker.pad.l",u/4),p("marker.pad.r",u/4),p("marker.pad.b",b?u:u/4),p("marker.cornerradius"),h._hovered={marker:{line:{width:2,color:S.contrast(m.paper_bgcolor)}}},M&&(p("pathbar.thickness",h.pathbar.textfont.size+2*t),p("pathbar.side"),p("pathbar.edgeshape")),p("sort"),p("root.color"),E(h,m,p),h._length=null}}}),wN=Xe({"src/traces/treemap/layout_defaults.js"(Z,G){"use strict";var v=sa(),x=lE();G.exports=function(E,e){function t(r,o){return v.coerce(E,e,x,r,o)}t("treemapcolorway",e.colorway),t("extendtreemapcolors")}}}),uE=Xe({"src/traces/treemap/calc.js"(Z){"use strict";var G=Q_();Z.calc=function(v,x){return G.calc(v,x)},Z.crossTraceCalc=function(v){return G._runCrossTraceCalc("treemap",v)}}}),cE=Xe({"src/traces/treemap/flip_tree.js"(Z,G){"use strict";G.exports=function v(x,S,E){var e;E.swapXY&&(e=x.x0,x.x0=x.y0,x.y0=e,e=x.x1,x.x1=x.y1,x.y1=e),E.flipX&&(e=x.x0,x.x0=S[0]-x.x1,x.x1=S[0]-e),E.flipY&&(e=x.y0,x.y0=S[1]-x.y1,x.y1=S[1]-e);var t=x.children;if(t)for(var r=0;r0)for(var u=0;u").join(" ")||"";var fe=x.ensureSingle(se,"g","slicetext"),V=x.ensureSingle(fe,"text","",function(ee){ee.attr("data-notex",1)}),Y=x.ensureUniformFontSize(s,o.determineTextFont(N,$,z.font,{onPathbar:!0}));V.text($._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(S.font,Y).call(E.convertToTspans,s),$.textBB=S.bBox(V.node()),$.transform=g($,{fontSize:Y.size,onPathbar:!0}),$.transform.fontSize=Y.size,d?V.transition().attrTween("transform",function(ee){var q=f(ee,n,R,[l,_]);return function(oe){return b(q(oe))}}):V.attr("transform",b($))})}}}),AN=Xe({"src/traces/treemap/plot_one.js"(Z,G){"use strict";var v=Hn(),x=(pg(),zf(p0)).interpolate,S=Qv(),E=sa(),e=i0().TEXTPAD,t=tg(),r=t.toMoveInsideBar,o=Sp(),a=o.recordMinTextSize,n=dg(),i=TN();function s(h){return S.isHierarchyRoot(h)?"":S.getPtId(h)}G.exports=function(c,m,p,T,l){var _=c._fullLayout,w=m[0],A=w.trace,M=A.type,g=M==="icicle",b=w.hierarchy,d=S.findEntryWithLevel(b,A.level),u=v.select(p),y=u.selectAll("g.pathbar"),f=u.selectAll("g.slice");if(!d){y.remove(),f.remove();return}var R=S.isHierarchyRoot(d),L=!_.uniformtext.mode&&S.hasTransition(T),z=S.getMaxDepth(A),F=function(Sr){return Sr.data.depth-d.data.depth-1?U+$:-(X+$):0,le={x0:B,x1:B,y0:se,y1:se+X},fe=function(Sr,Rr,wt){var Ne=A.tiling.pad,Ke=function(Ce){return Ce-Ne<=Rr.x0},Te=function(Ce){return Ce+Ne>=Rr.x1},Ie=function(Ce){return Ce-Ne<=Rr.y0},Ve=function(Ce){return Ce+Ne>=Rr.y1};return Sr.x0===Rr.x0&&Sr.x1===Rr.x1&&Sr.y0===Rr.y0&&Sr.y1===Rr.y1?{x0:Sr.x0,x1:Sr.x1,y0:Sr.y0,y1:Sr.y1}:{x0:Ke(Sr.x0-Ne)?0:Te(Sr.x0-Ne)?wt[0]:Sr.x0,x1:Ke(Sr.x1+Ne)?0:Te(Sr.x1+Ne)?wt[0]:Sr.x1,y0:Ie(Sr.y0-Ne)?0:Ve(Sr.y0-Ne)?wt[1]:Sr.y0,y1:Ie(Sr.y1+Ne)?0:Ve(Sr.y1+Ne)?wt[1]:Sr.y1}},V=null,Y={},ee={},q=null,oe=function(Sr,Rr){return Rr?Y[s(Sr)]:ee[s(Sr)]},ae=function(Sr,Rr,wt,Ne){if(Rr)return Y[s(b)]||le;var Ke=ee[A.level]||wt;return F(Sr)?fe(Sr,Ke,Ne):{}};w.hasMultipleRoots&&R&&z++,A._maxDepth=z,A._backgroundColor=_.paper_bgcolor,A._entryDepth=d.data.depth,A._atRootLevel=R;var j=-P/2+N.l+N.w*(O.x[1]+O.x[0])/2,Q=-U/2+N.t+N.h*(1-(O.y[1]+O.y[0])/2),re=function(Sr){return j+Sr},ce=function(Sr){return Q+Sr},be=ce(0),Ae=re(0),De=function(Sr){return Ae+Sr},ze=function(Sr){return be+Sr};function Ze(Sr,Rr){return Sr+","+Rr}var at=De(0),nt=function(Sr){Sr.x=Math.max(at,Sr.x)},rt=A.pathbar.edgeshape,st=function(Sr){var Rr=De(Math.max(Math.min(Sr.x0,Sr.x0),0)),wt=De(Math.min(Math.max(Sr.x1,Sr.x1),B)),Ne=ze(Sr.y0),Ke=ze(Sr.y1),Te=X/2,Ie={},Ve={};Ie.x=Rr,Ve.x=wt,Ie.y=Ve.y=(Ne+Ke)/2;var Ce={x:Rr,y:Ne},Ee={x:wt,y:Ne},Pe={x:wt,y:Ke},ft={x:Rr,y:Ke};return rt===">"?(Ce.x-=Te,Ee.x-=Te,Pe.x-=Te,ft.x-=Te):rt==="/"?(Pe.x-=Te,ft.x-=Te,Ie.x-=Te/2,Ve.x-=Te/2):rt==="\\"?(Ce.x-=Te,Ee.x-=Te,Ie.x-=Te/2,Ve.x-=Te/2):rt==="<"&&(Ie.x-=Te,Ve.x-=Te),nt(Ce),nt(ft),nt(Ie),nt(Ee),nt(Pe),nt(Ve),"M"+Ze(Ce.x,Ce.y)+"L"+Ze(Ee.x,Ee.y)+"L"+Ze(Ve.x,Ve.y)+"L"+Ze(Pe.x,Pe.y)+"L"+Ze(ft.x,ft.y)+"L"+Ze(Ie.x,Ie.y)+"Z"},Me=A[g?"tiling":"marker"].pad,ye=function(Sr){return A.textposition.indexOf(Sr)!==-1},he=ye("top"),Oe=ye("left"),tt=ye("right"),ot=ye("bottom"),Qe=function(Sr){var Rr=re(Sr.x0),wt=re(Sr.x1),Ne=ce(Sr.y0),Ke=ce(Sr.y1),Te=wt-Rr,Ie=Ke-Ne;if(!Te||!Ie)return"";var Ve=A.marker.cornerradius||0,Ce=Math.min(Ve,Te/2,Ie/2);Ce&&Sr.data&&Sr.data.data&&Sr.data.data.label&&(he&&(Ce=Math.min(Ce,Me.t)),Oe&&(Ce=Math.min(Ce,Me.l)),tt&&(Ce=Math.min(Ce,Me.r)),ot&&(Ce=Math.min(Ce,Me.b)));var Ee=function(Pe,ft){return Ce?"a"+Ze(Ce,Ce)+" 0 0 1 "+Ze(Pe,ft):""};return"M"+Ze(Rr,Ne+Ce)+Ee(Ce,-Ce)+"L"+Ze(wt-Ce,Ne)+Ee(Ce,Ce)+"L"+Ze(wt,Ke-Ce)+Ee(-Ce,Ce)+"L"+Ze(Rr+Ce,Ke)+Ee(-Ce,-Ce)+"Z"},Pt=function(Sr,Rr){var wt=Sr.x0,Ne=Sr.x1,Ke=Sr.y0,Te=Sr.y1,Ie=Sr.textBB,Ve=he||Rr.isHeader&&!ot,Ce=Ve?"start":ot?"end":"middle",Ee=ye("right"),Pe=ye("left")||Rr.onPathbar,ft=Pe?-1:Ee?1:0;if(Rr.isHeader){if(wt+=(g?Me:Me.l)-e,Ne-=(g?Me:Me.r)-e,wt>=Ne){var ct=(wt+Ne)/2;wt=ct,Ne=ct}var _t;ot?(_t=Te-(g?Me:Me.b),Ke<_t&&_t-1,flipY:O.tiling.flip.indexOf("y")>-1,pad:{inner:O.tiling.pad,top:O.marker.pad.t,left:O.marker.pad.l,right:O.marker.pad.r,bottom:O.marker.pad.b}}),se=$.descendants(),le=1/0,fe=-1/0;se.forEach(function(oe){var ae=oe.depth;ae>=O._maxDepth?(oe.x0=oe.x1=(oe.x0+oe.x1)/2,oe.y0=oe.y1=(oe.y0+oe.y1)/2):(le=Math.min(le,ae),fe=Math.max(fe,ae))}),p=p.data(se,o.getPtId),O._maxVisibleLayers=isFinite(fe)?fe-le+1:0,p.enter().append("g").classed("slice",!0),u(p,i,L,[l,_],M),p.order();var V=null;if(d&&R){var Y=o.getPtId(R);p.each(function(oe){V===null&&o.getPtId(oe)===Y&&(V={x0:oe.x0,x1:oe.x1,y0:oe.y0,y1:oe.y1})})}var ee=function(){return V||{x0:0,x1:l,y0:0,y1:_}},q=p;return d&&(q=q.transition().each("end",function(){var oe=v.select(this);o.setSliceCursor(oe,h,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),q.each(function(oe){var ae=o.isHeader(oe,O);oe._x0=w(oe.x0),oe._x1=w(oe.x1),oe._y0=A(oe.y0),oe._y1=A(oe.y1),oe._hoverX=w(oe.x1-O.marker.pad.r),oe._hoverY=A(B?oe.y1-O.marker.pad.b/2:oe.y0+O.marker.pad.t/2);var j=v.select(this),Q=x.ensureSingle(j,"path","surface",function(ze){ze.style("pointer-events",z?"none":"all")});d?Q.transition().attrTween("d",function(ze){var Ze=y(ze,i,ee(),[l,_]);return function(at){return M(Ze(at))}}):Q.attr("d",M),j.call(a,m,h,c,{styleOne:t,eventDataKeys:r.eventDataKeys,transitionTime:r.CLICK_TRANSITION_TIME,transitionEasing:r.CLICK_TRANSITION_EASING}).call(o.setSliceCursor,h,{isTransitioning:h._transitioning}),Q.call(t,oe,O,h,{hovered:!1}),oe.x0===oe.x1||oe.y0===oe.y1?oe._text="":ae?oe._text=X?"":o.getPtLabel(oe)||"":oe._text=n(oe,m,O,c,F)||"";var re=x.ensureSingle(j,"g","slicetext"),ce=x.ensureSingle(re,"text","",function(ze){ze.attr("data-notex",1)}),be=x.ensureUniformFontSize(h,o.determineTextFont(O,oe,F.font)),Ae=oe._text||" ",De=ae&&Ae.indexOf("
")===-1;ce.text(Ae).classed("slicetext",!0).attr("text-anchor",U?"end":P||De?"start":"middle").call(S.font,be).call(E.convertToTspans,h),oe.textBB=S.bBox(ce.node()),oe.transform=g(oe,{fontSize:be.size,isHeader:ae}),oe.transform.fontSize=be.size,d?ce.transition().attrTween("transform",function(ze){var Ze=f(ze,i,ee(),[l,_]);return function(at){return b(Ze(at))}}):ce.attr("transform",b(oe))}),V}}}),MN=Xe({"src/traces/treemap/plot.js"(Z,G){"use strict";var v=hE(),x=SN();G.exports=function(E,e,t,r){return v(E,e,t,r,{type:"treemap",drawDescendants:x})}}}),EN=Xe({"src/traces/treemap/index.js"(Z,G){"use strict";G.exports={moduleType:"trace",name:"treemap",basePlotModule:xN(),categories:[],animatable:!0,attributes:J3(),layoutAttributes:lE(),supplyDefaults:bN(),supplyLayoutDefaults:wN(),calc:uE().calc,crossTraceCalc:uE().crossTraceCalc,plot:MN(),style:$3().style,colorbar:pp(),meta:{}}}}),kN=Xe({"lib/treemap.js"(Z,G){"use strict";G.exports=EN()}}),CN=Xe({"src/traces/icicle/base_plot.js"(Z){"use strict";var G=bc();Z.name="icicle",Z.plot=function(v,x,S,E){G.plotBasePlot(Z.name,v,x,S,E)},Z.clean=function(v,x,S,E){G.cleanBasePlot(Z.name,v,x,S,E)}}}),pE=Xe({"src/traces/icicle/attributes.js"(Z,G){"use strict";var{hovertemplateAttrs:v,texttemplateAttrs:x,templatefallbackAttrs:S}=Jl(),E=ku(),e=wc().attributes,t=og(),r=J_(),o=J3(),a=dg(),n=Qo().extendFlat,i=Gh().pattern;G.exports={labels:r.labels,parents:r.parents,values:r.values,branchvalues:r.branchvalues,count:r.count,level:r.level,maxdepth:r.maxdepth,tiling:{orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"plot"},flip:o.tiling.flip,pad:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},marker:n({colors:r.marker.colors,line:r.marker.line,pattern:i,editType:"calc"},E("marker",{colorAttr:"colors",anim:!1})),leaf:r.leaf,pathbar:o.pathbar,text:t.text,textinfo:r.textinfo,texttemplate:x({editType:"plot"},{keys:a.eventDataKeys.concat(["label","value"])}),texttemplatefallback:S({editType:"plot"}),hovertext:t.hovertext,hoverinfo:r.hoverinfo,hovertemplate:v({},{keys:a.eventDataKeys}),hovertemplatefallback:S(),textfont:t.textfont,insidetextfont:t.insidetextfont,outsidetextfont:o.outsidetextfont,textposition:o.textposition,sort:t.sort,root:r.root,domain:e({name:"icicle",trace:!0,editType:"calc"})}}}),dE=Xe({"src/traces/icicle/layout_attributes.js"(Z,G){"use strict";G.exports={iciclecolorway:{valType:"colorlist",editType:"calc"},extendiciclecolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),LN=Xe({"src/traces/icicle/defaults.js"(Z,G){"use strict";var v=sa(),x=pE(),S=$n(),E=wc().defaults,e=gd().handleText,t=i0().TEXTPAD,r=sg().handleMarkerDefaults,o=rc(),a=o.hasColorscale,n=o.handleDefaults;G.exports=function(s,h,c,m){function p(b,d){return v.coerce(s,h,x,b,d)}var T=p("labels"),l=p("parents");if(!T||!T.length||!l||!l.length){h.visible=!1;return}var _=p("values");_&&_.length?p("branchvalues"):p("count"),p("level"),p("maxdepth"),p("tiling.orientation"),p("tiling.flip"),p("tiling.pad");var w=p("text");p("texttemplate"),p("texttemplatefallback"),h.texttemplate||p("textinfo",v.isArrayOrTypedArray(w)?"text+label":"label"),p("hovertext"),p("hovertemplate"),p("hovertemplatefallback");var A=p("pathbar.visible"),M="auto";e(s,h,m,p,M,{hasPathbar:A,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),p("textposition"),r(s,h,m,p);var g=h._hasColorscale=a(s,"marker","colors")||(s.marker||{}).coloraxis;g&&n(s,h,m,p,{prefix:"marker.",cLetter:"c"}),p("leaf.opacity",g?1:.7),h._hovered={marker:{line:{width:2,color:S.contrast(m.paper_bgcolor)}}},A&&(p("pathbar.thickness",h.pathbar.textfont.size+2*t),p("pathbar.side"),p("pathbar.edgeshape")),p("sort"),p("root.color"),E(h,m,p),h._length=null}}}),PN=Xe({"src/traces/icicle/layout_defaults.js"(Z,G){"use strict";var v=sa(),x=dE();G.exports=function(E,e){function t(r,o){return v.coerce(E,e,x,r,o)}t("iciclecolorway",e.colorway),t("extendiciclecolors")}}}),vE=Xe({"src/traces/icicle/calc.js"(Z){"use strict";var G=Q_();Z.calc=function(v,x){return G.calc(v,x)},Z.crossTraceCalc=function(v){return G._runCrossTraceCalc("icicle",v)}}}),IN=Xe({"src/traces/icicle/partition.js"(Z,G){"use strict";var v=$_(),x=cE();G.exports=function(E,e,t){var r=t.flipX,o=t.flipY,a=t.orientation==="h",n=t.maxDepth,i=e[0],s=e[1];n&&(i=(E.height+1)*e[0]/Math.min(E.height+1,n),s=(E.height+1)*e[1]/Math.min(E.height+1,n));var h=v.partition().padding(t.pad.inner).size(a?[e[1],i]:[e[0],s])(E);return(a||r||o)&&x(h,e,{swapXY:a,flipX:r,flipY:o}),h}}}),mE=Xe({"src/traces/icicle/style.js"(Z,G){"use strict";var v=Hn(),x=$n(),S=sa(),E=Sp().resizeText,e=Y3();function t(o){var a=o._fullLayout._iciclelayer.selectAll(".trace");E(o,a,"icicle"),a.each(function(n){var i=v.select(this),s=n[0],h=s.trace;i.style("opacity",h.opacity),i.selectAll("path.surface").each(function(c){v.select(this).call(r,c,h,o)})})}function r(o,a,n,i){var s=a.data.data,h=!a.children,c=s.i,m=S.castOption(n,c,"marker.line.color")||x.defaultLine,p=S.castOption(n,c,"marker.line.width")||0;o.call(e,a,n,i).style("stroke-width",p).call(x.stroke,m).style("opacity",h?n.leaf.opacity:null)}G.exports={style:t,styleOne:r}}}),RN=Xe({"src/traces/icicle/draw_descendants.js"(Z,G){"use strict";var v=Hn(),x=sa(),S=es(),E=ou(),e=IN(),t=mE().styleOne,r=dg(),o=Qv(),a=vx(),n=K3().formatSliceLabel,i=!1;G.exports=function(h,c,m,p,T){var l=T.width,_=T.height,w=T.viewX,A=T.viewY,M=T.pathSlice,g=T.toMoveInsideSlice,b=T.strTransform,d=T.hasTransition,u=T.handleSlicesExit,y=T.makeUpdateSliceInterpolator,f=T.makeUpdateTextInterpolator,R=T.prevEntry,L={},z=h._context.staticPlot,F=h._fullLayout,N=c[0],O=N.trace,P=O.textposition.indexOf("left")!==-1,U=O.textposition.indexOf("right")!==-1,B=O.textposition.indexOf("bottom")!==-1,X=e(m,[l,_],{flipX:O.tiling.flip.indexOf("x")>-1,flipY:O.tiling.flip.indexOf("y")>-1,orientation:O.tiling.orientation,pad:{inner:O.tiling.pad},maxDepth:O._maxDepth}),$=X.descendants(),se=1/0,le=-1/0;$.forEach(function(q){var oe=q.depth;oe>=O._maxDepth?(q.x0=q.x1=(q.x0+q.x1)/2,q.y0=q.y1=(q.y0+q.y1)/2):(se=Math.min(se,oe),le=Math.max(le,oe))}),p=p.data($,o.getPtId),O._maxVisibleLayers=isFinite(le)?le-se+1:0,p.enter().append("g").classed("slice",!0),u(p,i,L,[l,_],M),p.order();var fe=null;if(d&&R){var V=o.getPtId(R);p.each(function(q){fe===null&&o.getPtId(q)===V&&(fe={x0:q.x0,x1:q.x1,y0:q.y0,y1:q.y1})})}var Y=function(){return fe||{x0:0,x1:l,y0:0,y1:_}},ee=p;return d&&(ee=ee.transition().each("end",function(){var q=v.select(this);o.setSliceCursor(q,h,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),ee.each(function(q){q._x0=w(q.x0),q._x1=w(q.x1),q._y0=A(q.y0),q._y1=A(q.y1),q._hoverX=w(q.x1-O.tiling.pad),q._hoverY=A(B?q.y1-O.tiling.pad/2:q.y0+O.tiling.pad/2);var oe=v.select(this),ae=x.ensureSingle(oe,"path","surface",function(ce){ce.style("pointer-events",z?"none":"all")});d?ae.transition().attrTween("d",function(ce){var be=y(ce,i,Y(),[l,_],{orientation:O.tiling.orientation,flipX:O.tiling.flip.indexOf("x")>-1,flipY:O.tiling.flip.indexOf("y")>-1});return function(Ae){return M(be(Ae))}}):ae.attr("d",M),oe.call(a,m,h,c,{styleOne:t,eventDataKeys:r.eventDataKeys,transitionTime:r.CLICK_TRANSITION_TIME,transitionEasing:r.CLICK_TRANSITION_EASING}).call(o.setSliceCursor,h,{isTransitioning:h._transitioning}),ae.call(t,q,O,h,{hovered:!1}),q.x0===q.x1||q.y0===q.y1?q._text="":q._text=n(q,m,O,c,F)||"";var j=x.ensureSingle(oe,"g","slicetext"),Q=x.ensureSingle(j,"text","",function(ce){ce.attr("data-notex",1)}),re=x.ensureUniformFontSize(h,o.determineTextFont(O,q,F.font));Q.text(q._text||" ").classed("slicetext",!0).attr("text-anchor",U?"end":P?"start":"middle").call(S.font,re).call(E.convertToTspans,h),q.textBB=S.bBox(Q.node()),q.transform=g(q,{fontSize:re.size}),q.transform.fontSize=re.size,d?Q.transition().attrTween("transform",function(ce){var be=f(ce,i,Y(),[l,_]);return function(Ae){return b(be(Ae))}}):Q.attr("transform",b(q))}),fe}}}),DN=Xe({"src/traces/icicle/plot.js"(Z,G){"use strict";var v=hE(),x=RN();G.exports=function(E,e,t,r){return v(E,e,t,r,{type:"icicle",drawDescendants:x})}}}),zN=Xe({"src/traces/icicle/index.js"(Z,G){"use strict";G.exports={moduleType:"trace",name:"icicle",basePlotModule:CN(),categories:[],animatable:!0,attributes:pE(),layoutAttributes:dE(),supplyDefaults:LN(),supplyLayoutDefaults:PN(),calc:vE().calc,crossTraceCalc:vE().crossTraceCalc,plot:DN(),style:mE().style,colorbar:pp(),meta:{}}}}),FN=Xe({"lib/icicle.js"(Z,G){"use strict";G.exports=zN()}}),ON=Xe({"src/traces/funnelarea/base_plot.js"(Z){"use strict";var G=bc();Z.name="funnelarea",Z.plot=function(v,x,S,E){G.plotBasePlot(Z.name,v,x,S,E)},Z.clean=function(v,x,S,E){G.cleanBasePlot(Z.name,v,x,S,E)}}}),gE=Xe({"src/traces/funnelarea/attributes.js"(Z,G){"use strict";var v=og(),x=ru(),S=wc().attributes,{hovertemplateAttrs:E,texttemplateAttrs:e,templatefallbackAttrs:t}=Jl(),r=Qo().extendFlat;G.exports={labels:v.labels,label0:v.label0,dlabel:v.dlabel,values:v.values,marker:{colors:v.marker.colors,line:{color:r({},v.marker.line.color,{dflt:null}),width:r({},v.marker.line.width,{dflt:1}),editType:"calc"},pattern:v.marker.pattern,editType:"calc"},text:v.text,hovertext:v.hovertext,scalegroup:r({},v.scalegroup,{}),textinfo:r({},v.textinfo,{flags:["label","text","value","percent"]}),texttemplate:e({editType:"plot"},{keys:["label","color","value","text","percent"]}),texttemplatefallback:t({editType:"plot"}),hoverinfo:r({},x.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:E({},{keys:["label","color","value","text","percent"]}),hovertemplatefallback:t(),textposition:r({},v.textposition,{values:["inside","none"],dflt:"inside"}),textfont:v.textfont,insidetextfont:v.insidetextfont,title:{text:v.title.text,font:v.title.font,position:r({},v.title.position,{values:["top left","top center","top right"],dflt:"top center"}),editType:"plot"},domain:S({name:"funnelarea",trace:!0,editType:"calc"}),aspectratio:{valType:"number",min:0,dflt:1,editType:"plot"},baseratio:{valType:"number",min:0,max:1,dflt:.333,editType:"plot"}}}}),yE=Xe({"src/traces/funnelarea/layout_attributes.js"(Z,G){"use strict";var v=_3().hiddenlabels;G.exports={hiddenlabels:v,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),BN=Xe({"src/traces/funnelarea/defaults.js"(Z,G){"use strict";var v=sa(),x=gE(),S=wc().defaults,E=gd().handleText,e=sg().handleLabelsAndValues,t=sg().handleMarkerDefaults;G.exports=function(o,a,n,i){function s(M,g){return v.coerce(o,a,x,M,g)}var h=s("labels"),c=s("values"),m=e(h,c),p=m.len;if(a._hasLabels=m.hasLabels,a._hasValues=m.hasValues,!a._hasLabels&&a._hasValues&&(s("label0"),s("dlabel")),!p){a.visible=!1;return}a._length=p,t(o,a,i,s),s("scalegroup");var T=s("text"),l=s("texttemplate");s("texttemplatefallback");var _;if(l||(_=s("textinfo",Array.isArray(T)?"text+percent":"percent")),s("hovertext"),s("hovertemplate"),s("hovertemplatefallback"),l||_&&_!=="none"){var w=s("textposition");E(o,a,i,s,w,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}else _==="none"&&s("textposition","none");S(a,i,s);var A=s("title.text");A&&(s("title.position"),v.coerceFont(s,"title.font",i.font)),s("aspectratio"),s("baseratio")}}}),NN=Xe({"src/traces/funnelarea/layout_defaults.js"(Z,G){"use strict";var v=sa(),x=yE();G.exports=function(E,e){function t(r,o){return v.coerce(E,e,x,r,o)}t("hiddenlabels"),t("funnelareacolorway",e.colorway),t("extendfunnelareacolors")}}}),_E=Xe({"src/traces/funnelarea/calc.js"(Z,G){"use strict";var v=x1();function x(E,e){return v.calc(E,e)}function S(E){v.crossTraceCalc(E,{type:"funnelarea"})}G.exports={calc:x,crossTraceCalc:S}}}),UN=Xe({"src/traces/funnelarea/plot.js"(Z,G){"use strict";var v=Hn(),x=es(),S=sa(),E=S.strScale,e=S.strTranslate,t=ou(),r=tg(),o=r.toMoveInsideBar,a=Sp(),n=a.recordMinTextSize,i=a.clearMinTextSize,s=t0(),h=x3(),c=h.attachFxHandlers,m=h.determineInsideTextFont,p=h.layoutAreas,T=h.prerenderTitles,l=h.positionTitleOutside,_=h.formatSliceLabel;G.exports=function(b,d){var u=b._context.staticPlot,y=b._fullLayout;i("funnelarea",y),T(d,b),p(d,y._size),S.makeTraceGroups(y._funnelarealayer,d,"trace").each(function(f){var R=v.select(this),L=f[0],z=L.trace;M(f),R.each(function(){var F=v.select(this).selectAll("g.slice").data(f);F.enter().append("g").classed("slice",!0),F.exit().remove(),F.each(function(O,P){if(O.hidden){v.select(this).selectAll("path,g").remove();return}O.pointNumber=O.i,O.curveNumber=z.index;var U=L.cx,B=L.cy,X=v.select(this),$=X.selectAll("path.surface").data([O]);$.enter().append("path").classed("surface",!0).style({"pointer-events":u?"none":"all"}),X.call(c,b,f);var se="M"+(U+O.TR[0])+","+(B+O.TR[1])+w(O.TR,O.BR)+w(O.BR,O.BL)+w(O.BL,O.TL)+"Z";$.attr("d",se),_(b,O,L);var le=s.castOption(z.textposition,O.pts),fe=X.selectAll("g.slicetext").data(O.text&&le!=="none"?[0]:[]);fe.enter().append("g").classed("slicetext",!0),fe.exit().remove(),fe.each(function(){var V=S.ensureSingle(v.select(this),"text","",function(re){re.attr("data-notex",1)}),Y=S.ensureUniformFontSize(b,m(z,O,y.font));V.text(O.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(x.font,Y).call(t.convertToTspans,b);var ee=x.bBox(V.node()),q,oe,ae,j=Math.min(O.BL[1],O.BR[1])+B,Q=Math.max(O.TL[1],O.TR[1])+B;oe=Math.max(O.TL[0],O.BL[0])+U,ae=Math.min(O.TR[0],O.BR[0])+U,q=o(oe,ae,j,Q,ee,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"}),q.fontSize=Y.size,n(z.type,q,y),f[P].transform=q,S.setTransormAndDisplay(V,q)})});var N=v.select(this).selectAll("g.titletext").data(z.title.text?[0]:[]);N.enter().append("g").classed("titletext",!0),N.exit().remove(),N.each(function(){var O=S.ensureSingle(v.select(this),"text","",function(B){B.attr("data-notex",1)}),P=z.title.text;z._meta&&(P=S.templateString(P,z._meta)),O.text(P).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(x.font,z.title.font).call(t.convertToTspans,b);var U=l(L,y._size);O.attr("transform",e(U.x,U.y)+E(Math.min(1,U.scale))+e(U.tx,U.ty))})})})};function w(g,b){var d=b[0]-g[0],u=b[1]-g[1];return"l"+d+","+u}function A(g,b){return[.5*(g[0]+b[0]),.5*(g[1]+b[1])]}function M(g){if(!g.length)return;var b=g[0],d=b.trace,u=d.aspectratio,y=d.baseratio;y>.999&&(y=.999);var f=Math.pow(y,2),R=b.vTotal,L=R*f/(1-f),z=R,F=L/R;function N(){var ce=Math.sqrt(F);return{x:ce,y:-ce}}function O(){var ce=N();return[ce.x,ce.y]}var P,U=[];U.push(O());var B,X;for(B=g.length-1;B>-1;B--)if(X=g[B],!X.hidden){var $=X.v/z;F+=$,U.push(O())}var se=1/0,le=-1/0;for(B=0;B-1;B--)if(X=g[B],!X.hidden){j+=1;var Q=U[j][0],re=U[j][1];X.TL=[-Q,re],X.TR=[Q,re],X.BL=oe,X.BR=ae,X.pxmid=A(X.TR,X.BR),oe=X.TL,ae=X.TR}}}}),jN=Xe({"src/traces/funnelarea/style.js"(Z,G){"use strict";var v=Hn(),x=i1(),S=Sp().resizeText;G.exports=function(e){var t=e._fullLayout._funnelarealayer.selectAll(".trace");S(e,t,"funnelarea"),t.each(function(r){var o=r[0],a=o.trace,n=v.select(this);n.style({opacity:a.opacity}),n.selectAll("path.surface").each(function(i){v.select(this).call(x,i,a,e)})})}}}),qN=Xe({"src/traces/funnelarea/index.js"(Z,G){"use strict";G.exports={moduleType:"trace",name:"funnelarea",basePlotModule:ON(),categories:["pie-like","funnelarea","showLegend"],attributes:gE(),layoutAttributes:yE(),supplyDefaults:BN(),supplyLayoutDefaults:NN(),calc:_E().calc,crossTraceCalc:_E().crossTraceCalc,plot:UN(),style:jN(),styleOne:i1(),meta:{}}}}),VN=Xe({"lib/funnelarea.js"(Z,G){"use strict";G.exports=qN()}}),Yh=Xe({"stackgl_modules/index.js"(Z,G){(function(){var v={24:function(e){var t={left:0,top:0};e.exports=r;function r(a,n,i){n=n||a.currentTarget||a.srcElement,Array.isArray(i)||(i=[0,0]);var s=a.clientX||0,h=a.clientY||0,c=o(n);return i[0]=s-c.left,i[1]=h-c.top,i}function o(a){return a===window||a===document||a===document.body?t:a.getBoundingClientRect()}},109:function(e){e.exports=t;function t(r,o,a,n){var i=a[0],s=a[2],h=o[0]-i,c=o[2]-s,m=Math.sin(n),p=Math.cos(n);return r[0]=i+c*m+h*p,r[1]=o[1],r[2]=s+c*p-h*m,r}},160:function(e){e.exports=t;function t(r,o,a){return r[0]=Math.max(o[0],a[0]),r[1]=Math.max(o[1],a[1]),r[2]=Math.max(o[2],a[2]),r[3]=Math.max(o[3],a[3]),r}},216:function(e){"use strict";e.exports=t;function t(r,o){for(var a={},n=0;n1){m[0]in h||(h[m[0]]=[]),h=h[m[0]];for(var p=1;p=0;--P){var Y=N[P];U=Y[0];var ee=z[U],q=ee[0],oe=ee[1],ae=L[q],j=L[oe];if((ae[0]-j[0]||ae[1]-j[1])<0){var Q=q;q=oe,oe=Q}ee[0]=q;var re=ee[1]=Y[1],ce;for(O&&(ce=ee[2]);P>0&&N[P-1][0]===U;){var Y=N[--P],be=Y[1];O?z.push([re,be,ce]):z.push([re,be]),re=be}O?z.push([re,oe,ce]):z.push([re,oe])}return B}function g(L,z,F){for(var N=z.length,O=new o(N),P=[],U=0;Uz[2]?1:0)}function u(L,z,F){if(L.length!==0){if(z)for(var N=0;N0||U.length>0}function R(L,z,F){var N;if(F){N=z;for(var O=new Array(z.length),P=0;P 0 U ||b|| > 0. // Assign z = 0, x = -b, y = a: // a*-b + b*a + c*0 = -ba + ba + 0 = 0 if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) { return normalize(vec3(-v.y, v.x, 0.0)); } else { return normalize(vec3(0.0, v.z, -v.y)); } } // Calculate the cone vertex and normal at the given index. // // The returned vertex is for a cone with its top at origin and height of 1.0, // pointing in the direction of the vector attribute. // // Each cone is made up of a top vertex, a center base vertex and base perimeter vertices. // These vertices are used to make up the triangles of the cone by the following: // segment + 0 top vertex // segment + 1 perimeter vertex a+1 // segment + 2 perimeter vertex a // segment + 3 center base vertex // segment + 4 perimeter vertex a // segment + 5 perimeter vertex a+1 // Where segment is the number of the radial segment * 6 and a is the angle at that radial segment. // To go from index to segment, floor(index / 6) // To go from segment to angle, 2*pi * (segment/segmentCount) // To go from index to segment index, index - (segment*6) // vec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) { const float segmentCount = 8.0; float index = rawIndex - floor(rawIndex / (segmentCount * 6.0)) * (segmentCount * 6.0); float segment = floor(0.001 + index/6.0); float segmentIndex = index - (segment*6.0); normal = -normalize(d); if (segmentIndex > 2.99 && segmentIndex < 3.01) { return mix(vec3(0.0), -d, coneOffset); } float nextAngle = ( (segmentIndex > 0.99 && segmentIndex < 1.01) || (segmentIndex > 4.99 && segmentIndex < 5.01) ) ? 1.0 : 0.0; float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount); vec3 v1 = mix(d, vec3(0.0), coneOffset); vec3 v2 = v1 - d; vec3 u = getOrthogonalVector(d); vec3 v = normalize(cross(u, d)); vec3 x = u * cos(angle) * length(d)*0.25; vec3 y = v * sin(angle) * length(d)*0.25; vec3 v3 = v2 + x + y; if (segmentIndex < 3.0) { vec3 tx = u * sin(angle); vec3 ty = v * -cos(angle); vec3 tangent = tx + ty; normal = normalize(cross(v3 - v1, tangent)); } if (segmentIndex == 0.0) { return mix(d, vec3(0.0), coneOffset); } return v3; } attribute vec3 vector; attribute vec4 color, position; attribute vec2 uv; uniform float vectorScale, coneScale, coneOffset; uniform mat4 model, view, projection, inverseModel; uniform vec3 eyePosition, lightPosition; varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position; varying vec4 f_color; varying vec2 f_uv; void main() { // Scale the vector magnitude to stay constant with // model & view changes. vec3 normal; vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector), position.w, coneOffset, normal); vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0); //Lighting geometry parameters vec4 cameraCoordinate = view * conePosition; cameraCoordinate.xyz /= cameraCoordinate.w; f_lightDirection = lightPosition - cameraCoordinate.xyz; f_eyeDirection = eyePosition - cameraCoordinate.xyz; f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz); // vec4 m_position = model * vec4(conePosition, 1.0); vec4 t_position = view * conePosition; gl_Position = projection * t_position; f_color = color; f_data = conePosition.xyz; f_position = position.xyz; f_uv = uv; } `]),n=o([`#extension GL_OES_standard_derivatives : enable precision highp float; #define GLSLIFY 1 float beckmannDistribution(float x, float roughness) { float NdotH = max(x, 0.0001); float cos2Alpha = NdotH * NdotH; float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha; float roughness2 = roughness * roughness; float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha; return exp(tan2Alpha / roughness2) / denom; } float cookTorranceSpecular( vec3 lightDirection, vec3 viewDirection, vec3 surfaceNormal, float roughness, float fresnel) { float VdotN = max(dot(viewDirection, surfaceNormal), 0.0); float LdotN = max(dot(lightDirection, surfaceNormal), 0.0); //Half angle vector vec3 H = normalize(lightDirection + viewDirection); //Geometric term float NdotH = max(dot(surfaceNormal, H), 0.0); float VdotH = max(dot(viewDirection, H), 0.000001); float LdotH = max(dot(lightDirection, H), 0.000001); float G1 = (2.0 * NdotH * VdotN) / VdotH; float G2 = (2.0 * NdotH * LdotN) / LdotH; float G = min(1.0, min(G1, G2)); //Distribution term float D = beckmannDistribution(NdotH, roughness); //Fresnel term float F = pow(1.0 - VdotN, fresnel); //Multiply terms and done return G * F * D / max(3.14159265 * VdotN, 0.000001); } bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 clipBounds[2]; uniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity; uniform sampler2D texture; varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position; varying vec4 f_color; varying vec2 f_uv; void main() { if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; vec3 N = normalize(f_normal); vec3 L = normalize(f_lightDirection); vec3 V = normalize(f_eyeDirection); if(gl_FrontFacing) { N = -N; } float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel))); float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0); vec4 surfaceColor = f_color * texture2D(texture, f_uv); vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0); gl_FragColor = litColor * opacity; } `]),i=o([`precision highp float; precision highp float; #define GLSLIFY 1 vec3 getOrthogonalVector(vec3 v) { // Return up-vector for only-z vector. // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0). // From the above if-statement we have ||a|| > 0 U ||b|| > 0. // Assign z = 0, x = -b, y = a: // a*-b + b*a + c*0 = -ba + ba + 0 = 0 if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) { return normalize(vec3(-v.y, v.x, 0.0)); } else { return normalize(vec3(0.0, v.z, -v.y)); } } // Calculate the cone vertex and normal at the given index. // // The returned vertex is for a cone with its top at origin and height of 1.0, // pointing in the direction of the vector attribute. // // Each cone is made up of a top vertex, a center base vertex and base perimeter vertices. // These vertices are used to make up the triangles of the cone by the following: // segment + 0 top vertex // segment + 1 perimeter vertex a+1 // segment + 2 perimeter vertex a // segment + 3 center base vertex // segment + 4 perimeter vertex a // segment + 5 perimeter vertex a+1 // Where segment is the number of the radial segment * 6 and a is the angle at that radial segment. // To go from index to segment, floor(index / 6) // To go from segment to angle, 2*pi * (segment/segmentCount) // To go from index to segment index, index - (segment*6) // vec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) { const float segmentCount = 8.0; float index = rawIndex - floor(rawIndex / (segmentCount * 6.0)) * (segmentCount * 6.0); float segment = floor(0.001 + index/6.0); float segmentIndex = index - (segment*6.0); normal = -normalize(d); if (segmentIndex > 2.99 && segmentIndex < 3.01) { return mix(vec3(0.0), -d, coneOffset); } float nextAngle = ( (segmentIndex > 0.99 && segmentIndex < 1.01) || (segmentIndex > 4.99 && segmentIndex < 5.01) ) ? 1.0 : 0.0; float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount); vec3 v1 = mix(d, vec3(0.0), coneOffset); vec3 v2 = v1 - d; vec3 u = getOrthogonalVector(d); vec3 v = normalize(cross(u, d)); vec3 x = u * cos(angle) * length(d)*0.25; vec3 y = v * sin(angle) * length(d)*0.25; vec3 v3 = v2 + x + y; if (segmentIndex < 3.0) { vec3 tx = u * sin(angle); vec3 ty = v * -cos(angle); vec3 tangent = tx + ty; normal = normalize(cross(v3 - v1, tangent)); } if (segmentIndex == 0.0) { return mix(d, vec3(0.0), coneOffset); } return v3; } attribute vec4 vector; attribute vec4 position; attribute vec4 id; uniform mat4 model, view, projection; uniform float vectorScale, coneScale, coneOffset; varying vec3 f_position; varying vec4 f_id; void main() { vec3 normal; vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector.xyz), position.w, coneOffset, normal); vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0); gl_Position = projection * (view * conePosition); f_id = id; f_position = position.xyz; } `]),s=o([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 clipBounds[2]; uniform float pickId; varying vec3 f_position; varying vec4 f_id; void main() { if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; gl_FragColor = vec4(pickId, f_id.xyz); }`]);t.meshShader={vertex:a,fragment:n,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},t.pickShader={vertex:i,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}},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"]},665:function(e,t,r){"use strict";var o=r(3202);e.exports=s;var a=96;function n(h,c){var m=o(getComputedStyle(h).getPropertyValue(c));return m[0]*s(m[1],h)}function i(h,c){var m=document.createElement("div");m.style["font-size"]="128"+h,c.appendChild(m);var p=n(m,"font-size")/128;return c.removeChild(m),p}function s(h,c){switch(c=c||document.body,h=(h||"px").trim().toLowerCase(),(c===window||c===document)&&(c=document.body),h){case"%":return c.clientHeight/100;case"ch":case"ex":return i(h,c);case"em":return n(c,"font-size");case"rem":return n(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 a;case"cm":return a/2.54;case"mm":return a/25.4;case"pt":return a/72;case"pc":return a/6}return 1}},727:function(e,t,r){"use strict";var o=r(2962),a=6;function n(A){var M=A===2?h:A===3?c:A===4?m:A===5?p:T;return A<6?M(o[A]):M(o)}function i(){return[[0]]}function s(A,M){return[[M[0]],[A[0][0]]]}function h(A){return function(g,b){return[A([[+b[0],+g[0][1]],[+b[1],+g[1][1]]]),A([[+g[0][0],+b[0]],[+g[1][0],+b[1]]]),A(g)]}}function c(A){return function(g,b){return[A([[+b[0],+g[0][1],+g[0][2]],[+b[1],+g[1][1],+g[1][2]],[+b[2],+g[2][1],+g[2][2]]]),A([[+g[0][0],+b[0],+g[0][2]],[+g[1][0],+b[1],+g[1][2]],[+g[2][0],+b[2],+g[2][2]]]),A([[+g[0][0],+g[0][1],+b[0]],[+g[1][0],+g[1][1],+b[1]],[+g[2][0],+g[2][1],+b[2]]]),A(g)]}}function m(A){return function(g,b){return[A([[+b[0],+g[0][1],+g[0][2],+g[0][3]],[+b[1],+g[1][1],+g[1][2],+g[1][3]],[+b[2],+g[2][1],+g[2][2],+g[2][3]],[+b[3],+g[3][1],+g[3][2],+g[3][3]]]),A([[+g[0][0],+b[0],+g[0][2],+g[0][3]],[+g[1][0],+b[1],+g[1][2],+g[1][3]],[+g[2][0],+b[2],+g[2][2],+g[2][3]],[+g[3][0],+b[3],+g[3][2],+g[3][3]]]),A([[+g[0][0],+g[0][1],+b[0],+g[0][3]],[+g[1][0],+g[1][1],+b[1],+g[1][3]],[+g[2][0],+g[2][1],+b[2],+g[2][3]],[+g[3][0],+g[3][1],+b[3],+g[3][3]]]),A([[+g[0][0],+g[0][1],+g[0][2],+b[0]],[+g[1][0],+g[1][1],+g[1][2],+b[1]],[+g[2][0],+g[2][1],+g[2][2],+b[2]],[+g[3][0],+g[3][1],+g[3][2],+b[3]]]),A(g)]}}function p(A){return function(g,b){return[A([[+b[0],+g[0][1],+g[0][2],+g[0][3],+g[0][4]],[+b[1],+g[1][1],+g[1][2],+g[1][3],+g[1][4]],[+b[2],+g[2][1],+g[2][2],+g[2][3],+g[2][4]],[+b[3],+g[3][1],+g[3][2],+g[3][3],+g[3][4]],[+b[4],+g[4][1],+g[4][2],+g[4][3],+g[4][4]]]),A([[+g[0][0],+b[0],+g[0][2],+g[0][3],+g[0][4]],[+g[1][0],+b[1],+g[1][2],+g[1][3],+g[1][4]],[+g[2][0],+b[2],+g[2][2],+g[2][3],+g[2][4]],[+g[3][0],+b[3],+g[3][2],+g[3][3],+g[3][4]],[+g[4][0],+b[4],+g[4][2],+g[4][3],+g[4][4]]]),A([[+g[0][0],+g[0][1],+b[0],+g[0][3],+g[0][4]],[+g[1][0],+g[1][1],+b[1],+g[1][3],+g[1][4]],[+g[2][0],+g[2][1],+b[2],+g[2][3],+g[2][4]],[+g[3][0],+g[3][1],+b[3],+g[3][3],+g[3][4]],[+g[4][0],+g[4][1],+b[4],+g[4][3],+g[4][4]]]),A([[+g[0][0],+g[0][1],+g[0][2],+b[0],+g[0][4]],[+g[1][0],+g[1][1],+g[1][2],+b[1],+g[1][4]],[+g[2][0],+g[2][1],+g[2][2],+b[2],+g[2][4]],[+g[3][0],+g[3][1],+g[3][2],+b[3],+g[3][4]],[+g[4][0],+g[4][1],+g[4][2],+b[4],+g[4][4]]]),A([[+g[0][0],+g[0][1],+g[0][2],+g[0][3],+b[0]],[+g[1][0],+g[1][1],+g[1][2],+g[1][3],+b[1]],[+g[2][0],+g[2][1],+g[2][2],+g[2][3],+b[2]],[+g[3][0],+g[3][1],+g[3][2],+g[3][3],+b[3]],[+g[4][0],+g[4][1],+g[4][2],+g[4][3],+b[4]]]),A(g)]}}function T(A){return function(g,b){return[A([[+b[0],+g[0][1],+g[0][2],+g[0][3],+g[0][4],+g[0][5]],[+b[1],+g[1][1],+g[1][2],+g[1][3],+g[1][4],+g[1][5]],[+b[2],+g[2][1],+g[2][2],+g[2][3],+g[2][4],+g[2][5]],[+b[3],+g[3][1],+g[3][2],+g[3][3],+g[3][4],+g[3][5]],[+b[4],+g[4][1],+g[4][2],+g[4][3],+g[4][4],+g[4][5]],[+b[5],+g[5][1],+g[5][2],+g[5][3],+g[5][4],+g[5][5]]]),A([[+g[0][0],+b[0],+g[0][2],+g[0][3],+g[0][4],+g[0][5]],[+g[1][0],+b[1],+g[1][2],+g[1][3],+g[1][4],+g[1][5]],[+g[2][0],+b[2],+g[2][2],+g[2][3],+g[2][4],+g[2][5]],[+g[3][0],+b[3],+g[3][2],+g[3][3],+g[3][4],+g[3][5]],[+g[4][0],+b[4],+g[4][2],+g[4][3],+g[4][4],+g[4][5]],[+g[5][0],+b[5],+g[5][2],+g[5][3],+g[5][4],+g[5][5]]]),A([[+g[0][0],+g[0][1],+b[0],+g[0][3],+g[0][4],+g[0][5]],[+g[1][0],+g[1][1],+b[1],+g[1][3],+g[1][4],+g[1][5]],[+g[2][0],+g[2][1],+b[2],+g[2][3],+g[2][4],+g[2][5]],[+g[3][0],+g[3][1],+b[3],+g[3][3],+g[3][4],+g[3][5]],[+g[4][0],+g[4][1],+b[4],+g[4][3],+g[4][4],+g[4][5]],[+g[5][0],+g[5][1],+b[5],+g[5][3],+g[5][4],+g[5][5]]]),A([[+g[0][0],+g[0][1],+g[0][2],+b[0],+g[0][4],+g[0][5]],[+g[1][0],+g[1][1],+g[1][2],+b[1],+g[1][4],+g[1][5]],[+g[2][0],+g[2][1],+g[2][2],+b[2],+g[2][4],+g[2][5]],[+g[3][0],+g[3][1],+g[3][2],+b[3],+g[3][4],+g[3][5]],[+g[4][0],+g[4][1],+g[4][2],+b[4],+g[4][4],+g[4][5]],[+g[5][0],+g[5][1],+g[5][2],+b[5],+g[5][4],+g[5][5]]]),A([[+g[0][0],+g[0][1],+g[0][2],+g[0][3],+b[0],+g[0][5]],[+g[1][0],+g[1][1],+g[1][2],+g[1][3],+b[1],+g[1][5]],[+g[2][0],+g[2][1],+g[2][2],+g[2][3],+b[2],+g[2][5]],[+g[3][0],+g[3][1],+g[3][2],+g[3][3],+b[3],+g[3][5]],[+g[4][0],+g[4][1],+g[4][2],+g[4][3],+b[4],+g[4][5]],[+g[5][0],+g[5][1],+g[5][2],+g[5][3],+b[5],+g[5][5]]]),A([[+g[0][0],+g[0][1],+g[0][2],+g[0][3],+g[0][4],+b[0]],[+g[1][0],+g[1][1],+g[1][2],+g[1][3],+g[1][4],+b[1]],[+g[2][0],+g[2][1],+g[2][2],+g[2][3],+g[2][4],+b[2]],[+g[3][0],+g[3][1],+g[3][2],+g[3][3],+g[3][4],+b[3]],[+g[4][0],+g[4][1],+g[4][2],+g[4][3],+g[4][4],+b[4]],[+g[5][0],+g[5][1],+g[5][2],+g[5][3],+g[5][4],+b[5]]]),A(g)]}}var l=[i,s];function _(A,M,g,b,d,u,y,f){return function(L,z){switch(L.length){case 0:return A(L,z);case 1:return M(L,z);case 2:return g(L,z);case 3:return b(L,z);case 4:return d(L,z);case 5:return u(L,z)}var F=y[L.length];return F||(F=y[L.length]=f(L.length)),F(L,z)}}function w(){for(;l.length1e-6?(_=Math.acos(w),A=Math.sin(_),M=Math.sin((1-n)*_)/A,g=Math.sin(n*_)/A):(M=1-n,g=n),r[0]=M*i+g*m,r[1]=M*s+g*p,r[2]=M*h+g*T,r[3]=M*c+g*l,r}},799:function(e,t,r){var o=r(3236),a=r(9405),n=o([`precision mediump float; #define GLSLIFY 1 attribute vec2 position; varying vec2 uv; void main() { uv = position; gl_Position = vec4(position, 0, 1); }`]),i=o([`precision mediump float; #define GLSLIFY 1 uniform sampler2D accumBuffer; varying vec2 uv; void main() { vec4 accum = texture2D(accumBuffer, 0.5 * (uv + 1.0)); gl_FragColor = min(vec4(1,1,1,1), accum); }`]);e.exports=function(s){return a(s,n,i,null,[{name:"position",type:"vec2"}])}},811:function(e){e.exports=t;function t(r,o){return r[0]=1/o[0],r[1]=1/o[1],r[2]=1/o[2],r}},840:function(e,t,r){var o=r(3236),a=o([`precision highp float; #define GLSLIFY 1 attribute vec3 position, normal; attribute vec4 color; attribute vec2 uv; uniform mat4 model , view , projection , inverseModel; uniform vec3 eyePosition , lightPosition; varying vec3 f_normal , f_lightDirection , f_eyeDirection , f_data; varying vec4 f_color; varying vec2 f_uv; vec4 project(vec3 p) { return projection * (view * (model * vec4(p, 1.0))); } void main() { gl_Position = project(position); //Lighting geometry parameters vec4 cameraCoordinate = view * vec4(position , 1.0); cameraCoordinate.xyz /= cameraCoordinate.w; f_lightDirection = lightPosition - cameraCoordinate.xyz; f_eyeDirection = eyePosition - cameraCoordinate.xyz; f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz); f_color = color; f_data = position; f_uv = uv; } `]),n=o([`#extension GL_OES_standard_derivatives : enable precision highp float; #define GLSLIFY 1 float beckmannDistribution(float x, float roughness) { float NdotH = max(x, 0.0001); float cos2Alpha = NdotH * NdotH; float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha; float roughness2 = roughness * roughness; float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha; return exp(tan2Alpha / roughness2) / denom; } float cookTorranceSpecular( vec3 lightDirection, vec3 viewDirection, vec3 surfaceNormal, float roughness, float fresnel) { float VdotN = max(dot(viewDirection, surfaceNormal), 0.0); float LdotN = max(dot(lightDirection, surfaceNormal), 0.0); //Half angle vector vec3 H = normalize(lightDirection + viewDirection); //Geometric term float NdotH = max(dot(surfaceNormal, H), 0.0); float VdotH = max(dot(viewDirection, H), 0.000001); float LdotH = max(dot(lightDirection, H), 0.000001); float G1 = (2.0 * NdotH * VdotN) / VdotH; float G2 = (2.0 * NdotH * LdotN) / LdotH; float G = min(1.0, min(G1, G2)); //Distribution term float D = beckmannDistribution(NdotH, roughness); //Fresnel term float F = pow(1.0 - VdotN, fresnel); //Multiply terms and done return G * F * D / max(3.14159265 * VdotN, 0.000001); } //#pragma glslify: beckmann = require(glsl-specular-beckmann) // used in gl-surface3d bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 clipBounds[2]; uniform float roughness , fresnel , kambient , kdiffuse , kspecular; uniform sampler2D texture; varying vec3 f_normal , f_lightDirection , f_eyeDirection , f_data; varying vec4 f_color; varying vec2 f_uv; void main() { if (f_color.a == 0.0 || outOfRange(clipBounds[0], clipBounds[1], f_data) ) discard; vec3 N = normalize(f_normal); vec3 L = normalize(f_lightDirection); vec3 V = normalize(f_eyeDirection); if(gl_FrontFacing) { N = -N; } float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel))); //float specular = max(0.0, beckmann(L, V, N, roughness)); // used in gl-surface3d float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0); vec4 surfaceColor = vec4(f_color.rgb, 1.0) * texture2D(texture, f_uv); vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0); gl_FragColor = litColor * f_color.a; } `]),i=o([`precision highp float; #define GLSLIFY 1 attribute vec3 position; attribute vec4 color; attribute vec2 uv; uniform mat4 model, view, projection; varying vec4 f_color; varying vec3 f_data; varying vec2 f_uv; void main() { gl_Position = projection * (view * (model * vec4(position, 1.0))); f_color = color; f_data = position; f_uv = uv; }`]),s=o([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 clipBounds[2]; uniform sampler2D texture; uniform float opacity; varying vec4 f_color; varying vec3 f_data; varying vec2 f_uv; void main() { if (outOfRange(clipBounds[0], clipBounds[1], f_data)) discard; gl_FragColor = f_color * texture2D(texture, f_uv) * opacity; }`]),h=o([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } attribute vec3 position; attribute vec4 color; attribute vec2 uv; attribute float pointSize; uniform mat4 model, view, projection; uniform vec3 clipBounds[2]; varying vec4 f_color; varying vec2 f_uv; void main() { if (outOfRange(clipBounds[0], clipBounds[1], position)) { gl_Position = vec4(0.0, 0.0 ,0.0 ,0.0); } else { gl_Position = projection * (view * (model * vec4(position, 1.0))); } gl_PointSize = pointSize; f_color = color; f_uv = uv; }`]),c=o([`precision highp float; #define GLSLIFY 1 uniform sampler2D texture; uniform float opacity; varying vec4 f_color; varying vec2 f_uv; void main() { vec2 pointR = gl_PointCoord.xy - vec2(0.5, 0.5); if(dot(pointR, pointR) > 0.25) { discard; } gl_FragColor = f_color * texture2D(texture, f_uv) * opacity; }`]),m=o([`precision highp float; #define GLSLIFY 1 attribute vec3 position; attribute vec4 id; uniform mat4 model, view, projection; varying vec3 f_position; varying vec4 f_id; void main() { gl_Position = projection * (view * (model * vec4(position, 1.0))); f_id = id; f_position = position; }`]),p=o([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 clipBounds[2]; uniform float pickId; varying vec3 f_position; varying vec4 f_id; void main() { if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; gl_FragColor = vec4(pickId, f_id.xyz); }`]),T=o([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } attribute vec3 position; attribute float pointSize; attribute vec4 id; uniform mat4 model, view, projection; uniform vec3 clipBounds[2]; varying vec3 f_position; varying vec4 f_id; void main() { if (outOfRange(clipBounds[0], clipBounds[1], position)) { gl_Position = vec4(0.0, 0.0, 0.0, 0.0); } else { gl_Position = projection * (view * (model * vec4(position, 1.0))); gl_PointSize = pointSize; } f_id = id; f_position = position; }`]),l=o([`precision highp float; #define GLSLIFY 1 attribute vec3 position; uniform mat4 model, view, projection; void main() { gl_Position = projection * (view * (model * vec4(position, 1.0))); }`]),_=o([`precision highp float; #define GLSLIFY 1 uniform vec3 contourColor; void main() { gl_FragColor = vec4(contourColor, 1.0); } `]);t.meshShader={vertex:a,fragment:n,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},t.wireShader={vertex:i,fragment:s,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},t.pointShader={vertex:h,fragment:c,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},t.pickShader={vertex:m,fragment:p,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},t.pointPickShader={vertex:T,fragment:p,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},t.contourShader={vertex:l,fragment:_,attributes:[{name:"position",type:"vec3"}]}},855:function(e,t,r){"use strict";e.exports={init:w,sweepBipartite:g,sweepComplete:b,scanBipartite:d,scanComplete:u};var o=r(1888),a=r(8828),n=r(4192),i=1<<28,s=1024,h=o.mallocInt32(s),c=o.mallocInt32(s),m=o.mallocInt32(s),p=o.mallocInt32(s),T=o.mallocInt32(s),l=o.mallocInt32(s),_=o.mallocDouble(s*8);function w(y){var f=a.nextPow2(y);h.length>>1;n(_,ee);for(var q=0,oe=0,le=0;le=i)ae=ae-i|0,A(m,p,oe--,ae);else if(ae>=0)A(h,c,q--,ae);else if(ae<=-i){ae=-ae-i|0;for(var j=0;j>>1;n(_,ee);for(var q=0,oe=0,ae=0,le=0;le>1===_[2*le+3]>>1&&(Q=2,le+=1),j<0){for(var re=-(j>>1)-1,ce=0;ce>1)-1;Q===0?A(h,c,q--,re):Q===1?A(m,p,oe--,re):Q===2&&A(T,l,ae--,re)}}}function d(y,f,R,L,z,F,N,O,P,U,B,X){var $=0,se=2*y,le=f,fe=f+y,V=1,Y=1;L?Y=i:V=i;for(var ee=z;ee>>1;n(_,j);for(var Q=0,ee=0;ee=i?(ce=!L,q-=i):(ce=!!L,q-=1),ce)M(h,c,Q++,q);else{var be=X[q],Ae=se*q,De=B[Ae+f+1],ze=B[Ae+f+1+y];e:for(var Ze=0;Ze>>1;n(_,q);for(var oe=0,fe=0;fe=i)h[oe++]=V-i;else{V-=1;var j=B[V],Q=$*V,re=U[Q+f+1],ce=U[Q+f+1+y];e:for(var be=0;be=0;--be)if(h[be]===V){for(var Ze=be+1;Ze max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 lowerBound, upperBound; uniform float contourTint; uniform vec4 contourColor; uniform sampler2D colormap; uniform vec3 clipBounds[2]; uniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity; uniform float vertexColor; varying float value, kill; varying vec3 worldCoordinate; varying vec3 lightDirection, eyeDirection, surfaceNormal; varying vec4 vColor; void main() { if ( kill > 0.0 || vColor.a == 0.0 || outOfRange(clipBounds[0], clipBounds[1], worldCoordinate) ) discard; vec3 N = normalize(surfaceNormal); vec3 V = normalize(eyeDirection); vec3 L = normalize(lightDirection); if(gl_FrontFacing) { N = -N; } float specular = max(beckmannSpecular(L, V, N, roughness), 0.); float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0); //decide how to interpolate color \u2014 in vertex or in fragment vec4 surfaceColor = step(vertexColor, .5) * texture2D(colormap, vec2(value, value)) + step(.5, vertexColor) * vColor; vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0); gl_FragColor = mix(litColor, contourColor, contourTint) * opacity; } `]),s=a([`precision highp float; #define GLSLIFY 1 attribute vec4 uv; attribute float f; uniform vec3 objectOffset; uniform mat3 permutation; uniform mat4 model, view, projection; uniform float height, zOffset; uniform sampler2D colormap; varying float value, kill; varying vec3 worldCoordinate; varying vec2 planeCoordinate; varying vec3 lightDirection, eyeDirection, surfaceNormal; varying vec4 vColor; void main() { vec3 dataCoordinate = permutation * vec3(uv.xy, height); worldCoordinate = objectOffset + dataCoordinate; mat4 objectOffsetTranslation = mat4(1.0) + mat4(vec4(0), vec4(0), vec4(0), vec4(objectOffset, 0)); vec4 worldPosition = (model * objectOffsetTranslation) * vec4(dataCoordinate, 1.0); vec4 clipPosition = projection * (view * worldPosition); clipPosition.z += zOffset; gl_Position = clipPosition; value = f + objectOffset.z; kill = -1.0; planeCoordinate = uv.zw; vColor = texture2D(colormap, vec2(value, value)); //Don't do lighting for contours surfaceNormal = vec3(1,0,0); eyeDirection = vec3(0,1,0); lightDirection = vec3(0,0,1); } `]),h=a([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec2 shape; uniform vec3 clipBounds[2]; uniform float pickId; varying float value, kill; varying vec3 worldCoordinate; varying vec2 planeCoordinate; varying vec3 surfaceNormal; vec2 splitFloat(float v) { float vh = 255.0 * v; float upper = floor(vh); float lower = fract(vh); return vec2(upper / 255.0, floor(lower * 16.0) / 16.0); } void main() { if ((kill > 0.0) || (outOfRange(clipBounds[0], clipBounds[1], worldCoordinate))) discard; vec2 ux = splitFloat(planeCoordinate.x / shape.x); vec2 uy = splitFloat(planeCoordinate.y / shape.y); gl_FragColor = vec4(pickId, ux.x, uy.x, ux.y + (uy.y/16.0)); } `]);t.createShader=function(c){var m=o(c,n,i,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return m.attributes.uv.location=0,m.attributes.f.location=1,m.attributes.normal.location=2,m},t.createPickShader=function(c){var m=o(c,n,h,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return m.attributes.uv.location=0,m.attributes.f.location=1,m.attributes.normal.location=2,m},t.createContourShader=function(c){var m=o(c,s,i,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return m.attributes.uv.location=0,m.attributes.f.location=1,m},t.createPickContourShader=function(c){var m=o(c,s,h,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return m.attributes.uv.location=0,m.attributes.f.location=1,m}},1085:function(e,t,r){var o=r(1371);e.exports=a;function a(n,i,s){i=typeof i=="number"?i:1,s=s||": ";var h=n.split(/\r?\n/),c=String(h.length+i-1).length;return h.map(function(m,p){var T=p+i,l=String(T).length,_=o(T,c-l);return _+s+m}).join(` `)}},1091:function(e){e.exports=t;function t(){var r=new Float32Array(3);return r[0]=0,r[1]=0,r[2]=0,r}},1125:function(e,t,r){"use strict";e.exports=n;var o=r(3250)[3];function a(i,s,h,c){for(var m=0;m<2;++m){var p=i[m],T=s[m],l=Math.min(p,T),_=Math.max(p,T),w=h[m],A=c[m],M=Math.min(w,A),g=Math.max(w,A);if(g0&&p>0||m<0&&p<0)return!1;var T=o(h,i,s),l=o(c,i,s);return T>0&&l>0||T<0&&l<0?!1:m===0&&p===0&&T===0&&l===0?a(i,s,h,c):!0}},1278:function(e,t,r){"use strict";var o=r(2361),a=Math.pow(2,-1074),n=-1>>>0;e.exports=i;function i(s,h){if(isNaN(s)||isNaN(h))return NaN;if(s===h)return s;if(s===0)return h<0?-a:a;var c=o.hi(s),m=o.lo(s);return h>s==s>0?m===n?(c+=1,m=0):m+=1:m===0?(m=n,c-=1):m-=1,o.pack(m,c)}},1283:function(e,t,r){var o=r(9405),a=r(3236),n=a([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } attribute vec3 position; attribute vec4 color; attribute vec2 glyph; attribute vec4 id; uniform vec4 highlightId; uniform float highlightScale; uniform mat4 model, view, projection; uniform vec3 clipBounds[2]; varying vec4 interpColor; varying vec4 pickId; varying vec3 dataCoordinate; void main() { if (outOfRange(clipBounds[0], clipBounds[1], position)) { gl_Position = vec4(0,0,0,0); } else { float scale = 1.0; if(distance(highlightId, id) < 0.0001) { scale = highlightScale; } vec4 worldPosition = model * vec4(position, 1); vec4 viewPosition = view * worldPosition; viewPosition = viewPosition / viewPosition.w; vec4 clipPosition = projection * (viewPosition + scale * vec4(glyph.x, -glyph.y, 0, 0)); gl_Position = clipPosition; interpColor = color; pickId = id; dataCoordinate = position; } }`]),i=a([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } attribute vec3 position; attribute vec4 color; attribute vec2 glyph; attribute vec4 id; uniform mat4 model, view, projection; uniform vec2 screenSize; uniform vec3 clipBounds[2]; uniform float highlightScale, pixelRatio; uniform vec4 highlightId; varying vec4 interpColor; varying vec4 pickId; varying vec3 dataCoordinate; void main() { if (outOfRange(clipBounds[0], clipBounds[1], position)) { gl_Position = vec4(0,0,0,0); } else { float scale = pixelRatio; if(distance(highlightId.bgr, id.bgr) < 0.001) { scale *= highlightScale; } vec4 worldPosition = model * vec4(position, 1.0); vec4 viewPosition = view * worldPosition; vec4 clipPosition = projection * viewPosition; clipPosition /= clipPosition.w; gl_Position = clipPosition + vec4(screenSize * scale * vec2(glyph.x, -glyph.y), 0.0, 0.0); interpColor = color; pickId = id; dataCoordinate = position; } }`]),s=a([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } attribute vec3 position; attribute vec4 color; attribute vec2 glyph; attribute vec4 id; uniform float highlightScale; uniform vec4 highlightId; uniform vec3 axes[2]; uniform mat4 model, view, projection; uniform vec2 screenSize; uniform vec3 clipBounds[2]; uniform float scale, pixelRatio; varying vec4 interpColor; varying vec4 pickId; varying vec3 dataCoordinate; void main() { if (outOfRange(clipBounds[0], clipBounds[1], position)) { gl_Position = vec4(0,0,0,0); } else { float lscale = pixelRatio * scale; if(distance(highlightId, id) < 0.0001) { lscale *= highlightScale; } vec4 clipCenter = projection * (view * (model * vec4(position, 1))); vec3 dataPosition = position + 0.5*lscale*(axes[0] * glyph.x + axes[1] * glyph.y) * clipCenter.w * screenSize.y; vec4 clipPosition = projection * (view * (model * vec4(dataPosition, 1))); gl_Position = clipPosition; interpColor = color; pickId = id; dataCoordinate = dataPosition; } } `]),h=a([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 fragClipBounds[2]; uniform float opacity; varying vec4 interpColor; varying vec3 dataCoordinate; void main() { if ( outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate) || interpColor.a * opacity == 0. ) discard; gl_FragColor = interpColor * opacity; } `]),c=a([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 fragClipBounds[2]; uniform float pickGroup; varying vec4 pickId; varying vec3 dataCoordinate; void main() { if (outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate)) discard; gl_FragColor = vec4(pickGroup, pickId.bgr); }`]),m=[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"glyph",type:"vec2"},{name:"id",type:"vec4"}],p={vertex:n,fragment:h,attributes:m},T={vertex:i,fragment:h,attributes:m},l={vertex:s,fragment:h,attributes:m},_={vertex:n,fragment:c,attributes:m},w={vertex:i,fragment:c,attributes:m},A={vertex:s,fragment:c,attributes:m};function M(g,b){var d=o(g,b),u=d.attributes;return u.position.location=0,u.color.location=1,u.glyph.location=2,u.id.location=3,d}t.createPerspective=function(g){return M(g,p)},t.createOrtho=function(g){return M(g,T)},t.createProject=function(g){return M(g,l)},t.createPickPerspective=function(g){return M(g,_)},t.createPickOrtho=function(g){return M(g,w)},t.createPickProject=function(g){return M(g,A)}},1303:function(e,t,r){"use strict";e.exports=n;var o=r(3250);function a(i,s){var h,c;if(s[0][0]s[1][0])h=s[1],c=s[0];else{var m=Math.min(i[0][1],i[1][1]),p=Math.max(i[0][1],i[1][1]),T=Math.min(s[0][1],s[1][1]),l=Math.max(s[0][1],s[1][1]);return pl?m-l:p-l}var _,w;i[0][1]s[1][0])h=s[1],c=s[0];else return a(s,i);var m,p;if(i[0][0]i[1][0])m=i[1],p=i[0];else return-a(i,s);var T=o(h,c,p),l=o(h,c,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(p,m,c),l=o(p,m,h),T<0){if(l<=0)return T}else if(T>0){if(l>=0)return T}else if(l)return l;return c[0]-p[0]}},1318:function(e){"use strict";e.exports=t;function t(r,o){return r[0].mul(o[1]).cmp(o[0].mul(r[1]))}},1338:function(e){"use strict";function t(a,n,i){var s=a[i]|0;if(s<=0)return[];var h=new Array(s),c;if(i===a.length-1)for(c=0;c"u"&&(n=0),typeof a){case"number":if(a>0)return r(a|0,n);break;case"object":if(typeof a.length=="number")return t(a,n,0);break}return[]}e.exports=o},1369:function(e,t,r){"use strict";var o=r(5716);e.exports=a;function a(n){var i=n.length,s=n.words,h=0;if(i===1)h=s[0];else if(i===2)h=s[0]+s[1]*67108864;else for(var c=0;cn)throw new Error("gl-vao: Too many vertex attributes");for(var i=0;i=0?R[B]:U)}function F(P){var U=M(P);return U?L in U:f.indexOf(P)>=0}function N(P,U){var B,X=M(P);return X?X[L]=U:(B=f.indexOf(P),B>=0?R[B]=U:(B=f.length,R[B]=U,f[B]=P)),this}function O(P){var U=M(P),B,X;return U?L in U&&delete U[L]:(B=f.indexOf(P),B<0?!1:(X=f.length-1,f[B]=void 0,R[B]=R[X],f[B]=f[X],f.length=X,R.length=X,!0))}return Object.create(y.prototype,{get___:{value:g(z)},has___:{value:g(F)},set___:{value:g(N)},delete___:{value:g(O)}})};y.prototype=Object.create(Object.prototype,{get:{value:function(R,L){return this.get___(R,L)},writable:!0,configurable:!0},has:{value:function(R){return this.has___(R)},writable:!0,configurable:!0},set:{value:function(R,L){return this.set___(R,L)},writable:!0,configurable:!0},delete:{value:function(R){return this.delete___(R)},writable:!0,configurable:!0}}),typeof a=="function"?function(){o&&typeof Proxy<"u"&&(Proxy=void 0);function f(){this instanceof y||d();var R=new a,L=void 0,z=!1;function F(U,B){return L?R.has(U)?R.get(U):L.get___(U,B):R.get(U,B)}function N(U){return R.has(U)||(L?L.has___(U):!1)}var O;o?O=function(U,B){return R.set(U,B),R.has(U)||(L||(L=new y),L.set(U,B)),this}:O=function(U,B){if(z)try{R.set(U,B)}catch{L||(L=new y),L.set___(U,B)}else R.set(U,B);return this};function P(U){var B=!!R.delete(U);return L&&L.delete___(U)||B}return Object.create(y.prototype,{get___:{value:g(F)},has___:{value:g(N)},set___:{value:g(O)},delete___:{value:g(P)},permitHostObjects___:{value:g(function(U){if(U===r)z=!0;else throw new Error("bogus call to permitHostObjects___")})}})}f.prototype=y.prototype,e.exports=f,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():(typeof Proxy<"u"&&(Proxy=void 0),e.exports=y)})()},1570:function(e){"use strict";e.exports=r;var t=[function(){function a(i,s,h,c){for(var m=Math.min(h,c)|0,p=Math.max(h,c)|0,T=i[2*m],l=i[2*m+1];T>1,w=s[2*_+1];if(w===p)return _;p>1,w=s[2*_+1];if(w===p)return _;p>1,w=s[2*_+1];if(w===p)return _;p>1,w=s[2*_+1];if(w===p)return _;p HALF_PI) && (b <= ONE_AND_HALF_PI)) ? b - PI : b; } float look_horizontal_or_vertical(float a, float ratio) { // ratio controls the ratio between being horizontal to (vertical + horizontal) // if ratio is set to 0.5 then it is 50%, 50%. // when using a higher ratio e.g. 0.75 the result would // likely be more horizontal than vertical. float b = positive_angle(a); return (b < ( ratio) * HALF_PI) ? 0.0 : (b < (2.0 - ratio) * HALF_PI) ? -HALF_PI : (b < (2.0 + ratio) * HALF_PI) ? 0.0 : (b < (4.0 - ratio) * HALF_PI) ? HALF_PI : 0.0; } float roundTo(float a, float b) { return float(b * floor((a + 0.5 * b) / b)); } float look_round_n_directions(float a, int n) { float b = positive_angle(a); float div = TWO_PI / float(n); float c = roundTo(b, div); return look_upwards(c); } float applyAlignOption(float rawAngle, float delta) { return (option > 2) ? look_round_n_directions(rawAngle + delta, option) : // option 3-n: round to n directions (option == 2) ? look_horizontal_or_vertical(rawAngle + delta, hv_ratio) : // horizontal or vertical (option == 1) ? rawAngle + delta : // use free angle, and flip to align with one direction of the axis (option == 0) ? look_upwards(rawAngle) : // use free angle, and stay upwards (option ==-1) ? 0.0 : // useful for backward compatibility, all texts remains horizontal rawAngle; // otherwise return back raw input angle } bool isAxisTitle = (axis.x == 0.0) && (axis.y == 0.0) && (axis.z == 0.0); void main() { //Compute world offset float axisDistance = position.z; vec3 dataPosition = axisDistance * axis + offset; float beta = angle; // i.e. user defined attributes for each tick float axisAngle; float clipAngle; float flip; if (enableAlign) { axisAngle = (isAxisTitle) ? HALF_PI : computeViewAngle(dataPosition, dataPosition + axis); clipAngle = computeViewAngle(dataPosition, dataPosition + alignDir); axisAngle += (sin(axisAngle) < 0.0) ? PI : 0.0; clipAngle += (sin(clipAngle) < 0.0) ? PI : 0.0; flip = (dot(vec2(cos(axisAngle), sin(axisAngle)), vec2(sin(clipAngle),-cos(clipAngle))) > 0.0) ? 1.0 : 0.0; beta += applyAlignOption(clipAngle, flip * PI); } //Compute plane offset vec2 planeCoord = position.xy * pixelScale; mat2 planeXform = scale * mat2( cos(beta), sin(beta), -sin(beta), cos(beta) ); vec2 viewOffset = 2.0 * planeXform * planeCoord / resolution; //Compute clip position vec3 clipPosition = project(dataPosition); //Apply text offset in clip coordinates clipPosition += vec3(viewOffset, 0.0); //Done gl_Position = vec4(clipPosition, 1.0); } `]),h=o([`precision highp float; #define GLSLIFY 1 uniform vec4 color; void main() { gl_FragColor = color; }`]);t.Q=function(p){return a(p,s,h,null,[{name:"position",type:"vec3"}])};var c=o([`precision highp float; #define GLSLIFY 1 attribute vec3 position; attribute vec3 normal; uniform mat4 model, view, projection; uniform vec3 enable; uniform vec3 bounds[2]; varying vec3 colorChannel; void main() { vec3 signAxis = sign(bounds[1] - bounds[0]); vec3 realNormal = signAxis * normal; if(dot(realNormal, enable) > 0.0) { vec3 minRange = min(bounds[0], bounds[1]); vec3 maxRange = max(bounds[0], bounds[1]); vec3 nPosition = mix(minRange, maxRange, 0.5 * (position + 1.0)); gl_Position = projection * (view * (model * vec4(nPosition, 1.0))); } else { gl_Position = vec4(0,0,0,0); } colorChannel = abs(realNormal); } `]),m=o([`precision highp float; #define GLSLIFY 1 uniform vec4 colors[3]; varying vec3 colorChannel; void main() { gl_FragColor = colorChannel.x * colors[0] + colorChannel.y * colors[1] + colorChannel.z * colors[2]; }`]);t.bg=function(p){return a(p,c,m,null,[{name:"position",type:"vec3"},{name:"normal",type:"vec3"}])}},1888:function(e,t,r){"use strict";var o=r(8828),a=r(1338),n=r(4793).hp;r.g.__TYPEDARRAY_POOL||(r.g.__TYPEDARRAY_POOL={UINT8:a([32,0]),UINT16:a([32,0]),UINT32:a([32,0]),BIGUINT64:a([32,0]),INT8:a([32,0]),INT16:a([32,0]),INT32:a([32,0]),BIGINT64:a([32,0]),FLOAT:a([32,0]),DOUBLE:a([32,0]),DATA:a([32,0]),UINT8C:a([32,0]),BUFFER:a([32,0])});var i=typeof Uint8ClampedArray<"u",s=typeof BigUint64Array<"u",h=typeof BigInt64Array<"u",c=r.g.__TYPEDARRAY_POOL;c.UINT8C||(c.UINT8C=a([32,0])),c.BIGUINT64||(c.BIGUINT64=a([32,0])),c.BIGINT64||(c.BIGINT64=a([32,0])),c.BUFFER||(c.BUFFER=a([32,0]));var m=c.DATA,p=c.BUFFER;t.free=function(O){if(n.isBuffer(O))p[o.log2(O.length)].push(O);else{if(Object.prototype.toString.call(O)!=="[object ArrayBuffer]"&&(O=O.buffer),!O)return;var P=O.length||O.byteLength,U=o.log2(P)|0;m[U].push(O)}};function T(N){if(N){var O=N.length||N.byteLength,P=o.log2(O);m[P].push(N)}}function l(N){T(N.buffer)}t.freeUint8=t.freeUint16=t.freeUint32=t.freeBigUint64=t.freeInt8=t.freeInt16=t.freeInt32=t.freeBigInt64=t.freeFloat32=t.freeFloat=t.freeFloat64=t.freeDouble=t.freeUint8Clamped=t.freeDataView=l,t.freeArrayBuffer=T,t.freeBuffer=function(O){p[o.log2(O.length)].push(O)},t.malloc=function(O,P){if(P===void 0||P==="arraybuffer")return _(O);switch(P){case"uint8":return w(O);case"uint16":return A(O);case"uint32":return M(O);case"int8":return g(O);case"int16":return b(O);case"int32":return d(O);case"float":case"float32":return u(O);case"double":case"float64":return y(O);case"uint8_clamped":return f(O);case"bigint64":return L(O);case"biguint64":return R(O);case"buffer":return F(O);case"data":case"dataview":return z(O);default:return null}return null};function _(O){var O=o.nextPow2(O),P=o.log2(O),U=m[P];return U.length>0?U.pop():new ArrayBuffer(O)}t.mallocArrayBuffer=_;function w(N){return new Uint8Array(_(N),0,N)}t.mallocUint8=w;function A(N){return new Uint16Array(_(2*N),0,N)}t.mallocUint16=A;function M(N){return new Uint32Array(_(4*N),0,N)}t.mallocUint32=M;function g(N){return new Int8Array(_(N),0,N)}t.mallocInt8=g;function b(N){return new Int16Array(_(2*N),0,N)}t.mallocInt16=b;function d(N){return new Int32Array(_(4*N),0,N)}t.mallocInt32=d;function u(N){return new Float32Array(_(4*N),0,N)}t.mallocFloat32=t.mallocFloat=u;function y(N){return new Float64Array(_(8*N),0,N)}t.mallocFloat64=t.mallocDouble=y;function f(N){return i?new Uint8ClampedArray(_(N),0,N):w(N)}t.mallocUint8Clamped=f;function R(N){return s?new BigUint64Array(_(8*N),0,N):null}t.mallocBigUint64=R;function L(N){return h?new BigInt64Array(_(8*N),0,N):null}t.mallocBigInt64=L;function z(N){return new DataView(_(N),0,N)}t.mallocDataView=z;function F(N){N=o.nextPow2(N);var O=o.log2(N),P=p[O];return P.length>0?P.pop():new n(N)}t.mallocBuffer=F,t.clearCache=function(){for(var O=0;O<32;++O)c.UINT8[O].length=0,c.UINT16[O].length=0,c.UINT32[O].length=0,c.INT8[O].length=0,c.INT16[O].length=0,c.INT32[O].length=0,c.FLOAT[O].length=0,c.DOUBLE[O].length=0,c.BIGUINT64[O].length=0,c.BIGINT64[O].length=0,c.UINT8C[O].length=0,m[O].length=0,p[O].length=0}},1903:function(e){e.exports=t;function t(r){var o=new Float32Array(16);return o[0]=r[0],o[1]=r[1],o[2]=r[2],o[3]=r[3],o[4]=r[4],o[5]=r[5],o[6]=r[6],o[7]=r[7],o[8]=r[8],o[9]=r[9],o[10]=r[10],o[11]=r[11],o[12]=r[12],o[13]=r[13],o[14]=r[14],o[15]=r[15],o}},1944:function(e,t,r){"use strict";var o=r(5250),a=r(8210);e.exports=n;function n(i,s){for(var h=o(i[0],s[0]),c=1;c>1,F=h(u[z],y);F<=0?(F===0&&(L=z),f=z+1):F>0&&(R=z-1)}return L}t.findCell=T;function l(u,y){for(var f=new Array(u.length),R=0,L=f.length;R=u.length||h(u[$],z)!==0););}return f}t.incidence=l;function _(u,y){if(!y)return l(p(A(u,0)),u,0);for(var f=new Array(y),R=0;R>>P&1&&O.push(L[P]);y.push(O)}return m(y)}t.explode=w;function A(u,y){if(y<0)return[];for(var f=[],R=(1<0}b=b.filter(d);for(var u=b.length,y=new Array(u),f=new Array(u),g=0;g0;){var re=ae.pop(),ce=se[re];h(ce,function(Ze,at){return Ze-at});var be=ce.length,Ae=j[re],De;if(Ae===0){var O=b[re];De=[O]}for(var g=0;g=0)&&(j[ze]=Ae^1,ae.push(ze),Ae===0)){var O=b[ze];oe(O)||(O.reverse(),De.push(O))}}Ae===0&&Q.push(De)}return Q}},2145:function(e,t){"use strict";t.uniforms=n,t.attributes=i;var r={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube"},o=null;function a(s,h){if(!o){var c=Object.keys(r);o={};for(var m=0;m1)for(var _=0;_1&&F.drawBuffersWEBGL(a[z]);var B=y.getExtension("WEBGL_depth_texture");B?N?d.depth=l(y,R,L,B.UNSIGNED_INT_24_8_WEBGL,y.DEPTH_STENCIL,y.DEPTH_STENCIL_ATTACHMENT):O&&(d.depth=l(y,R,L,y.UNSIGNED_SHORT,y.DEPTH_COMPONENT,y.DEPTH_ATTACHMENT)):O&&N?d._depth_rb=_(y,R,L,y.DEPTH_STENCIL,y.DEPTH_STENCIL_ATTACHMENT):O?d._depth_rb=_(y,R,L,y.DEPTH_COMPONENT16,y.DEPTH_ATTACHMENT):N&&(d._depth_rb=_(y,R,L,y.STENCIL_INDEX,y.STENCIL_ATTACHMENT));var X=y.checkFramebufferStatus(y.FRAMEBUFFER);if(X!==y.FRAMEBUFFER_COMPLETE){d._destroyed=!0,y.bindFramebuffer(y.FRAMEBUFFER,null),y.deleteFramebuffer(d.handle),d.handle=null,d.depth&&(d.depth.dispose(),d.depth=null),d._depth_rb&&(y.deleteRenderbuffer(d._depth_rb),d._depth_rb=null);for(var U=0;UR||y<0||y>R)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");d._shape[0]=u,d._shape[1]=y;for(var L=c(f),z=0;zL||y<0||y>L)throw new Error("gl-fbo: Parameters are too large for FBO");f=f||{};var z=1;if("color"in f){if(z=Math.max(f.color|0,0),z<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(z>1)if(R){if(z>d.getParameter(R.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+z+" draw buffers")}else throw new Error("gl-fbo: Multiple draw buffer extension not supported")}var F=d.UNSIGNED_BYTE,N=d.getExtension("OES_texture_float");if(f.float&&z>0){if(!N)throw new Error("gl-fbo: Context does not support floating point textures");F=d.FLOAT}else f.preferFloat&&z>0&&N&&(F=d.FLOAT);var O=!0;"depth"in f&&(O=!!f.depth);var P=!1;return"stencil"in f&&(P=!!f.stencil),new A(d,u,y,F,z,O,P,R)}},2272:function(e,t,r){"use strict";var o=r(2646)[4],a=r(2478);e.exports=i;function n(s,h,c,m,p,T){var l=h.opposite(m,p);if(!(l<0)){if(p0;){for(var w=c.pop(),T=c.pop(),A=-1,M=-1,l=p[T],b=1;b=0||(h.flip(T,w),n(s,h,c,A,T,M),n(s,h,c,T,M,A),n(s,h,c,M,w,A),n(s,h,c,w,A,M))}}},2334:function(e){e.exports=t;function t(r,o,a){return r[0]=Math.min(o[0],a[0]),r[1]=Math.min(o[1],a[1]),r[2]=Math.min(o[2],a[2]),r[3]=Math.min(o[3],a[3]),r}},2335:function(e){e.exports=t;function t(r){var o=new Float32Array(4);return o[0]=r[0],o[1]=r[1],o[2]=r[2],o[3]=r[3],o}},2361:function(e){var t=!1;if(typeof Float64Array<"u"){var r=new Float64Array(1),o=new Uint32Array(r.buffer);if(r[0]=1,t=!0,o[1]===1072693248){let _=function(M,g){return o[0]=M,o[1]=g,r[0]},w=function(M){return r[0]=M,o[0]},A=function(M){return r[0]=M,o[1]};var a=_,n=w,i=A;e.exports=function(g){return r[0]=g,[o[0],o[1]]},e.exports.pack=_,e.exports.lo=w,e.exports.hi=A}else if(o[0]===1072693248){let _=function(M,g){return o[1]=M,o[0]=g,r[0]},w=function(M){return r[0]=M,o[1]},A=function(M){return r[0]=M,o[0]};var s=_,h=w,c=A;e.exports=function(g){return r[0]=g,[o[1],o[0]]},e.exports.pack=_,e.exports.lo=w,e.exports.hi=A}else t=!1}if(!t){let _=function(M,g){return l.writeUInt32LE(M,0,!0),l.writeUInt32LE(g,4,!0),l.readDoubleLE(0,!0)},w=function(M){return l.writeDoubleLE(M,0,!0),l.readUInt32LE(0,!0)},A=function(M){return l.writeDoubleLE(M,0,!0),l.readUInt32LE(4,!0)};var m=_,p=w,T=A,l=new Buffer(8);e.exports=function(g){return l.writeDoubleLE(g,0,!0),[l.readUInt32LE(0,!0),l.readUInt32LE(4,!0)]},e.exports.pack=_,e.exports.lo=w,e.exports.hi=A}e.exports.sign=function(_){return e.exports.hi(_)>>>31},e.exports.exponent=function(_){var w=e.exports.hi(_);return(w<<1>>>21)-1023},e.exports.fraction=function(_){var w=e.exports.lo(_),A=e.exports.hi(_),M=A&(1<<20)-1;return A&2146435072&&(M+=1048576),[w,M]},e.exports.denormalized=function(_){var w=e.exports.hi(_);return!(w&2146435072)}},2408:function(e){e.exports=t;function t(r,o,a){var n=Math.sin(a),i=Math.cos(a),s=o[0],h=o[1],c=o[2],m=o[3],p=o[8],T=o[9],l=o[10],_=o[11];return o!==r&&(r[4]=o[4],r[5]=o[5],r[6]=o[6],r[7]=o[7],r[12]=o[12],r[13]=o[13],r[14]=o[14],r[15]=o[15]),r[0]=s*i-p*n,r[1]=h*i-T*n,r[2]=c*i-l*n,r[3]=m*i-_*n,r[8]=s*n+p*i,r[9]=h*n+T*i,r[10]=c*n+l*i,r[11]=m*n+_*i,r}},2419:function(e){"use strict";e.exports=t;function t(r){for(var o=1,a=1;aA-w?n(h,c,m,p,T,l,_,w,A,M,g):i(h,c,m,p,T,l,_,w,A,M,g)}return s}function o(){function n(m,p,T,l,_,w,A,M,g,b,d){for(var u=2*m,y=l,f=u*l;y<_;++y,f+=u){var R=w[p+f],L=w[p+f+m],z=A[y];e:for(var F=M,N=u*M;Fb-g?l?n(m,p,T,_,w,A,M,g,b,d,u):i(m,p,T,_,w,A,M,g,b,d,u):l?s(m,p,T,_,w,A,M,g,b,d,u):h(m,p,T,_,w,A,M,g,b,d,u)}return c}function a(n){return n?r():o()}t.partial=a(!1),t.full=a(!0)},2478:function(e){"use strict";function t(s,h,c,m,p){for(var T=p+1;m<=p;){var l=m+p>>>1,_=s[l],w=c!==void 0?c(_,h):_-h;w>=0?(T=l,p=l-1):m=l+1}return T}function r(s,h,c,m,p){for(var T=p+1;m<=p;){var l=m+p>>>1,_=s[l],w=c!==void 0?c(_,h):_-h;w>0?(T=l,p=l-1):m=l+1}return T}function o(s,h,c,m,p){for(var T=m-1;m<=p;){var l=m+p>>>1,_=s[l],w=c!==void 0?c(_,h):_-h;w<0?(T=l,m=l+1):p=l-1}return T}function a(s,h,c,m,p){for(var T=m-1;m<=p;){var l=m+p>>>1,_=s[l],w=c!==void 0?c(_,h):_-h;w<=0?(T=l,m=l+1):p=l-1}return T}function n(s,h,c,m,p){for(;m<=p;){var T=m+p>>>1,l=s[T],_=c!==void 0?c(l,h):l-h;if(_===0)return T;_<=0?m=T+1:p=T-1}return-1}function i(s,h,c,m,p,T){return typeof c=="function"?T(s,h,c,m===void 0?0:m|0,p===void 0?s.length-1:p|0):T(s,h,void 0,c===void 0?0:c|0,m===void 0?s.length-1:m|0)}e.exports={ge:function(s,h,c,m,p){return i(s,h,c,m,p,t)},gt:function(s,h,c,m,p){return i(s,h,c,m,p,r)},lt:function(s,h,c,m,p){return i(s,h,c,m,p,o)},le:function(s,h,c,m,p){return i(s,h,c,m,p,a)},eq:function(s,h,c,m,p){return i(s,h,c,m,p,n)}}},2504:function(e){e.exports=t;function t(r,o,a){var n=a[0],i=a[1],s=a[2];return r[0]=o[0]*n,r[1]=o[1]*n,r[2]=o[2]*n,r[3]=o[3]*n,r[4]=o[4]*i,r[5]=o[5]*i,r[6]=o[6]*i,r[7]=o[7]*i,r[8]=o[8]*s,r[9]=o[9]*s,r[10]=o[10]*s,r[11]=o[11]*s,r[12]=o[12],r[13]=o[13],r[14]=o[14],r[15]=o[15],r}},2538:function(e,t,r){"use strict";var o=r(8902),a=r(5542),n=r(2272),i=r(5023);e.exports=p;function s(T){return[Math.min(T[0],T[1]),Math.max(T[0],T[1])]}function h(T,l){return T[0]-l[0]||T[1]-l[1]}function c(T){return T.map(s).sort(h)}function m(T,l,_){return l in T?T[l]:_}function p(T,l,_){Array.isArray(l)?(_=_||{},l=l||[]):(_=l||{},l=[]);var w=!!m(_,"delaunay",!0),A=!!m(_,"interior",!0),M=!!m(_,"exterior",!0),g=!!m(_,"infinity",!1);if(!A&&!M||T.length===0)return[];var b=o(T,l);if(w||A!==M||g){for(var d=a(T.length,c(l)),u=0;u0){if(se=1,V[ee++]=m(d[R],w,A,M),R+=B,g>0)for($=1,L=d[R],q=V[ee]=m(L,w,A,M),j=V[ee+oe],ce=V[ee+Q],De=V[ee+be],(q!==j||q!==ce||q!==De)&&(F=d[R+z],O=d[R+N],U=d[R+P],h($,se,L,F,O,U,q,j,ce,De,w,A,M),ze=Y[ee]=le++),ee+=1,R+=B,$=2;$0)for($=1,L=d[R],q=V[ee]=m(L,w,A,M),j=V[ee+oe],ce=V[ee+Q],De=V[ee+be],(q!==j||q!==ce||q!==De)&&(F=d[R+z],O=d[R+N],U=d[R+P],h($,se,L,F,O,U,q,j,ce,De,w,A,M),ze=Y[ee]=le++,De!==ce&&c(Y[ee+Q],ze,O,U,ce,De,w,A,M)),ee+=1,R+=B,$=2;$0){if($=1,V[ee++]=m(d[R],w,A,M),R+=B,b>0)for(se=1,L=d[R],q=V[ee]=m(L,w,A,M),ce=V[ee+Q],j=V[ee+oe],De=V[ee+be],(q!==ce||q!==j||q!==De)&&(F=d[R+z],O=d[R+N],U=d[R+P],h($,se,L,F,O,U,q,ce,j,De,w,A,M),ze=Y[ee]=le++),ee+=1,R+=B,se=2;se0)for(se=1,L=d[R],q=V[ee]=m(L,w,A,M),ce=V[ee+Q],j=V[ee+oe],De=V[ee+be],(q!==ce||q!==j||q!==De)&&(F=d[R+z],O=d[R+N],U=d[R+P],h($,se,L,F,O,U,q,ce,j,De,w,A,M),ze=Y[ee]=le++,De!==ce&&c(Y[ee+Q],ze,U,F,De,ce,w,A,M)),ee+=1,R+=B,se=2;se 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),_=0;_=0?l[_]=!0:l[_]=!1;return n(s.vertex,s.cell,s.phase,p,c,l)}},2642:function(e,t,r){"use strict";e.exports=n;var o=r(727);function a(i){for(var s=0,h=0;hl[1][2]&&(R[0]=-R[0]),l[0][2]>l[2][0]&&(R[1]=-R[1]),l[1][0]>l[0][1]&&(R[2]=-R[2]),!0};function w(g,b,d){var u=b[0],y=b[1],f=b[2],R=b[3];return g[0]=d[0]*u+d[4]*y+d[8]*f+d[12]*R,g[1]=d[1]*u+d[5]*y+d[9]*f+d[13]*R,g[2]=d[2]*u+d[6]*y+d[10]*f+d[14]*R,g[3]=d[3]*u+d[7]*y+d[11]*f+d[15]*R,g}function A(g,b){g[0][0]=b[0],g[0][1]=b[1],g[0][2]=b[2],g[1][0]=b[4],g[1][1]=b[5],g[1][2]=b[6],g[2][0]=b[8],g[2][1]=b[9],g[2][2]=b[10]}function M(g,b,d,u,y){g[0]=b[0]*u+d[0]*y,g[1]=b[1]*u+d[1]*y,g[2]=b[2]*u+d[2]*y}},2653:function(e,t,r){"use strict";var o=r(3865);e.exports=a;function a(n,i){for(var s=n.length,h=new Array(s),c=0;c=c[A]&&(w+=1);l[_]=w}}return h}function s(h,c){try{return o(h,!0)}catch{var m=a(h);if(m.length<=c)return[];var p=n(h,m),T=o(p,!0);return i(T,m)}}},2762:function(e,t,r){"use strict";var o=r(1888),a=r(5298),n=r(9618),i=["uint8","uint8_clamped","uint16","uint32","int8","int16","int32","float32"];function s(l,_,w,A,M){this.gl=l,this.type=_,this.handle=w,this.length=A,this.usage=M}var h=s.prototype;h.bind=function(){this.gl.bindBuffer(this.type,this.handle)},h.unbind=function(){this.gl.bindBuffer(this.type,null)},h.dispose=function(){this.gl.deleteBuffer(this.handle)};function c(l,_,w,A,M,g){var b=M.length*M.BYTES_PER_ELEMENT;if(g<0)return l.bufferData(_,M,A),b;if(b+g>w)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return l.bufferSubData(_,g,M),w}function m(l,_){for(var w=o.malloc(l.length,_),A=l.length,M=0;M=0;--A){if(_[A]!==w)return!1;w*=l[A]}return!0}h.update=function(l,_){if(typeof _!="number"&&(_=-1),this.bind(),typeof l=="object"&&typeof l.shape<"u"){var w=l.dtype;if(i.indexOf(w)<0&&(w="float32"),this.type===this.gl.ELEMENT_ARRAY_BUFFER){var A=gl.getExtension("OES_element_index_uint");A&&w!=="uint16"?w="uint32":w="uint16"}if(w===l.dtype&&p(l.shape,l.stride))l.offset===0&&l.data.length===l.shape[0]?this.length=c(this.gl,this.type,this.length,this.usage,l.data,_):this.length=c(this.gl,this.type,this.length,this.usage,l.data.subarray(l.offset,l.shape[0]),_);else{var M=o.malloc(l.size,w),g=n(M,l.shape);a.assign(g,l),_<0?this.length=c(this.gl,this.type,this.length,this.usage,M,_):this.length=c(this.gl,this.type,this.length,this.usage,M.subarray(0,l.size),_),o.free(M)}}else if(Array.isArray(l)){var b;this.type===this.gl.ELEMENT_ARRAY_BUFFER?b=m(l,"uint16"):b=m(l,"float32"),_<0?this.length=c(this.gl,this.type,this.length,this.usage,b,_):this.length=c(this.gl,this.type,this.length,this.usage,b.subarray(0,l.length),_),o.free(b)}else if(typeof l=="object"&&typeof l.length=="number")this.length=c(this.gl,this.type,this.length,this.usage,l,_);else if(typeof l=="number"||l===void 0){if(_>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");l=l|0,l<=0&&(l=1),this.gl.bufferData(this.type,l|0,this.usage),this.length=l}else throw new Error("gl-buffer: Invalid data type")};function T(l,_,w,A){if(w=w||l.ARRAY_BUFFER,A=A||l.DYNAMIC_DRAW,w!==l.ARRAY_BUFFER&&w!==l.ELEMENT_ARRAY_BUFFER)throw new Error("gl-buffer: Invalid type for webgl buffer, must be either gl.ARRAY_BUFFER or gl.ELEMENT_ARRAY_BUFFER");if(A!==l.DYNAMIC_DRAW&&A!==l.STATIC_DRAW&&A!==l.STREAM_DRAW)throw new Error("gl-buffer: Invalid usage for buffer, must be either gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW");var M=l.createBuffer(),g=new s(l,w,M,0,A);return g.update(_),g}e.exports=T},2825:function(e){e.exports=t;function t(r,o,a){var n=new Float32Array(3);return n[0]=r,n[1]=o,n[2]=a,n}},2931:function(e,t,r){e.exports={EPSILON:r(2613),create:r(1091),clone:r(3126),angle:r(8192),fromValues:r(2825),copy:r(3990),set:r(1463),equals:r(9922),exactEquals:r(9265),add:r(5632),subtract:r(6843),sub:r(2229),multiply:r(5847),mul:r(4505),divide:r(6690),div:r(4008),min:r(8107),max:r(7417),floor:r(2681),ceil:r(9226),round:r(2447),scale:r(6621),scaleAndAdd:r(8489),distance:r(7056),dist:r(5455),squaredDistance:r(2953),sqrDist:r(6141),length:r(1387),len:r(868),squaredLength:r(3066),sqrLen:r(5486),negate:r(5093),inverse:r(811),normalize:r(3536),dot:r(244),cross:r(5911),lerp:r(6658),random:r(7636),transformMat4:r(5673),transformMat3:r(492),transformQuat:r(264),rotateX:r(6894),rotateY:r(109),rotateZ:r(8692),forEach:r(5137)}},2933:function(e){e.exports=t;function t(r,o){return r[0]=o[0],r[1]=o[1],r[2]=o[2],r[3]=o[3],r}},2953:function(e){e.exports=t;function t(r,o){var a=o[0]-r[0],n=o[1]-r[1],i=o[2]-r[2];return a*a+n*n+i*i}},2962:function(e,t,r){"use strict";var o=r(5250),a=r(8210),n=r(3012),i=r(7004),s=6;function h(A,M,g,b){return function(u){return b(A(g(u[0][0],u[1][1]),g(-u[0][1],u[1][0])))}}function c(A,M,g,b){return function(u){return b(A(M(A(g(u[1][1],u[2][2]),g(-u[1][2],u[2][1])),u[0][0]),A(M(A(g(u[1][0],u[2][2]),g(-u[1][2],u[2][0])),-u[0][1]),M(A(g(u[1][0],u[2][1]),g(-u[1][1],u[2][0])),u[0][2]))))}}function m(A,M,g,b){return function(u){return b(A(A(M(A(M(A(g(u[2][2],u[3][3]),g(-u[2][3],u[3][2])),u[1][1]),A(M(A(g(u[2][1],u[3][3]),g(-u[2][3],u[3][1])),-u[1][2]),M(A(g(u[2][1],u[3][2]),g(-u[2][2],u[3][1])),u[1][3]))),u[0][0]),M(A(M(A(g(u[2][2],u[3][3]),g(-u[2][3],u[3][2])),u[1][0]),A(M(A(g(u[2][0],u[3][3]),g(-u[2][3],u[3][0])),-u[1][2]),M(A(g(u[2][0],u[3][2]),g(-u[2][2],u[3][0])),u[1][3]))),-u[0][1])),A(M(A(M(A(g(u[2][1],u[3][3]),g(-u[2][3],u[3][1])),u[1][0]),A(M(A(g(u[2][0],u[3][3]),g(-u[2][3],u[3][0])),-u[1][1]),M(A(g(u[2][0],u[3][1]),g(-u[2][1],u[3][0])),u[1][3]))),u[0][2]),M(A(M(A(g(u[2][1],u[3][2]),g(-u[2][2],u[3][1])),u[1][0]),A(M(A(g(u[2][0],u[3][2]),g(-u[2][2],u[3][0])),-u[1][1]),M(A(g(u[2][0],u[3][1]),g(-u[2][1],u[3][0])),u[1][2]))),-u[0][3]))))}}function p(A,M,g,b){return function(u){return b(A(A(M(A(A(M(A(M(A(g(u[3][3],u[4][4]),g(-u[3][4],u[4][3])),u[2][2]),A(M(A(g(u[3][2],u[4][4]),g(-u[3][4],u[4][2])),-u[2][3]),M(A(g(u[3][2],u[4][3]),g(-u[3][3],u[4][2])),u[2][4]))),u[1][1]),M(A(M(A(g(u[3][3],u[4][4]),g(-u[3][4],u[4][3])),u[2][1]),A(M(A(g(u[3][1],u[4][4]),g(-u[3][4],u[4][1])),-u[2][3]),M(A(g(u[3][1],u[4][3]),g(-u[3][3],u[4][1])),u[2][4]))),-u[1][2])),A(M(A(M(A(g(u[3][2],u[4][4]),g(-u[3][4],u[4][2])),u[2][1]),A(M(A(g(u[3][1],u[4][4]),g(-u[3][4],u[4][1])),-u[2][2]),M(A(g(u[3][1],u[4][2]),g(-u[3][2],u[4][1])),u[2][4]))),u[1][3]),M(A(M(A(g(u[3][2],u[4][3]),g(-u[3][3],u[4][2])),u[2][1]),A(M(A(g(u[3][1],u[4][3]),g(-u[3][3],u[4][1])),-u[2][2]),M(A(g(u[3][1],u[4][2]),g(-u[3][2],u[4][1])),u[2][3]))),-u[1][4]))),u[0][0]),M(A(A(M(A(M(A(g(u[3][3],u[4][4]),g(-u[3][4],u[4][3])),u[2][2]),A(M(A(g(u[3][2],u[4][4]),g(-u[3][4],u[4][2])),-u[2][3]),M(A(g(u[3][2],u[4][3]),g(-u[3][3],u[4][2])),u[2][4]))),u[1][0]),M(A(M(A(g(u[3][3],u[4][4]),g(-u[3][4],u[4][3])),u[2][0]),A(M(A(g(u[3][0],u[4][4]),g(-u[3][4],u[4][0])),-u[2][3]),M(A(g(u[3][0],u[4][3]),g(-u[3][3],u[4][0])),u[2][4]))),-u[1][2])),A(M(A(M(A(g(u[3][2],u[4][4]),g(-u[3][4],u[4][2])),u[2][0]),A(M(A(g(u[3][0],u[4][4]),g(-u[3][4],u[4][0])),-u[2][2]),M(A(g(u[3][0],u[4][2]),g(-u[3][2],u[4][0])),u[2][4]))),u[1][3]),M(A(M(A(g(u[3][2],u[4][3]),g(-u[3][3],u[4][2])),u[2][0]),A(M(A(g(u[3][0],u[4][3]),g(-u[3][3],u[4][0])),-u[2][2]),M(A(g(u[3][0],u[4][2]),g(-u[3][2],u[4][0])),u[2][3]))),-u[1][4]))),-u[0][1])),A(M(A(A(M(A(M(A(g(u[3][3],u[4][4]),g(-u[3][4],u[4][3])),u[2][1]),A(M(A(g(u[3][1],u[4][4]),g(-u[3][4],u[4][1])),-u[2][3]),M(A(g(u[3][1],u[4][3]),g(-u[3][3],u[4][1])),u[2][4]))),u[1][0]),M(A(M(A(g(u[3][3],u[4][4]),g(-u[3][4],u[4][3])),u[2][0]),A(M(A(g(u[3][0],u[4][4]),g(-u[3][4],u[4][0])),-u[2][3]),M(A(g(u[3][0],u[4][3]),g(-u[3][3],u[4][0])),u[2][4]))),-u[1][1])),A(M(A(M(A(g(u[3][1],u[4][4]),g(-u[3][4],u[4][1])),u[2][0]),A(M(A(g(u[3][0],u[4][4]),g(-u[3][4],u[4][0])),-u[2][1]),M(A(g(u[3][0],u[4][1]),g(-u[3][1],u[4][0])),u[2][4]))),u[1][3]),M(A(M(A(g(u[3][1],u[4][3]),g(-u[3][3],u[4][1])),u[2][0]),A(M(A(g(u[3][0],u[4][3]),g(-u[3][3],u[4][0])),-u[2][1]),M(A(g(u[3][0],u[4][1]),g(-u[3][1],u[4][0])),u[2][3]))),-u[1][4]))),u[0][2]),A(M(A(A(M(A(M(A(g(u[3][2],u[4][4]),g(-u[3][4],u[4][2])),u[2][1]),A(M(A(g(u[3][1],u[4][4]),g(-u[3][4],u[4][1])),-u[2][2]),M(A(g(u[3][1],u[4][2]),g(-u[3][2],u[4][1])),u[2][4]))),u[1][0]),M(A(M(A(g(u[3][2],u[4][4]),g(-u[3][4],u[4][2])),u[2][0]),A(M(A(g(u[3][0],u[4][4]),g(-u[3][4],u[4][0])),-u[2][2]),M(A(g(u[3][0],u[4][2]),g(-u[3][2],u[4][0])),u[2][4]))),-u[1][1])),A(M(A(M(A(g(u[3][1],u[4][4]),g(-u[3][4],u[4][1])),u[2][0]),A(M(A(g(u[3][0],u[4][4]),g(-u[3][4],u[4][0])),-u[2][1]),M(A(g(u[3][0],u[4][1]),g(-u[3][1],u[4][0])),u[2][4]))),u[1][2]),M(A(M(A(g(u[3][1],u[4][2]),g(-u[3][2],u[4][1])),u[2][0]),A(M(A(g(u[3][0],u[4][2]),g(-u[3][2],u[4][0])),-u[2][1]),M(A(g(u[3][0],u[4][1]),g(-u[3][1],u[4][0])),u[2][2]))),-u[1][4]))),-u[0][3]),M(A(A(M(A(M(A(g(u[3][2],u[4][3]),g(-u[3][3],u[4][2])),u[2][1]),A(M(A(g(u[3][1],u[4][3]),g(-u[3][3],u[4][1])),-u[2][2]),M(A(g(u[3][1],u[4][2]),g(-u[3][2],u[4][1])),u[2][3]))),u[1][0]),M(A(M(A(g(u[3][2],u[4][3]),g(-u[3][3],u[4][2])),u[2][0]),A(M(A(g(u[3][0],u[4][3]),g(-u[3][3],u[4][0])),-u[2][2]),M(A(g(u[3][0],u[4][2]),g(-u[3][2],u[4][0])),u[2][3]))),-u[1][1])),A(M(A(M(A(g(u[3][1],u[4][3]),g(-u[3][3],u[4][1])),u[2][0]),A(M(A(g(u[3][0],u[4][3]),g(-u[3][3],u[4][0])),-u[2][1]),M(A(g(u[3][0],u[4][1]),g(-u[3][1],u[4][0])),u[2][3]))),u[1][2]),M(A(M(A(g(u[3][1],u[4][2]),g(-u[3][2],u[4][1])),u[2][0]),A(M(A(g(u[3][0],u[4][2]),g(-u[3][2],u[4][0])),-u[2][1]),M(A(g(u[3][0],u[4][1]),g(-u[3][1],u[4][0])),u[2][2]))),-u[1][3]))),u[0][4])))))}}function T(A){var M=A===2?h:A===3?c:A===4?m:A===5?p:void 0;return M(a,n,o,i)}var l=[function(){return[0]},function(M){return[M[0][0]]}];function _(A,M,g,b,d,u,y,f){return function(L){switch(L.length){case 0:return A(L);case 1:return M(L);case 2:return g(L);case 3:return b(L);case 4:return d(L);case 5:return u(L)}var z=y[L.length];return z||(z=y[L.length]=f(L.length)),z(L)}}function w(){for(;l.length0){R=c[F][y][0],z=F;break}L=R[z^1];for(var N=0;N<2;++N)for(var O=c[N][y],P=0;P0&&(R=U,L=B,z=N)}return f||R&&l(R,z),L}function w(u,y){var f=c[y][u][0],R=[u];l(f,y);for(var L=f[y^1],z=y;;){for(;L!==u;)R.push(L),L=_(R[R.length-2],L,!1);if(c[0][u].length+c[1][u].length===0)break;var F=R[R.length-1],N=u,O=R[1],P=_(F,N,!0);if(o(i[F],i[N],i[O],i[P])<0)break;R.push(u),L=_(F,N)}return R}function A(u,y){return y[1]===y[y.length-1]}for(var m=0;m0;){var b=c[0][m].length,d=w(m,M);A(g,d)?g.push.apply(g,d):(g.length>0&&T.push(g),g=d)}g.length>0&&T.push(g)}return T}},3090:function(e,t,r){"use strict";e.exports=a;var o=r(3250)[3];function a(n){var i=n.length;if(i<3){for(var _=new Array(i),s=0;s1&&o(n[c[l-2]],n[c[l-1]],T)<=0;)l-=1,c.pop();for(c.push(p),l=m.length;l>1&&o(n[m[l-2]],n[m[l-1]],T)>=0;)l-=1,m.pop();m.push(p)}for(var _=new Array(m.length+c.length-2),w=0,s=0,A=c.length;s0;--M)_[w++]=m[M];return _}},3105:function(e,t){"use strict";"use restrict";var r=32;t.INT_BITS=r,t.INT_MAX=2147483647,t.INT_MIN=-1<0)-(n<0)},t.abs=function(n){var i=n>>r-1;return(n^i)-i},t.min=function(n,i){return i^(n^i)&-(n65535)<<4,n>>>=i,s=(n>255)<<3,n>>>=s,i|=s,s=(n>15)<<2,n>>>=s,i|=s,s=(n>3)<<1,n>>>=s,i|=s,i|n>>1},t.log10=function(n){return n>=1e9?9:n>=1e8?8:n>=1e7?7:n>=1e6?6:n>=1e5?5:n>=1e4?4:n>=1e3?3:n>=100?2:n>=10?1:0},t.popCount=function(n){return n=n-(n>>>1&1431655765),n=(n&858993459)+(n>>>2&858993459),(n+(n>>>4)&252645135)*16843009>>>24};function o(n){var i=32;return n&=-n,n&&i--,n&65535&&(i-=16),n&16711935&&(i-=8),n&252645135&&(i-=4),n&858993459&&(i-=2),n&1431655765&&(i-=1),i}t.countTrailingZeros=o,t.nextPow2=function(n){return n+=n===0,--n,n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n+1},t.prevPow2=function(n){return n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n-(n>>>1)},t.parity=function(n){return n^=n>>>16,n^=n>>>8,n^=n>>>4,n&=15,27030>>>n&1};var a=new Array(256);(function(n){for(var i=0;i<256;++i){var s=i,h=i,c=7;for(s>>>=1;s;s>>>=1)h<<=1,h|=s&1,--c;n[i]=h<>>8&255]<<16|a[n>>>16&255]<<8|a[n>>>24&255]},t.interleave2=function(n,i){return n&=65535,n=(n|n<<8)&16711935,n=(n|n<<4)&252645135,n=(n|n<<2)&858993459,n=(n|n<<1)&1431655765,i&=65535,i=(i|i<<8)&16711935,i=(i|i<<4)&252645135,i=(i|i<<2)&858993459,i=(i|i<<1)&1431655765,n|i<<1},t.deinterleave2=function(n,i){return n=n>>>i&1431655765,n=(n|n>>>1)&858993459,n=(n|n>>>2)&252645135,n=(n|n>>>4)&16711935,n=(n|n>>>16)&65535,n<<16>>16},t.interleave3=function(n,i,s){return n&=1023,n=(n|n<<16)&4278190335,n=(n|n<<8)&251719695,n=(n|n<<4)&3272356035,n=(n|n<<2)&1227133513,i&=1023,i=(i|i<<16)&4278190335,i=(i|i<<8)&251719695,i=(i|i<<4)&3272356035,i=(i|i<<2)&1227133513,n|=i<<1,s&=1023,s=(s|s<<16)&4278190335,s=(s|s<<8)&251719695,s=(s|s<<4)&3272356035,s=(s|s<<2)&1227133513,n|s<<2},t.deinterleave3=function(n,i){return n=n>>>i&1227133513,n=(n|n>>>2)&3272356035,n=(n|n>>>4)&251719695,n=(n|n>>>8)&4278190335,n=(n|n>>>16)&1023,n<<22>>22},t.nextCombination=function(n){var i=n|n-1;return i+1|(~i&-~i)-1>>>o(n)+1}},3126:function(e){e.exports=t;function t(r){var o=new Float32Array(3);return o[0]=r[0],o[1]=r[1],o[2]=r[2],o}},3134:function(e,t,r){"use strict";e.exports=a;var o=r(1682);function a(n,i){var s=n.length;if(typeof i!="number"){i=0;for(var h=0;h=0}function c(m,p,T,l){var _=o(p,T,l);if(_===0){var w=a(o(m,p,T)),A=a(o(m,p,l));if(w===A){if(w===0){var M=h(m,p,T),g=h(m,p,l);return M===g?0:M?1:-1}return 0}else{if(A===0)return w>0||h(m,p,l)?-1:1;if(w===0)return A>0||h(m,p,T)?1:-1}return a(A-w)}var b=o(m,p,T);if(b>0)return _>0&&o(m,p,l)>0?1:-1;if(b<0)return _>0||o(m,p,l)>0?1:-1;var d=o(m,p,l);return d>0||h(m,p,T)?1:-1}},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}},3233:function(e){"use strict";var t="",r;e.exports=o;function o(a,n){if(typeof a!="string")throw new TypeError("expected a string");if(n===1)return a;if(n===2)return a+a;var i=a.length*n;if(r!==a||typeof r>"u")r=a,t="";else if(t.length>=i)return t.substr(0,i);for(;i>t.length&&n>1;)n&1&&(t+=a),n>>=1,a+=a;return t+=a,t=t.substr(0,i),t}},3236:function(e){e.exports=function(t){typeof t=="string"&&(t=[t]);for(var r=[].slice.call(arguments,1),o=[],a=0;a0){if(z<=0)return F;N=L+z}else if(L<0){if(z>=0)return F;N=-(L+z)}else return F;var O=c*N;return F>=O||F<=-O?F:w(y,f,R)},function(y,f,R,L){var z=y[0]-L[0],F=f[0]-L[0],N=R[0]-L[0],O=y[1]-L[1],P=f[1]-L[1],U=R[1]-L[1],B=y[2]-L[2],X=f[2]-L[2],$=R[2]-L[2],se=F*U,le=N*P,fe=N*O,V=z*U,Y=z*P,ee=F*O,q=B*(se-le)+X*(fe-V)+$*(Y-ee),oe=(Math.abs(se)+Math.abs(le))*Math.abs(B)+(Math.abs(fe)+Math.abs(V))*Math.abs(X)+(Math.abs(Y)+Math.abs(ee))*Math.abs($),ae=m*oe;return q>ae||-q>ae?q:A(y,f,R,L)}];function g(u){var y=M[u.length];return y||(y=M[u.length]=_(u.length)),y.apply(void 0,u)}function b(u,y,f,R,L,z,F){return function(O,P,U,B,X){switch(arguments.length){case 0:case 1:return 0;case 2:return R(O,P);case 3:return L(O,P,U);case 4:return z(O,P,U,B);case 5:return F(O,P,U,B,X)}for(var $=new Array(arguments.length),se=0;se4)throw new a("","Invalid data type");switch(B.charAt(0)){case"b":case"i":h["uniform"+X+"iv"](p[z],F);break;case"v":h["uniform"+X+"fv"](p[z],F);break;default:throw new a("","Unrecognized data type for vector "+name+": "+B)}}else if(B.indexOf("mat")===0&&B.length===4){if(X=B.charCodeAt(B.length-1)-48,X<2||X>4)throw new a("","Invalid uniform dimension type for matrix "+name+": "+B);h["uniformMatrix"+X+"fv"](p[z],!1,F);break}else throw new a("","Unknown uniform data type for "+name+": "+B)}}}}}function _(b,d){if(typeof d!="object")return[[b,d]];var u=[];for(var y in d){var f=d[y],R=b;parseInt(y)+""===y?R+="["+y+"]":R+="."+y,typeof f=="object"?u.push.apply(u,_(R,f)):u.push([R,f])}return u}function w(b){switch(b){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":return 0;case"float":return 0;default:var d=b.indexOf("vec");if(0<=d&&d<=1&&b.length===4+d){var u=b.charCodeAt(b.length-1)-48;if(u<2||u>4)throw new a("","Invalid data type");return b.charAt(0)==="b"?i(u,!1):i(u,0)}else if(b.indexOf("mat")===0&&b.length===4){var u=b.charCodeAt(b.length-1)-48;if(u<2||u>4)throw new a("","Invalid uniform dimension type for matrix "+name+": "+b);return i(u*u,0)}else throw new a("","Unknown uniform data type for "+name+": "+b)}}function A(b,d,u){if(typeof u=="object"){var y=M(u);Object.defineProperty(b,d,{get:n(y),set:l(u),enumerable:!0,configurable:!1})}else p[u]?Object.defineProperty(b,d,{get:T(u),set:l(u),enumerable:!0,configurable:!1}):b[d]=w(m[u].type)}function M(b){var d;if(Array.isArray(b)){d=new Array(b.length);for(var u=0;u=0!=d>=0&&p.push(w[0]+.5+.5*(b+d)/(b-d))}m+=g,++w[0]}}}function r(){return t()}var o=r;function a(s){var h={};return function(m,p,T){var l=m.dtype,_=m.order,w=[l,_.join()].join(),A=h[w];return A||(h[w]=A=s([l,_])),A(m.shape.slice(0),m.data,m.stride,m.offset|0,p,T)}}function n(s){return a(o.bind(void 0,s))}function i(s){return n({funcName:s.funcName})}e.exports=i({funcName:"zeroCrossings"})},3352:function(e,t,r){"use strict";var o=r(2478),a=0,n=1,i=2;e.exports=y;function s(f,R,L,z,F){this.mid=f,this.left=R,this.right=L,this.leftPoints=z,this.rightPoints=F,this.count=(R?R.count:0)+(L?L.count:0)+z.length}var h=s.prototype;function c(f,R){f.mid=R.mid,f.left=R.left,f.right=R.right,f.leftPoints=R.leftPoints,f.rightPoints=R.rightPoints,f.count=R.count}function m(f,R){var L=b(R);f.mid=L.mid,f.left=L.left,f.right=L.right,f.leftPoints=L.leftPoints,f.rightPoints=L.rightPoints,f.count=L.count}function p(f,R){var L=f.intervals([]);L.push(R),m(f,L)}function T(f,R){var L=f.intervals([]),z=L.indexOf(R);return z<0?a:(L.splice(z,1),m(f,L),n)}h.intervals=function(f){return f.push.apply(f,this.leftPoints),this.left&&this.left.intervals(f),this.right&&this.right.intervals(f),f},h.insert=function(f){var R=this.count-this.leftPoints.length;if(this.count+=1,f[1]3*(R+1)?p(this,f):this.left.insert(f):this.left=b([f]);else if(f[0]>this.mid)this.right?4*(this.right.count+1)>3*(R+1)?p(this,f):this.right.insert(f):this.right=b([f]);else{var L=o.ge(this.leftPoints,f,M),z=o.ge(this.rightPoints,f,g);this.leftPoints.splice(L,0,f),this.rightPoints.splice(z,0,f)}},h.remove=function(f){var R=this.count-this.leftPoints;if(f[1]3*(R-1))return T(this,f);var z=this.left.remove(f);return z===i?(this.left=null,this.count-=1,n):(z===n&&(this.count-=1),z)}else if(f[0]>this.mid){if(!this.right)return a;var F=this.left?this.left.count:0;if(4*F>3*(R-1))return T(this,f);var z=this.right.remove(f);return z===i?(this.right=null,this.count-=1,n):(z===n&&(this.count-=1),z)}else{if(this.count===1)return this.leftPoints[0]===f?i:a;if(this.leftPoints.length===1&&this.leftPoints[0]===f){if(this.left&&this.right){for(var N=this,O=this.left;O.right;)N=O,O=O.right;if(N===this)O.right=this.right;else{var P=this.left,z=this.right;N.count-=O.count,N.right=O.left,O.left=P,O.right=z}c(this,O),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?c(this,this.left):c(this,this.right);return n}for(var P=o.ge(this.leftPoints,f,M);P=0&&f[z][1]>=R;--z){var F=L(f[z]);if(F)return F}}function w(f,R){for(var L=0;Lthis.mid){if(this.right){var L=this.right.queryPoint(f,R);if(L)return L}return _(this.rightPoints,f,R)}else return w(this.leftPoints,R)},h.queryInterval=function(f,R,L){if(fthis.mid&&this.right){var z=this.right.queryInterval(f,R,L);if(z)return z}return Rthis.mid?_(this.rightPoints,f,L):w(this.leftPoints,L)};function A(f,R){return f-R}function M(f,R){var L=f[0]-R[0];return L||f[1]-R[1]}function g(f,R){var L=f[1]-R[1];return L||f[0]-R[0]}function b(f){if(f.length===0)return null;for(var R=[],L=0;L>1],F=[],N=[],O=[],L=0;L=0),g.type){case"b":_=parseInt(_,10).toString(2);break;case"c":_=String.fromCharCode(parseInt(_,10));break;case"d":case"i":_=parseInt(_,10);break;case"j":_=JSON.stringify(_,null,g.width?parseInt(g.width):0);break;case"e":_=g.precision?parseFloat(_).toExponential(g.precision):parseFloat(_).toExponential();break;case"f":_=g.precision?parseFloat(_).toFixed(g.precision):parseFloat(_);break;case"g":_=g.precision?String(Number(_.toPrecision(g.precision))):parseFloat(_);break;case"o":_=(parseInt(_,10)>>>0).toString(8);break;case"s":_=String(_),_=g.precision?_.substring(0,g.precision):_;break;case"t":_=String(!!_),_=g.precision?_.substring(0,g.precision):_;break;case"T":_=Object.prototype.toString.call(_).slice(8,-1).toLowerCase(),_=g.precision?_.substring(0,g.precision):_;break;case"u":_=parseInt(_,10)>>>0;break;case"v":_=_.valueOf(),_=g.precision?_.substring(0,g.precision):_;break;case"x":_=(parseInt(_,10)>>>0).toString(16);break;case"X":_=(parseInt(_,10)>>>0).toString(16).toUpperCase();break}a.json.test(g.type)?w+=_:(a.number.test(g.type)&&(!y||g.sign)?(f=y?"+":"-",_=_.toString().replace(a.sign,"")):f="",d=g.pad_char?g.pad_char==="0"?"0":g.pad_char.charAt(1):" ",u=g.width-(f+_).length,b=g.width&&u>0?d.repeat(u):"",w+=g.align?f+_+b:d==="0"?f+b+_:b+f+_)}return w}var h=Object.create(null);function c(m){if(h[m])return h[m];for(var p=m,T,l=[],_=0;p;){if((T=a.text.exec(p))!==null)l.push(T[0]);else if((T=a.modulo.exec(p))!==null)l.push("%");else if((T=a.placeholder.exec(p))!==null){if(T[2]){_|=1;var w=[],A=T[2],M=[];if((M=a.key.exec(A))!==null)for(w.push(M[1]);(A=A.substring(M[0].length))!=="";)if((M=a.key_access.exec(A))!==null)w.push(M[1]);else if((M=a.index_access.exec(A))!==null)w.push(M[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");T[2]=w}else _|=2;if(_===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");l.push({placeholder:T[0],param_no:T[1],keys:T[2],sign:T[3],pad_char:T[4],align:T[5],width:T[6],precision:T[7],type:T[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");p=p.substring(T[0].length)}return h[m]=l}t.sprintf=n,t.vsprintf=i,typeof window<"u"&&(window.sprintf=n,window.vsprintf=i,o=function(){return{sprintf:n,vsprintf:i}}.call(t,r,t,e),o!==void 0&&(e.exports=o))})()},3390:function(e){e.exports=t;function t(r,o,a,n){var i=new Float32Array(4);return i[0]=r,i[1]=o,i[2]=a,i[3]=n,i}},3436:function(e,t,r){"use strict";var o=r(3236),a=r(9405),n=o([`precision highp float; #define GLSLIFY 1 attribute vec3 position, offset; attribute vec4 color; uniform mat4 model, view, projection; uniform float capSize; varying vec4 fragColor; varying vec3 fragPosition; void main() { vec4 worldPosition = model * vec4(position, 1.0); worldPosition = (worldPosition / worldPosition.w) + vec4(capSize * offset, 0.0); gl_Position = projection * (view * worldPosition); fragColor = color; fragPosition = position; }`]),i=o([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 clipBounds[2]; uniform float opacity; varying vec3 fragPosition; varying vec4 fragColor; void main() { if ( outOfRange(clipBounds[0], clipBounds[1], fragPosition) || fragColor.a * opacity == 0. ) discard; gl_FragColor = opacity * fragColor; }`]);e.exports=function(s){return a(s,n,i,null,[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"offset",type:"vec3"}])}},3502:function(e,t,r){e.exports=n;var o=r(5995),a=r(9127);function n(i,s){return a(o(i,s))}},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"])},3536:function(e){e.exports=t;function t(r,o){var a=o[0],n=o[1],i=o[2],s=a*a+n*n+i*i;return s>0&&(s=1/Math.sqrt(s),r[0]=o[0]*s,r[1]=o[1]*s,r[2]=o[2]*s),r}},3545:function(e,t,r){"use strict";e.exports=s;var o=r(8105),a=o("lom&&T[b+c]>M;--g,b-=_){for(var d=b,u=b+_,y=0;y<_;++y,++d,++u){var f=T[d];T[d]=T[u],T[u]=f}var R=l[g];l[g]=l[g-1],l[g-1]=R}}function s(h,c,m,p,T,l){if(p<=m+1)return m;for(var _=m,w=p,A=p+m>>>1,M=2*h,g=A,b=T[M*A+c];_=R?(g=f,b=R):y>=z?(g=u,b=y):(g=L,b=z):R>=z?(g=f,b=R):z>=y?(g=u,b=y):(g=L,b=z);for(var O=M*(w-1),P=M*g,F=0;Fthis.buffer.length){a.free(this.buffer);for(var w=this.buffer=a.mallocUint8(i(_*l*4)),A=0;A<_*l*4;++A)w[A]=255}return T}}}),m.begin=function(){var T=this.gl,l=this.shape;T&&(this.fbo.bind(),T.clearColor(1,1,1,1),T.clear(T.COLOR_BUFFER_BIT|T.DEPTH_BUFFER_BIT))},m.end=function(){var T=this.gl;T&&(T.bindFramebuffer(T.FRAMEBUFFER,null),this._readTimeout||clearTimeout(this._readTimeout),this._readTimeout=setTimeout(this._readCallback,1))},m.query=function(T,l,_){if(!this.gl)return null;var w=this.fbo.shape.slice();T=T|0,l=l|0,typeof _!="number"&&(_=1);var A=Math.min(Math.max(T-_,0),w[0])|0,M=Math.min(Math.max(T+_,0),w[0])|0,g=Math.min(Math.max(l-_,0),w[1])|0,b=Math.min(Math.max(l+_,0),w[1])|0;if(M<=A||b<=g)return null;var d=[M-A,b-g],u=n(this.buffer,[d[0],d[1],4],[4,w[0]*4,1],4*(A+w[0]*g)),y=s(u.hi(d[0],d[1],1),_,_),f=y[0],R=y[1];if(f<0||Math.pow(this.radius,2)g|0},vertex:function(w,A,M,g,b,d,u,y,f,R,L,z,F){var N=(u<<0)+(y<<1)+(f<<2)+(R<<3)|0;if(!(N===0||N===15))switch(N){case 0:L.push([w-.5,A-.5]);break;case 1:L.push([w-.25-.25*(g+M-2*F)/(M-g),A-.25-.25*(b+M-2*F)/(M-b)]);break;case 2:L.push([w-.75-.25*(-g-M+2*F)/(g-M),A-.25-.25*(d+g-2*F)/(g-d)]);break;case 3:L.push([w-.5,A-.5-.5*(b+M+d+g-4*F)/(M-b+g-d)]);break;case 4:L.push([w-.25-.25*(d+b-2*F)/(b-d),A-.75-.25*(-b-M+2*F)/(b-M)]);break;case 5:L.push([w-.5-.5*(g+M+d+b-4*F)/(M-g+b-d),A-.5]);break;case 6:L.push([w-.5-.25*(-g-M+d+b)/(g-M+b-d),A-.5-.25*(-b-M+d+g)/(b-M+g-d)]);break;case 7:L.push([w-.75-.25*(d+b-2*F)/(b-d),A-.75-.25*(d+g-2*F)/(g-d)]);break;case 8:L.push([w-.75-.25*(-d-b+2*F)/(d-b),A-.75-.25*(-d-g+2*F)/(d-g)]);break;case 9:L.push([w-.5-.25*(g+M+-d-b)/(M-g+d-b),A-.5-.25*(b+M+-d-g)/(M-b+d-g)]);break;case 10:L.push([w-.5-.5*(-g-M+-d-b+4*F)/(g-M+d-b),A-.5]);break;case 11:L.push([w-.25-.25*(-d-b+2*F)/(d-b),A-.75-.25*(b+M-2*F)/(M-b)]);break;case 12:L.push([w-.5,A-.5-.5*(-b-M+-d-g+4*F)/(b-M+d-g)]);break;case 13:L.push([w-.75-.25*(g+M-2*F)/(M-g),A-.25-.25*(-d-g+2*F)/(d-g)]);break;case 14:L.push([w-.25-.25*(-g-M+2*F)/(g-M),A-.25-.25*(-b-M+2*F)/(b-M)]);break;case 15:L.push([w-.5,A-.5]);break}},cell:function(w,A,M,g,b,d,u,y,f){b?y.push([w,A]):y.push([A,w])}});return function(_,w){var A=[],M=[];return l(_,A,M,w),{positions:A,cells:M}}}};function i(m,p){var T=m.length+"d",l=n[T];if(l)return l(o,m,p)}function s(m,p){for(var T=a(m,p),l=T.length,_=new Array(l),w=new Array(l),A=0;A>1,T=-7,l=a?i-1:0,_=a?-1:1,w=r[o+l];for(l+=_,s=w&(1<<-T)-1,w>>=-T,T+=c;T>0;s=s*256+r[o+l],l+=_,T-=8);for(h=s&(1<<-T)-1,s>>=-T,T+=n;T>0;h=h*256+r[o+l],l+=_,T-=8);if(s===0)s=1-p;else{if(s===m)return h?NaN:(w?-1:1)*(1/0);h=h+Math.pow(2,n),s=s-p}return(w?-1:1)*h*Math.pow(2,s-n)},t.write=function(r,o,a,n,i,s){var h,c,m,p=s*8-i-1,T=(1<>1,_=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,w=n?0:s-1,A=n?1:-1,M=o<0||o===0&&1/o<0?1:0;for(o=Math.abs(o),isNaN(o)||o===1/0?(c=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+=_/m:o+=_*Math.pow(2,1-l),o*m>=2&&(h++,m/=2),h+l>=T?(c=0,h=T):h+l>=1?(c=(o*m-1)*Math.pow(2,i),h=h+l):(c=o*Math.pow(2,l-1)*Math.pow(2,i),h=0));i>=8;r[a+w]=c&255,w+=A,c/=256,i-=8);for(h=h<0;r[a+w]=h&255,w+=A,h/=256,p-=8);r[a+w-A]|=M*128}},3788:function(e,t,r){"use strict";var o=r(8507),a=r(2419);e.exports=n;function n(i,s){return o(i,s)||a(i)-a(s)}},3837:function(e,t,r){"use strict";e.exports=L;var o=r(4935),a=r(501),n=r(5304),i=r(6429),s=r(6444),h=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),c=ArrayBuffer,m=DataView;function p(z){return c.isView(z)&&!(z instanceof m)}function T(z){return Array.isArray(z)||p(z)}function l(z,F){return z[0]=F[0],z[1]=F[1],z[2]=F[2],z}function _(z){this.gl=z,this.pixelRatio=1,this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.autoTicks=!0,this.tickSpacing=[1,1,1],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickFontStyle=["normal","normal","normal"],this.tickFontWeight=["normal","normal","normal"],this.tickFontVariant=["normal","normal","normal"],this.tickSize=[12,12,12],this.tickAngle=[0,0,0],this.tickAlign=["auto","auto","auto"],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[10,10,10],this.lastCubeProps={cubeEdges:[0,0,0],axis:[0,0,0]},this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont=["sans-serif","sans-serif","sans-serif"],this.labelFontStyle=["normal","normal","normal"],this.labelFontWeight=["normal","normal","normal"],this.labelFontVariant=["normal","normal","normal"],this.labelSize=[20,20,20],this.labelAngle=[0,0,0],this.labelAlign=["auto","auto","auto"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[10,10,10],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[0,0,0],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!1,!1,!1],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._firstInit=!0,this._text=null,this._lines=null,this._background=n(z)}var w=_.prototype;w.update=function(z){z=z||{};function F(q,oe,ae){if(ae in z){var j=z[ae],Q=this[ae],re;(q?T(j)&&T(j[0]):T(j))?this[ae]=re=[oe(j[0]),oe(j[1]),oe(j[2])]:this[ae]=re=[oe(j),oe(j),oe(j)];for(var ce=0;ce<3;++ce)if(re[ce]!==Q[ce])return!0}return!1}var N=F.bind(this,!1,Number),O=F.bind(this,!1,Boolean),P=F.bind(this,!1,String),U=F.bind(this,!0,function(q){if(T(q)){if(q.length===3)return[+q[0],+q[1],+q[2],1];if(q.length===4)return[+q[0],+q[1],+q[2],+q[3]]}return[0,0,0,1]}),B,X=!1,$=!1;if("bounds"in z)for(var se=z.bounds,le=0;le<2;++le)for(var fe=0;fe<3;++fe)se[le][fe]!==this.bounds[le][fe]&&($=!0),this.bounds[le][fe]=se[le][fe];if("ticks"in z){B=z.ticks,X=!0,this.autoTicks=!1;for(var le=0;le<3;++le)this.tickSpacing[le]=0}else N("tickSpacing")&&(this.autoTicks=!0,$=!0);if(this._firstInit&&("ticks"in z||"tickSpacing"in z||(this.autoTicks=!0),$=!0,X=!0,this._firstInit=!1),$&&this.autoTicks&&(B=s.create(this.bounds,this.tickSpacing),X=!0),X){for(var le=0;le<3;++le)B[le].sort(function(oe,ae){return oe.x-ae.x});s.equal(B,this.ticks)?X=!1:this.ticks=B}O("tickEnable"),P("tickFont")&&(X=!0),P("tickFontStyle")&&(X=!0),P("tickFontWeight")&&(X=!0),P("tickFontVariant")&&(X=!0),N("tickSize"),N("tickAngle"),N("tickPad"),U("tickColor");var V=P("labels");P("labelFont")&&(V=!0),P("labelFontStyle")&&(V=!0),P("labelFontWeight")&&(V=!0),P("labelFontVariant")&&(V=!0),O("labelEnable"),N("labelSize"),N("labelPad"),U("labelColor"),O("lineEnable"),O("lineMirror"),N("lineWidth"),U("lineColor"),O("lineTickEnable"),O("lineTickMirror"),N("lineTickLength"),N("lineTickWidth"),U("lineTickColor"),O("gridEnable"),N("gridWidth"),U("gridColor"),O("zeroEnable"),U("zeroLineColor"),N("zeroLineWidth"),O("backgroundEnable"),U("backgroundColor");var Y=[{family:this.labelFont[0],style:this.labelFontStyle[0],weight:this.labelFontWeight[0],variant:this.labelFontVariant[0]},{family:this.labelFont[1],style:this.labelFontStyle[1],weight:this.labelFontWeight[1],variant:this.labelFontVariant[1]},{family:this.labelFont[2],style:this.labelFontStyle[2],weight:this.labelFontWeight[2],variant:this.labelFontVariant[2]}],ee=[{family:this.tickFont[0],style:this.tickFontStyle[0],weight:this.tickFontWeight[0],variant:this.tickFontVariant[0]},{family:this.tickFont[1],style:this.tickFontStyle[1],weight:this.tickFontWeight[1],variant:this.tickFontVariant[1]},{family:this.tickFont[2],style:this.tickFontStyle[2],weight:this.tickFontWeight[2],variant:this.tickFontVariant[2]}];this._text?this._text&&(V||X)&&this._text.update(this.bounds,this.labels,Y,this.ticks,ee):this._text=o(this.gl,this.bounds,this.labels,Y,this.ticks,ee),this._lines&&X&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=a(this.gl,this.bounds,this.ticks))};function A(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}var M=[new A,new A,new A];function g(z,F,N,O,P){for(var U=z.primalOffset,B=z.primalMinor,X=z.mirrorOffset,$=z.mirrorMinor,se=O[F],le=0;le<3;++le)if(F!==le){var fe=U,V=X,Y=B,ee=$;se&1<0?(Y[le]=-1,ee[le]=0):(Y[le]=0,ee[le]=1)}}var b=[0,0,0],d={model:h,view:h,projection:h,_ortho:!1};w.isOpaque=function(){return!0},w.isTransparent=function(){return!1},w.drawTransparent=function(z){};var u=0,y=[0,0,0],f=[0,0,0],R=[0,0,0];w.draw=function(z){z=z||d;for(var ae=this.gl,F=z.model||h,N=z.view||h,O=z.projection||h,P=this.bounds,U=z._ortho||!1,B=i(F,N,O,P,U),X=B.cubeEdges,$=B.axis,se=N[12],le=N[13],fe=N[14],V=N[15],Y=U?2:1,ee=Y*this.pixelRatio*(O[3]*se+O[7]*le+O[11]*fe+O[15]*V)/ae.drawingBufferHeight,q=0;q<3;++q)this.lastCubeProps.cubeEdges[q]=X[q],this.lastCubeProps.axis[q]=$[q];for(var oe=M,q=0;q<3;++q)g(M[q],q,this.bounds,X,$);for(var ae=this.gl,j=b,q=0;q<3;++q)this.backgroundEnable[q]?j[q]=$[q]:j[q]=0;this._background.draw(F,N,O,P,j,this.backgroundColor),this._lines.bind(F,N,O,this);for(var q=0;q<3;++q){var Q=[0,0,0];$[q]>0?Q[q]=P[1][q]:Q[q]=P[0][q];for(var re=0;re<2;++re){var ce=(q+1+re)%3,be=(q+1+(re^1))%3;this.gridEnable[ce]&&this._lines.drawGrid(ce,be,this.bounds,Q,this.gridColor[ce],this.gridWidth[ce]*this.pixelRatio)}for(var re=0;re<2;++re){var ce=(q+1+re)%3,be=(q+1+(re^1))%3;this.zeroEnable[be]&&Math.min(P[0][be],P[1][be])<=0&&Math.max(P[0][be],P[1][be])>=0&&this._lines.drawZero(ce,be,this.bounds,Q,this.zeroLineColor[be],this.zeroLineWidth[be]*this.pixelRatio)}}for(var q=0;q<3;++q){this.lineEnable[q]&&this._lines.drawAxisLine(q,this.bounds,oe[q].primalOffset,this.lineColor[q],this.lineWidth[q]*this.pixelRatio),this.lineMirror[q]&&this._lines.drawAxisLine(q,this.bounds,oe[q].mirrorOffset,this.lineColor[q],this.lineWidth[q]*this.pixelRatio);for(var Ae=l(y,oe[q].primalMinor),De=l(f,oe[q].mirrorMinor),ze=this.lineTickLength,re=0;re<3;++re){var Ze=ee/F[5*re];Ae[re]*=ze[re]*Ze,De[re]*=ze[re]*Ze}this.lineTickEnable[q]&&this._lines.drawAxisTicks(q,oe[q].primalOffset,Ae,this.lineTickColor[q],this.lineTickWidth[q]*this.pixelRatio),this.lineTickMirror[q]&&this._lines.drawAxisTicks(q,oe[q].mirrorOffset,De,this.lineTickColor[q],this.lineTickWidth[q]*this.pixelRatio)}this._lines.unbind(),this._text.bind(F,N,O,this.pixelRatio);var at,nt=.5,rt,st;function Me(Qe){st=[0,0,0],st[Qe]=1}function ye(Qe,Pt,It){var qt=(Qe+1)%3,Wt=(Qe+2)%3,kr=Pt[qt],mr=Pt[Wt],qr=It[qt],Sr=It[Wt];if(kr>0&&Sr>0){Me(qt);return}else if(kr>0&&Sr<0){Me(qt);return}else if(kr<0&&Sr>0){Me(qt);return}else if(kr<0&&Sr<0){Me(qt);return}else if(mr>0&&qr>0){Me(Wt);return}else if(mr>0&&qr<0){Me(Wt);return}else if(mr<0&&qr>0){Me(Wt);return}else if(mr<0&&qr<0){Me(Wt);return}}for(var q=0;q<3;++q){for(var he=oe[q].primalMinor,Oe=oe[q].mirrorMinor,tt=l(R,oe[q].primalOffset),re=0;re<3;++re)this.lineTickEnable[q]&&(tt[re]+=ee*he[re]*Math.max(this.lineTickLength[re],0)/F[5*re]);var ot=[0,0,0];if(ot[q]=1,this.tickEnable[q]){this.tickAngle[q]===-3600?(this.tickAngle[q]=0,this.tickAlign[q]="auto"):this.tickAlign[q]=-1,rt=1,at=[this.tickAlign[q],nt,rt],at[0]==="auto"?at[0]=u:at[0]=parseInt(""+at[0]),st=[0,0,0],ye(q,he,Oe);for(var re=0;re<3;++re)tt[re]+=ee*he[re]*this.tickPad[re]/F[5*re];this._text.drawTicks(q,this.tickSize[q],this.tickAngle[q],tt,this.tickColor[q],ot,st,at)}if(this.labelEnable[q]){rt=0,st=[0,0,0],this.labels[q].length>4&&(Me(q),rt=1),at=[this.labelAlign[q],nt,rt],at[0]==="auto"?at[0]=u:at[0]=parseInt(""+at[0]);for(var re=0;re<3;++re)tt[re]+=ee*he[re]*this.labelPad[re]/F[5*re];tt[q]+=.5*(P[0][q]+P[1][q]),this._text.drawLabel(q,this.labelSize[q],this.labelAngle[q],tt,this.labelColor[q],[0,0,0],st,at)}}this._text.unbind()},w.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null};function L(z,F){var N=new _(z);return N.update(F),N}},3840:function(e){"use strict";e.exports=M;var t=0,r=1;function o(g,b,d,u,y,f){this._color=g,this.key=b,this.value=d,this.left=u,this.right=y,this._count=f}function a(g){return new o(g._color,g.key,g.value,g.left,g.right,g._count)}function n(g,b){return new o(g,b.key,b.value,b.left,b.right,b._count)}function i(g){g._count=1+(g.left?g.left._count:0)+(g.right?g.right._count:0)}function s(g,b){this._compare=g,this.root=b}var h=s.prototype;Object.defineProperty(h,"keys",{get:function(){var g=[];return this.forEach(function(b,d){g.push(b)}),g}}),Object.defineProperty(h,"values",{get:function(){var g=[];return this.forEach(function(b,d){g.push(d)}),g}}),Object.defineProperty(h,"length",{get:function(){return this.root?this.root._count:0}}),h.insert=function(g,b){for(var d=this._compare,u=this.root,y=[],f=[];u;){var R=d(g,u.key);y.push(u),f.push(R),R<=0?u=u.left:u=u.right}y.push(new o(t,g,b,null,null,1));for(var L=y.length-2;L>=0;--L){var u=y[L];f[L]<=0?y[L]=new o(u._color,u.key,u.value,y[L+1],u.right,u._count+1):y[L]=new o(u._color,u.key,u.value,u.left,y[L+1],u._count+1)}for(var L=y.length-1;L>1;--L){var z=y[L-1],u=y[L];if(z._color===r||u._color===r)break;var F=y[L-2];if(F.left===z)if(z.left===u){var N=F.right;if(N&&N._color===t)z._color=r,F.right=n(r,N),F._color=t,L-=1;else{if(F._color=t,F.left=z.right,z._color=r,z.right=F,y[L-2]=z,y[L-1]=u,i(F),i(z),L>=3){var O=y[L-3];O.left===F?O.left=z:O.right=z}break}}else{var N=F.right;if(N&&N._color===t)z._color=r,F.right=n(r,N),F._color=t,L-=1;else{if(z.right=u.left,F._color=t,F.left=u.right,u._color=r,u.left=z,u.right=F,y[L-2]=u,y[L-1]=z,i(F),i(z),i(u),L>=3){var O=y[L-3];O.left===F?O.left=u:O.right=u}break}}else if(z.right===u){var N=F.left;if(N&&N._color===t)z._color=r,F.left=n(r,N),F._color=t,L-=1;else{if(F._color=t,F.right=z.left,z._color=r,z.left=F,y[L-2]=z,y[L-1]=u,i(F),i(z),L>=3){var O=y[L-3];O.right===F?O.right=z:O.left=z}break}}else{var N=F.left;if(N&&N._color===t)z._color=r,F.left=n(r,N),F._color=t,L-=1;else{if(z.left=u.right,F._color=t,F.right=u.left,u._color=r,u.right=z,u.left=F,y[L-2]=u,y[L-1]=z,i(F),i(z),i(u),L>=3){var O=y[L-3];O.right===F?O.right=u:O.left=u}break}}}return y[0]._color=r,new s(d,y[0])};function c(g,b){if(b.left){var d=c(g,b.left);if(d)return d}var d=g(b.key,b.value);if(d)return d;if(b.right)return c(g,b.right)}function m(g,b,d,u){var y=b(g,u.key);if(y<=0){if(u.left){var f=m(g,b,d,u.left);if(f)return f}var f=d(u.key,u.value);if(f)return f}if(u.right)return m(g,b,d,u.right)}function p(g,b,d,u,y){var f=d(g,y.key),R=d(b,y.key),L;if(f<=0&&(y.left&&(L=p(g,b,d,u,y.left),L)||R>0&&(L=u(y.key,y.value),L)))return L;if(R>0&&y.right)return p(g,b,d,u,y.right)}h.forEach=function(b,d,u){if(this.root)switch(arguments.length){case 1:return c(b,this.root);case 2:return m(d,this._compare,b,this.root);case 3:return this._compare(d,u)>=0?void 0:p(d,u,this._compare,b,this.root)}},Object.defineProperty(h,"begin",{get:function(){for(var g=[],b=this.root;b;)g.push(b),b=b.left;return new T(this,g)}}),Object.defineProperty(h,"end",{get:function(){for(var g=[],b=this.root;b;)g.push(b),b=b.right;return new T(this,g)}}),h.at=function(g){if(g<0)return new T(this,[]);for(var b=this.root,d=[];;){if(d.push(b),b.left){if(g=b.right._count)break;b=b.right}else break}return new T(this,[])},h.ge=function(g){for(var b=this._compare,d=this.root,u=[],y=0;d;){var f=b(g,d.key);u.push(d),f<=0&&(y=u.length),f<=0?d=d.left:d=d.right}return u.length=y,new T(this,u)},h.gt=function(g){for(var b=this._compare,d=this.root,u=[],y=0;d;){var f=b(g,d.key);u.push(d),f<0&&(y=u.length),f<0?d=d.left:d=d.right}return u.length=y,new T(this,u)},h.lt=function(g){for(var b=this._compare,d=this.root,u=[],y=0;d;){var f=b(g,d.key);u.push(d),f>0&&(y=u.length),f<=0?d=d.left:d=d.right}return u.length=y,new T(this,u)},h.le=function(g){for(var b=this._compare,d=this.root,u=[],y=0;d;){var f=b(g,d.key);u.push(d),f>=0&&(y=u.length),f<0?d=d.left:d=d.right}return u.length=y,new T(this,u)},h.find=function(g){for(var b=this._compare,d=this.root,u=[];d;){var y=b(g,d.key);if(u.push(d),y===0)return new T(this,u);y<=0?d=d.left:d=d.right}return new T(this,[])},h.remove=function(g){var b=this.find(g);return b?b.remove():this},h.get=function(g){for(var b=this._compare,d=this.root;d;){var u=b(g,d.key);if(u===0)return d.value;u<=0?d=d.left:d=d.right}};function T(g,b){this.tree=g,this._stack=b}var l=T.prototype;Object.defineProperty(l,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(l,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),l.clone=function(){return new T(this.tree,this._stack.slice())};function _(g,b){g.key=b.key,g.value=b.value,g.left=b.left,g.right=b.right,g._color=b._color,g._count=b._count}function w(g){for(var b,d,u,y,f=g.length-1;f>=0;--f){if(b=g[f],f===0){b._color=r;return}if(d=g[f-1],d.left===b){if(u=d.right,u.right&&u.right._color===t){if(u=d.right=a(u),y=u.right=a(u.right),d.right=u.left,u.left=d,u.right=y,u._color=d._color,b._color=r,d._color=r,y._color=r,i(d),i(u),f>1){var R=g[f-2];R.left===d?R.left=u:R.right=u}g[f-1]=u;return}else if(u.left&&u.left._color===t){if(u=d.right=a(u),y=u.left=a(u.left),d.right=y.left,u.left=y.right,y.left=d,y.right=u,y._color=d._color,d._color=r,u._color=r,b._color=r,i(d),i(u),i(y),f>1){var R=g[f-2];R.left===d?R.left=y:R.right=y}g[f-1]=y;return}if(u._color===r)if(d._color===t){d._color=r,d.right=n(t,u);return}else{d.right=n(t,u);continue}else{if(u=a(u),d.right=u.left,u.left=d,u._color=d._color,d._color=t,i(d),i(u),f>1){var R=g[f-2];R.left===d?R.left=u:R.right=u}g[f-1]=u,g[f]=d,f+11){var R=g[f-2];R.right===d?R.right=u:R.left=u}g[f-1]=u;return}else if(u.right&&u.right._color===t){if(u=d.left=a(u),y=u.right=a(u.right),d.left=y.right,u.right=y.left,y.right=d,y.left=u,y._color=d._color,d._color=r,u._color=r,b._color=r,i(d),i(u),i(y),f>1){var R=g[f-2];R.right===d?R.right=y:R.left=y}g[f-1]=y;return}if(u._color===r)if(d._color===t){d._color=r,d.left=n(t,u);return}else{d.left=n(t,u);continue}else{if(u=a(u),d.left=u.right,u.right=d,u._color=d._color,d._color=t,i(d),i(u),f>1){var R=g[f-2];R.right===d?R.right=u:R.left=u}g[f-1]=u,g[f]=d,f+1=0;--u){var d=g[u];d.left===g[u+1]?b[u]=new o(d._color,d.key,d.value,b[u+1],d.right,d._count):b[u]=new o(d._color,d.key,d.value,d.left,b[u+1],d._count)}if(d=b[b.length-1],d.left&&d.right){var y=b.length;for(d=d.left;d.right;)b.push(d),d=d.right;var f=b[y-1];b.push(new o(d._color,f.key,f.value,d.left,d.right,d._count)),b[y-1].key=d.key,b[y-1].value=d.value;for(var u=b.length-2;u>=y;--u)d=b[u],b[u]=new o(d._color,d.key,d.value,d.left,b[u+1],d._count);b[y-1].left=b[y]}if(d=b[b.length-1],d._color===t){var R=b[b.length-2];R.left===d?R.left=null:R.right===d&&(R.right=null),b.pop();for(var u=0;u0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(l,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(l,"index",{get:function(){var g=0,b=this._stack;if(b.length===0){var d=this.tree.root;return d?d._count:0}else b[b.length-1].left&&(g=b[b.length-1].left._count);for(var u=b.length-2;u>=0;--u)b[u+1]===b[u].right&&(++g,b[u].left&&(g+=b[u].left._count));return g},enumerable:!0}),l.next=function(){var g=this._stack;if(g.length!==0){var b=g[g.length-1];if(b.right)for(b=b.right;b;)g.push(b),b=b.left;else for(g.pop();g.length>0&&g[g.length-1].right===b;)b=g[g.length-1],g.pop()}},Object.defineProperty(l,"hasNext",{get:function(){var g=this._stack;if(g.length===0)return!1;if(g[g.length-1].right)return!0;for(var b=g.length-1;b>0;--b)if(g[b-1].left===g[b])return!0;return!1}}),l.update=function(g){var b=this._stack;if(b.length===0)throw new Error("Can't update empty node!");var d=new Array(b.length),u=b[b.length-1];d[d.length-1]=new o(u._color,u.key,g,u.left,u.right,u._count);for(var y=b.length-2;y>=0;--y)u=b[y],u.left===b[y+1]?d[y]=new o(u._color,u.key,u.value,d[y+1],u.right,u._count):d[y]=new o(u._color,u.key,u.value,u.left,d[y+1],u._count);return new s(this.tree._compare,d[0])},l.prev=function(){var g=this._stack;if(g.length!==0){var b=g[g.length-1];if(b.left)for(b=b.left;b;)g.push(b),b=b.right;else for(g.pop();g.length>0&&g[g.length-1].left===b;)b=g[g.length-1],g.pop()}},Object.defineProperty(l,"hasPrev",{get:function(){var g=this._stack;if(g.length===0)return!1;if(g[g.length-1].left)return!0;for(var b=g.length-1;b>0;--b)if(g[b-1].right===g[b])return!0;return!1}});function A(g,b){return gb?1:0}function M(g){return new s(g||A,null)}},3865:function(e,t,r){"use strict";var o=r(869);e.exports=a;function a(n,i){return o(n[0].mul(i[1]).add(i[0].mul(n[1])),n[1].mul(i[1]))}},3952:function(e,t,r){"use strict";e.exports=n;var o=r(3250);function a(i,s){for(var h=new Array(s+1),c=0;c20?52:h+32}},4040:function(e){e.exports=t;function t(r,o,a,n,i,s,h){var c=1/(o-a),m=1/(n-i),p=1/(s-h);return r[0]=-2*c,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=-2*m,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=2*p,r[11]=0,r[12]=(o+a)*c,r[13]=(i+n)*m,r[14]=(h+s)*p,r[15]=1,r}},4041:function(e){e.exports=t;function t(r,o,a){var n=o[0],i=o[1],s=o[2],h=a[0],c=a[1],m=a[2],p=a[3],T=p*n+c*s-m*i,l=p*i+m*n-h*s,_=p*s+h*i-c*n,w=-h*n-c*i-m*s;return r[0]=T*p+w*-h+l*-m-_*-c,r[1]=l*p+w*-c+_*-h-T*-m,r[2]=_*p+w*-m+T*-c-l*-h,r[3]=o[3],r}},4081:function(e){"use strict";e.exports=t;function t(r,o,a,n,i,s,h,c,m,p){var T=o+s+p;if(l>0){var l=Math.sqrt(T+1);r[0]=.5*(h-m)/l,r[1]=.5*(c-n)/l,r[2]=.5*(a-s)/l,r[3]=.5*l}else{var _=Math.max(o,s,p),l=Math.sqrt(2*_-T+1);o>=_?(r[0]=.5*l,r[1]=.5*(i+a)/l,r[2]=.5*(c+n)/l,r[3]=.5*(h-m)/l):s>=_?(r[0]=.5*(a+i)/l,r[1]=.5*l,r[2]=.5*(m+h)/l,r[3]=.5*(c-n)/l):(r[0]=.5*(n+c)/l,r[1]=.5*(h+m)/l,r[2]=.5*l,r[3]=.5*(a-i)/l)}return r}},4100:function(e,t,r){"use strict";var o=r(4437),a=r(3837),n=r(5445),i=r(4449),s=r(3589),h=r(2260),c=r(7169),m=r(351),p=r(4772),T=r(4040),l=r(799),_=r(9216)({tablet:!0,featureDetect:!0});e.exports={createScene:b,createCamera:o};function w(){this.mouse=[-1,-1],this.screen=null,this.distance=1/0,this.index=null,this.dataCoordinate=null,this.dataPosition=null,this.object=null,this.data=null}function A(u,y){var f=null;try{f=u.getContext("webgl",y),f||(f=u.getContext("experimental-webgl",y))}catch{return null}return f}function M(u){var y=Math.round(Math.log(Math.abs(u))/Math.log(10));if(y<0){var f=Math.round(Math.pow(10,-y));return Math.ceil(u*f)/f}else if(y>0){var f=Math.round(Math.pow(10,y));return Math.ceil(u/f)*f}return Math.ceil(u)}function g(u){return typeof u=="boolean"?u:!0}function b(u){u=u||{},u.camera=u.camera||{};var y=u.canvas;if(!y)if(y=document.createElement("canvas"),u.container){var f=u.container;f.appendChild(y)}else document.body.appendChild(y);var R=u.gl;if(R||(u.glOptions&&(_=!!u.glOptions.preserveDrawingBuffer),R=A(y,u.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:_})),!R)throw new Error("webgl not supported");var L=u.bounds||[[-10,-10,-10],[10,10,10]],z=new w,F=h(R,R.drawingBufferWidth,R.drawingBufferHeight,{preferFloat:!_}),N=l(R),O=u.cameraObject&&u.cameraObject._ortho===!0||u.camera.projection&&u.camera.projection.type==="orthographic"||!1,P={eye:u.camera.eye||[2,0,0],center:u.camera.center||[0,0,0],up:u.camera.up||[0,1,0],zoomMin:u.camera.zoomMax||.1,zoomMax:u.camera.zoomMin||100,mode:u.camera.mode||"turntable",_ortho:O},U=u.axes||{},B=a(R,U);B.enable=!U.disable;var X=u.spikes||{},$=i(R,X),se=[],le=[],fe=[],V=[],Y=!0,ae=!0,ee=new Array(16),q=new Array(16),oe={view:null,projection:ee,model:q,_ortho:!1},ae=!0,j=[R.drawingBufferWidth,R.drawingBufferHeight],Q=u.cameraObject||o(y,P),re={gl:R,contextLost:!1,pixelRatio:u.pixelRatio||1,canvas:y,selection:z,camera:Q,axes:B,axesPixels:null,spikes:$,bounds:L,objects:se,shape:j,aspect:u.aspectRatio||[1,1,1],pickRadius:u.pickRadius||10,zNear:u.zNear||.01,zFar:u.zFar||1e3,fovy:u.fovy||Math.PI/4,clearColor:u.clearColor||[0,0,0,0],autoResize:g(u.autoResize),autoBounds:g(u.autoBounds),autoScale:!!u.autoScale,autoCenter:g(u.autoCenter),clipToBounds:g(u.clipToBounds),snapToData:!!u.snapToData,onselect:u.onselect||null,onrender:u.onrender||null,onclick:u.onclick||null,cameraParams:oe,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(st){this.aspect[0]=st.x,this.aspect[1]=st.y,this.aspect[2]=st.z,ae=!0},setBounds:function(st,Me){this.bounds[0][st]=Me.min,this.bounds[1][st]=Me.max},setClearColor:function(st){this.clearColor=st},clearRGBA:function(){this.gl.clearColor(this.clearColor[0],this.clearColor[1],this.clearColor[2],this.clearColor[3]),this.gl.clear(this.gl.COLOR_BUFFER_BIT|this.gl.DEPTH_BUFFER_BIT)}},ce=[R.drawingBufferWidth/re.pixelRatio|0,R.drawingBufferHeight/re.pixelRatio|0];function be(){if(!re._stopped&&re.autoResize){var st=y.parentNode,Me=1,ye=1;st&&st!==document.body?(Me=st.clientWidth,ye=st.clientHeight):(Me=window.innerWidth,ye=window.innerHeight);var he=Math.ceil(Me*re.pixelRatio)|0,Oe=Math.ceil(ye*re.pixelRatio)|0;if(he!==y.width||Oe!==y.height){y.width=he,y.height=Oe;var tt=y.style;tt.position=tt.position||"absolute",tt.left="0px",tt.top="0px",tt.width=Me+"px",tt.height=ye+"px",Y=!0}}}re.autoResize&&be(),window.addEventListener("resize",be);function Ae(){for(var st=se.length,Me=V.length,ye=0;ye0&&fe[Me-1]===0;)fe.pop(),V.pop().dispose()}re.update=function(st){re._stopped||(st=st||{},Y=!0,ae=!0)},re.add=function(st){re._stopped||(st.axes=B,se.push(st),le.push(-1),Y=!0,ae=!0,Ae())},re.remove=function(st){if(!re._stopped){var Me=se.indexOf(st);Me<0||(se.splice(Me,1),le.pop(),Y=!0,ae=!0,Ae())}},re.dispose=function(){if(!re._stopped&&(re._stopped=!0,window.removeEventListener("resize",be),y.removeEventListener("webglcontextlost",De),re.mouseListener.enabled=!1,!re.contextLost)){B.dispose(),$.dispose();for(var st=0;stz.distance)continue;for(var It=0;Itp;){var d=l[b-2],u=l[b-1];if(dl[T+1]:!0}function c(p,T,l,_){p*=2;var w=_[p];return w>1,g=M-_,b=M+_,d=w,u=g,y=M,f=b,R=A,L=p+1,z=T-1,F=0;h(d,u,l)&&(F=d,d=u,u=F),h(f,R,l)&&(F=f,f=R,R=F),h(d,y,l)&&(F=d,d=y,y=F),h(u,y,l)&&(F=u,u=y,y=F),h(d,f,l)&&(F=d,d=f,f=F),h(y,f,l)&&(F=y,y=f,f=F),h(u,R,l)&&(F=u,u=R,R=F),h(u,y,l)&&(F=u,u=y,y=F),h(f,R,l)&&(F=f,f=R,R=F);for(var N=l[2*u],O=l[2*u+1],P=l[2*f],U=l[2*f+1],B=2*d,X=2*y,$=2*R,se=2*w,le=2*M,fe=2*A,V=0;V<2;++V){var Y=l[B+V],ee=l[X+V],q=l[$+V];l[se+V]=Y,l[le+V]=ee,l[fe+V]=q}n(g,p,l),n(b,T,l);for(var oe=L;oe<=z;++oe)if(c(oe,N,O,l))oe!==L&&a(oe,L,l),++L;else if(!c(oe,P,U,l))for(;;)if(c(z,P,U,l)){c(z,N,O,l)?(i(oe,L,z,l),++L,--z):(a(oe,z,l),--z);break}else{if(--z0)if(w[0]!==M[1][0])A=_,_=_.right;else{var u=m(_.right,w);if(u)return u;_=_.left}else{if(w[0]!==M[1][0])return _;var u=m(_.right,w);if(u)return u;_=_.left}}return A}h.castUp=function(_){var w=o.le(this.coordinates,_[0]);if(w<0)return-1;var A=this.slabs[w],M=m(this.slabs[w],_),g=-1;if(M&&(g=M.value),this.coordinates[w]===_[0]){var b=null;if(M&&(b=M.key),w>0){var d=m(this.slabs[w-1],_);d&&(b?i(d.key,b)>0&&(b=d.key,g=d.value):(g=d.value,b=d.key))}var u=this.horizontal[w];if(u.length>0){var y=o.ge(u,_[1],c);if(y=u.length)return g;f=u[y]}}if(f.start)if(b){var R=n(b[0],b[1],[_[0],f.y]);b[0][0]>b[1][0]&&(R=-R),R>0&&(g=f.index)}else g=f.index;else f.y!==_[1]&&(g=f.index)}}}return g};function p(_,w,A,M){this.y=_,this.index=w,this.start=A,this.closed=M}function T(_,w,A,M){this.x=_,this.segment=w,this.create=A,this.index=M}function l(_){for(var w=_.length,A=2*w,M=new Array(A),g=0;gMath.abs(u))l.rotate(R,0,0,-d*y*Math.PI*g.rotateSpeed/window.innerWidth);else if(!g._ortho){var L=-g.zoomSpeed*f*u/window.innerHeight*(R-l.lastT())/20;l.pan(R,0,0,w*(Math.exp(L)-1))}}},!0)},g.enableMouseListeners(),g}},4449:function(e,t,r){"use strict";var o=r(2762),a=r(8116),n=r(1493);e.exports=T;var i=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function s(l,_,w,A){this.gl=l,this.buffer=_,this.vao=w,this.shader=A,this.pixelRatio=1,this.bounds=[[-1e3,-1e3,-1e3],[1e3,1e3,1e3]],this.position=[0,0,0],this.lineWidth=[2,2,2],this.colors=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.enabled=[!0,!0,!0],this.drawSides=[!0,!0,!0],this.axes=null}var h=s.prototype,c=[0,0,0],m=[0,0,0],p=[0,0];h.isTransparent=function(){return!1},h.drawTransparent=function(l){},h.draw=function(l){var _=this.gl,w=this.vao,A=this.shader;w.bind(),A.bind();var M=l.model||i,g=l.view||i,b=l.projection||i,d;this.axes&&(d=this.axes.lastCubeProps.axis);for(var u=c,y=m,f=0;f<3;++f)d&&d[f]<0?(u[f]=this.bounds[0][f],y[f]=this.bounds[1][f]):(u[f]=this.bounds[1][f],y[f]=this.bounds[0][f]);p[0]=_.drawingBufferWidth,p[1]=_.drawingBufferHeight,A.uniforms.model=M,A.uniforms.view=g,A.uniforms.projection=b,A.uniforms.coordinates=[this.position,u,y],A.uniforms.colors=this.colors,A.uniforms.screenShape=p;for(var f=0;f<3;++f)A.uniforms.lineWidth=this.lineWidth[f]*this.pixelRatio,this.enabled[f]&&(w.draw(_.TRIANGLES,6,6*f),this.drawSides[f]&&w.draw(_.TRIANGLES,12,18+12*f));w.unbind()},h.update=function(l){l&&("bounds"in l&&(this.bounds=l.bounds),"position"in l&&(this.position=l.position),"lineWidth"in l&&(this.lineWidth=l.lineWidth),"colors"in l&&(this.colors=l.colors),"enabled"in l&&(this.enabled=l.enabled),"drawSides"in l&&(this.drawSides=l.drawSides))},h.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()};function T(l,_){var w=[];function A(u,y,f,R,L,z){var F=[u,y,f,0,0,0,1];F[R+3]=1,F[R]=L,w.push.apply(w,F),F[6]=-1,w.push.apply(w,F),F[R]=z,w.push.apply(w,F),w.push.apply(w,F),F[6]=1,w.push.apply(w,F),F[R]=L,w.push.apply(w,F)}A(0,0,0,0,0,1),A(0,0,0,1,0,1),A(0,0,0,2,0,1),A(1,0,0,1,-1,1),A(1,0,0,2,-1,1),A(0,1,0,0,-1,1),A(0,1,0,2,-1,1),A(0,0,1,0,-1,1),A(0,0,1,1,-1,1);var M=o(l,w),g=a(l,[{type:l.FLOAT,buffer:M,size:3,offset:0,stride:28},{type:l.FLOAT,buffer:M,size:3,offset:12,stride:28},{type:l.FLOAT,buffer:M,size:1,offset:24,stride:28}]),b=n(l);b.attributes.position.location=0,b.attributes.color.location=1,b.attributes.weight.location=2;var d=new s(l,M,g,b);return d.update(_),d}},4494:function(e){e.exports=t;function t(r,o){return r[0]=1/o[0],r[1]=1/o[1],r[2]=1/o[2],r[3]=1/o[3],r}},4505:function(e,t,r){e.exports=r(5847)},4578:function(e){e.exports=t;function t(r,o,a,n,i){return r[0]=o,r[1]=a,r[2]=n,r[3]=i,r}},4623:function(e){"use strict";"use restrict";e.exports=t;function t(r){this.roots=new Array(r),this.ranks=new Array(r);for(var o=0;o0)return 1<=0)return 1<=0;--l)h[l]=c*o[l]+m*a[l]+p*n[l]+T*i[l];return h}return c*o+m*a+p*n[l]+T*i}function r(o,a,n,i,s,h){var c=s-1,m=s*s,p=c*c,T=(1+2*s)*p,l=s*p,_=m*(3-2*s),w=m*c;if(o.length){h||(h=new Array(o.length));for(var A=o.length-1;A>=0;--A)h[A]=T*o[A]+l*a[A]+_*n[A]+w*i[A];return h}return T*o+l*a+_*n+w*i}e.exports=r,e.exports.derivative=t},4772:function(e){e.exports=t;function t(r,o,a,n,i){var s=1/Math.tan(o/2),h=1/(n-i);return r[0]=s/a,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=s,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=(i+n)*h,r[11]=-1,r[12]=0,r[13]=0,r[14]=2*i*n*h,r[15]=0,r}},4793:function(e,t,r){"use strict";var o;function a(Ce,Ee){if(!(Ce instanceof Ee))throw new TypeError("Cannot call a class as a function")}function n(Ce,Ee){for(var Pe=0;Ped)throw new RangeError('The value "'+Ce+'" is invalid for option "size"');var Ee=new Uint8Array(Ce);return Object.setPrototypeOf(Ee,f.prototype),Ee}function f(Ce,Ee,Pe){if(typeof Ce=="number"){if(typeof Ee=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return F(Ce)}return R(Ce,Ee,Pe)}f.poolSize=8192;function R(Ce,Ee,Pe){if(typeof Ce=="string")return N(Ce,Ee);if(ArrayBuffer.isView(Ce))return P(Ce);if(Ce==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+A(Ce));if(Ne(Ce,ArrayBuffer)||Ce&&Ne(Ce.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Ne(Ce,SharedArrayBuffer)||Ce&&Ne(Ce.buffer,SharedArrayBuffer)))return U(Ce,Ee,Pe);if(typeof Ce=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var ft=Ce.valueOf&&Ce.valueOf();if(ft!=null&&ft!==Ce)return f.from(ft,Ee,Pe);var ct=B(Ce);if(ct)return ct;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof Ce[Symbol.toPrimitive]=="function")return f.from(Ce[Symbol.toPrimitive]("string"),Ee,Pe);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+A(Ce))}f.from=function(Ce,Ee,Pe){return R(Ce,Ee,Pe)},Object.setPrototypeOf(f.prototype,Uint8Array.prototype),Object.setPrototypeOf(f,Uint8Array);function L(Ce){if(typeof Ce!="number")throw new TypeError('"size" argument must be of type number');if(Ce<0)throw new RangeError('The value "'+Ce+'" is invalid for option "size"')}function z(Ce,Ee,Pe){return L(Ce),Ce<=0?y(Ce):Ee!==void 0?typeof Pe=="string"?y(Ce).fill(Ee,Pe):y(Ce).fill(Ee):y(Ce)}f.alloc=function(Ce,Ee,Pe){return z(Ce,Ee,Pe)};function F(Ce){return L(Ce),y(Ce<0?0:X(Ce)|0)}f.allocUnsafe=function(Ce){return F(Ce)},f.allocUnsafeSlow=function(Ce){return F(Ce)};function N(Ce,Ee){if((typeof Ee!="string"||Ee==="")&&(Ee="utf8"),!f.isEncoding(Ee))throw new TypeError("Unknown encoding: "+Ee);var Pe=se(Ce,Ee)|0,ft=y(Pe),ct=ft.write(Ce,Ee);return ct!==Pe&&(ft=ft.slice(0,ct)),ft}function O(Ce){for(var Ee=Ce.length<0?0:X(Ce.length)|0,Pe=y(Ee),ft=0;ft=d)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+d.toString(16)+" bytes");return Ce|0}function $(Ce){return+Ce!=Ce&&(Ce=0),f.alloc(+Ce)}f.isBuffer=function(Ee){return Ee!=null&&Ee._isBuffer===!0&&Ee!==f.prototype},f.compare=function(Ee,Pe){if(Ne(Ee,Uint8Array)&&(Ee=f.from(Ee,Ee.offset,Ee.byteLength)),Ne(Pe,Uint8Array)&&(Pe=f.from(Pe,Pe.offset,Pe.byteLength)),!f.isBuffer(Ee)||!f.isBuffer(Pe))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(Ee===Pe)return 0;for(var ft=Ee.length,ct=Pe.length,_t=0,Ct=Math.min(ft,ct);_tct.length?(f.isBuffer(Ct)||(Ct=f.from(Ct)),Ct.copy(ct,_t)):Uint8Array.prototype.set.call(ct,Ct,_t);else if(f.isBuffer(Ct))Ct.copy(ct,_t);else throw new TypeError('"list" argument must be an Array of Buffers');_t+=Ct.length}return ct};function se(Ce,Ee){if(f.isBuffer(Ce))return Ce.length;if(ArrayBuffer.isView(Ce)||Ne(Ce,ArrayBuffer))return Ce.byteLength;if(typeof Ce!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+A(Ce));var Pe=Ce.length,ft=arguments.length>2&&arguments[2]===!0;if(!ft&&Pe===0)return 0;for(var ct=!1;;)switch(Ee){case"ascii":case"latin1":case"binary":return Pe;case"utf8":case"utf-8":return mr(Ce).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Pe*2;case"hex":return Pe>>>1;case"base64":return Rr(Ce).length;default:if(ct)return ft?-1:mr(Ce).length;Ee=(""+Ee).toLowerCase(),ct=!0}}f.byteLength=se;function le(Ce,Ee,Pe){var ft=!1;if((Ee===void 0||Ee<0)&&(Ee=0),Ee>this.length||((Pe===void 0||Pe>this.length)&&(Pe=this.length),Pe<=0)||(Pe>>>=0,Ee>>>=0,Pe<=Ee))return"";for(Ce||(Ce="utf8");;)switch(Ce){case"hex":return ze(this,Ee,Pe);case"utf8":case"utf-8":return re(this,Ee,Pe);case"ascii":return Ae(this,Ee,Pe);case"latin1":case"binary":return De(this,Ee,Pe);case"base64":return Q(this,Ee,Pe);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ze(this,Ee,Pe);default:if(ft)throw new TypeError("Unknown encoding: "+Ce);Ce=(Ce+"").toLowerCase(),ft=!0}}f.prototype._isBuffer=!0;function fe(Ce,Ee,Pe){var ft=Ce[Ee];Ce[Ee]=Ce[Pe],Ce[Pe]=ft}f.prototype.swap16=function(){var Ee=this.length;if(Ee%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var Pe=0;PePe&&(Ee+=" ... "),""},b&&(f.prototype[b]=f.prototype.inspect),f.prototype.compare=function(Ee,Pe,ft,ct,_t){if(Ne(Ee,Uint8Array)&&(Ee=f.from(Ee,Ee.offset,Ee.byteLength)),!f.isBuffer(Ee))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+A(Ee));if(Pe===void 0&&(Pe=0),ft===void 0&&(ft=Ee?Ee.length:0),ct===void 0&&(ct=0),_t===void 0&&(_t=this.length),Pe<0||ft>Ee.length||ct<0||_t>this.length)throw new RangeError("out of range index");if(ct>=_t&&Pe>=ft)return 0;if(ct>=_t)return-1;if(Pe>=ft)return 1;if(Pe>>>=0,ft>>>=0,ct>>>=0,_t>>>=0,this===Ee)return 0;for(var Ct=_t-ct,ir=ft-Pe,rr=Math.min(Ct,ir),er=this.slice(ct,_t),Lr=Ee.slice(Pe,ft),fa=0;fa2147483647?Pe=2147483647:Pe<-2147483648&&(Pe=-2147483648),Pe=+Pe,Ke(Pe)&&(Pe=ct?0:Ce.length-1),Pe<0&&(Pe=Ce.length+Pe),Pe>=Ce.length){if(ct)return-1;Pe=Ce.length-1}else if(Pe<0)if(ct)Pe=0;else return-1;if(typeof Ee=="string"&&(Ee=f.from(Ee,ft)),f.isBuffer(Ee))return Ee.length===0?-1:Y(Ce,Ee,Pe,ft,ct);if(typeof Ee=="number")return Ee=Ee&255,typeof Uint8Array.prototype.indexOf=="function"?ct?Uint8Array.prototype.indexOf.call(Ce,Ee,Pe):Uint8Array.prototype.lastIndexOf.call(Ce,Ee,Pe):Y(Ce,[Ee],Pe,ft,ct);throw new TypeError("val must be string, number or Buffer")}function Y(Ce,Ee,Pe,ft,ct){var _t=1,Ct=Ce.length,ir=Ee.length;if(ft!==void 0&&(ft=String(ft).toLowerCase(),ft==="ucs2"||ft==="ucs-2"||ft==="utf16le"||ft==="utf-16le")){if(Ce.length<2||Ee.length<2)return-1;_t=2,Ct/=2,ir/=2,Pe/=2}function rr(Ia,qa){return _t===1?Ia[qa]:Ia.readUInt16BE(qa*_t)}var er;if(ct){var Lr=-1;for(er=Pe;erCt&&(Pe=Ct-ir),er=Pe;er>=0;er--){for(var fa=!0,Da=0;Dact&&(ft=ct)):ft=ct;var _t=Ee.length;ft>_t/2&&(ft=_t/2);var Ct;for(Ct=0;Ct>>0,isFinite(ft)?(ft=ft>>>0,ct===void 0&&(ct="utf8")):(ct=ft,ft=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var _t=this.length-Pe;if((ft===void 0||ft>_t)&&(ft=_t),Ee.length>0&&(ft<0||Pe<0)||Pe>this.length)throw new RangeError("Attempt to write outside buffer bounds");ct||(ct="utf8");for(var Ct=!1;;)switch(ct){case"hex":return ee(this,Ee,Pe,ft);case"utf8":case"utf-8":return q(this,Ee,Pe,ft);case"ascii":case"latin1":case"binary":return oe(this,Ee,Pe,ft);case"base64":return ae(this,Ee,Pe,ft);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,Ee,Pe,ft);default:if(Ct)throw new TypeError("Unknown encoding: "+ct);ct=(""+ct).toLowerCase(),Ct=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Q(Ce,Ee,Pe){return Ee===0&&Pe===Ce.length?M.fromByteArray(Ce):M.fromByteArray(Ce.slice(Ee,Pe))}function re(Ce,Ee,Pe){Pe=Math.min(Ce.length,Pe);for(var ft=[],ct=Ee;ct239?4:_t>223?3:_t>191?2:1;if(ct+ir<=Pe){var rr=void 0,er=void 0,Lr=void 0,fa=void 0;switch(ir){case 1:_t<128&&(Ct=_t);break;case 2:rr=Ce[ct+1],(rr&192)===128&&(fa=(_t&31)<<6|rr&63,fa>127&&(Ct=fa));break;case 3:rr=Ce[ct+1],er=Ce[ct+2],(rr&192)===128&&(er&192)===128&&(fa=(_t&15)<<12|(rr&63)<<6|er&63,fa>2047&&(fa<55296||fa>57343)&&(Ct=fa));break;case 4:rr=Ce[ct+1],er=Ce[ct+2],Lr=Ce[ct+3],(rr&192)===128&&(er&192)===128&&(Lr&192)===128&&(fa=(_t&15)<<18|(rr&63)<<12|(er&63)<<6|Lr&63,fa>65535&&fa<1114112&&(Ct=fa))}}Ct===null?(Ct=65533,ir=1):Ct>65535&&(Ct-=65536,ft.push(Ct>>>10&1023|55296),Ct=56320|Ct&1023),ft.push(Ct),ct+=ir}return be(ft)}var ce=4096;function be(Ce){var Ee=Ce.length;if(Ee<=ce)return String.fromCharCode.apply(String,Ce);for(var Pe="",ft=0;ftft)&&(Pe=ft);for(var ct="",_t=Ee;_tft&&(Ee=ft),Pe<0?(Pe+=ft,Pe<0&&(Pe=0)):Pe>ft&&(Pe=ft),PePe)throw new RangeError("Trying to access beyond buffer length")}f.prototype.readUintLE=f.prototype.readUIntLE=function(Ee,Pe,ft){Ee=Ee>>>0,Pe=Pe>>>0,ft||at(Ee,Pe,this.length);for(var ct=this[Ee],_t=1,Ct=0;++Ct>>0,Pe=Pe>>>0,ft||at(Ee,Pe,this.length);for(var ct=this[Ee+--Pe],_t=1;Pe>0&&(_t*=256);)ct+=this[Ee+--Pe]*_t;return ct},f.prototype.readUint8=f.prototype.readUInt8=function(Ee,Pe){return Ee=Ee>>>0,Pe||at(Ee,1,this.length),this[Ee]},f.prototype.readUint16LE=f.prototype.readUInt16LE=function(Ee,Pe){return Ee=Ee>>>0,Pe||at(Ee,2,this.length),this[Ee]|this[Ee+1]<<8},f.prototype.readUint16BE=f.prototype.readUInt16BE=function(Ee,Pe){return Ee=Ee>>>0,Pe||at(Ee,2,this.length),this[Ee]<<8|this[Ee+1]},f.prototype.readUint32LE=f.prototype.readUInt32LE=function(Ee,Pe){return Ee=Ee>>>0,Pe||at(Ee,4,this.length),(this[Ee]|this[Ee+1]<<8|this[Ee+2]<<16)+this[Ee+3]*16777216},f.prototype.readUint32BE=f.prototype.readUInt32BE=function(Ee,Pe){return Ee=Ee>>>0,Pe||at(Ee,4,this.length),this[Ee]*16777216+(this[Ee+1]<<16|this[Ee+2]<<8|this[Ee+3])},f.prototype.readBigUInt64LE=Ie(function(Ee){Ee=Ee>>>0,It(Ee,"offset");var Pe=this[Ee],ft=this[Ee+7];(Pe===void 0||ft===void 0)&&qt(Ee,this.length-8);var ct=Pe+this[++Ee]*Math.pow(2,8)+this[++Ee]*Math.pow(2,16)+this[++Ee]*Math.pow(2,24),_t=this[++Ee]+this[++Ee]*Math.pow(2,8)+this[++Ee]*Math.pow(2,16)+ft*Math.pow(2,24);return BigInt(ct)+(BigInt(_t)<>>0,It(Ee,"offset");var Pe=this[Ee],ft=this[Ee+7];(Pe===void 0||ft===void 0)&&qt(Ee,this.length-8);var ct=Pe*Math.pow(2,24)+this[++Ee]*Math.pow(2,16)+this[++Ee]*Math.pow(2,8)+this[++Ee],_t=this[++Ee]*Math.pow(2,24)+this[++Ee]*Math.pow(2,16)+this[++Ee]*Math.pow(2,8)+ft;return(BigInt(ct)<>>0,Pe=Pe>>>0,ft||at(Ee,Pe,this.length);for(var ct=this[Ee],_t=1,Ct=0;++Ct=_t&&(ct-=Math.pow(2,8*Pe)),ct},f.prototype.readIntBE=function(Ee,Pe,ft){Ee=Ee>>>0,Pe=Pe>>>0,ft||at(Ee,Pe,this.length);for(var ct=Pe,_t=1,Ct=this[Ee+--ct];ct>0&&(_t*=256);)Ct+=this[Ee+--ct]*_t;return _t*=128,Ct>=_t&&(Ct-=Math.pow(2,8*Pe)),Ct},f.prototype.readInt8=function(Ee,Pe){return Ee=Ee>>>0,Pe||at(Ee,1,this.length),this[Ee]&128?(255-this[Ee]+1)*-1:this[Ee]},f.prototype.readInt16LE=function(Ee,Pe){Ee=Ee>>>0,Pe||at(Ee,2,this.length);var ft=this[Ee]|this[Ee+1]<<8;return ft&32768?ft|4294901760:ft},f.prototype.readInt16BE=function(Ee,Pe){Ee=Ee>>>0,Pe||at(Ee,2,this.length);var ft=this[Ee+1]|this[Ee]<<8;return ft&32768?ft|4294901760:ft},f.prototype.readInt32LE=function(Ee,Pe){return Ee=Ee>>>0,Pe||at(Ee,4,this.length),this[Ee]|this[Ee+1]<<8|this[Ee+2]<<16|this[Ee+3]<<24},f.prototype.readInt32BE=function(Ee,Pe){return Ee=Ee>>>0,Pe||at(Ee,4,this.length),this[Ee]<<24|this[Ee+1]<<16|this[Ee+2]<<8|this[Ee+3]},f.prototype.readBigInt64LE=Ie(function(Ee){Ee=Ee>>>0,It(Ee,"offset");var Pe=this[Ee],ft=this[Ee+7];(Pe===void 0||ft===void 0)&&qt(Ee,this.length-8);var ct=this[Ee+4]+this[Ee+5]*Math.pow(2,8)+this[Ee+6]*Math.pow(2,16)+(ft<<24);return(BigInt(ct)<>>0,It(Ee,"offset");var Pe=this[Ee],ft=this[Ee+7];(Pe===void 0||ft===void 0)&&qt(Ee,this.length-8);var ct=(Pe<<24)+this[++Ee]*Math.pow(2,16)+this[++Ee]*Math.pow(2,8)+this[++Ee];return(BigInt(ct)<>>0,Pe||at(Ee,4,this.length),g.read(this,Ee,!0,23,4)},f.prototype.readFloatBE=function(Ee,Pe){return Ee=Ee>>>0,Pe||at(Ee,4,this.length),g.read(this,Ee,!1,23,4)},f.prototype.readDoubleLE=function(Ee,Pe){return Ee=Ee>>>0,Pe||at(Ee,8,this.length),g.read(this,Ee,!0,52,8)},f.prototype.readDoubleBE=function(Ee,Pe){return Ee=Ee>>>0,Pe||at(Ee,8,this.length),g.read(this,Ee,!1,52,8)};function nt(Ce,Ee,Pe,ft,ct,_t){if(!f.isBuffer(Ce))throw new TypeError('"buffer" argument must be a Buffer instance');if(Ee>ct||Ee<_t)throw new RangeError('"value" argument is out of bounds');if(Pe+ft>Ce.length)throw new RangeError("Index out of range")}f.prototype.writeUintLE=f.prototype.writeUIntLE=function(Ee,Pe,ft,ct){if(Ee=+Ee,Pe=Pe>>>0,ft=ft>>>0,!ct){var _t=Math.pow(2,8*ft)-1;nt(this,Ee,Pe,ft,_t,0)}var Ct=1,ir=0;for(this[Pe]=Ee&255;++ir>>0,ft=ft>>>0,!ct){var _t=Math.pow(2,8*ft)-1;nt(this,Ee,Pe,ft,_t,0)}var Ct=ft-1,ir=1;for(this[Pe+Ct]=Ee&255;--Ct>=0&&(ir*=256);)this[Pe+Ct]=Ee/ir&255;return Pe+ft},f.prototype.writeUint8=f.prototype.writeUInt8=function(Ee,Pe,ft){return Ee=+Ee,Pe=Pe>>>0,ft||nt(this,Ee,Pe,1,255,0),this[Pe]=Ee&255,Pe+1},f.prototype.writeUint16LE=f.prototype.writeUInt16LE=function(Ee,Pe,ft){return Ee=+Ee,Pe=Pe>>>0,ft||nt(this,Ee,Pe,2,65535,0),this[Pe]=Ee&255,this[Pe+1]=Ee>>>8,Pe+2},f.prototype.writeUint16BE=f.prototype.writeUInt16BE=function(Ee,Pe,ft){return Ee=+Ee,Pe=Pe>>>0,ft||nt(this,Ee,Pe,2,65535,0),this[Pe]=Ee>>>8,this[Pe+1]=Ee&255,Pe+2},f.prototype.writeUint32LE=f.prototype.writeUInt32LE=function(Ee,Pe,ft){return Ee=+Ee,Pe=Pe>>>0,ft||nt(this,Ee,Pe,4,4294967295,0),this[Pe+3]=Ee>>>24,this[Pe+2]=Ee>>>16,this[Pe+1]=Ee>>>8,this[Pe]=Ee&255,Pe+4},f.prototype.writeUint32BE=f.prototype.writeUInt32BE=function(Ee,Pe,ft){return Ee=+Ee,Pe=Pe>>>0,ft||nt(this,Ee,Pe,4,4294967295,0),this[Pe]=Ee>>>24,this[Pe+1]=Ee>>>16,this[Pe+2]=Ee>>>8,this[Pe+3]=Ee&255,Pe+4};function rt(Ce,Ee,Pe,ft,ct){Pt(Ee,ft,ct,Ce,Pe,7);var _t=Number(Ee&BigInt(4294967295));Ce[Pe++]=_t,_t=_t>>8,Ce[Pe++]=_t,_t=_t>>8,Ce[Pe++]=_t,_t=_t>>8,Ce[Pe++]=_t;var Ct=Number(Ee>>BigInt(32)&BigInt(4294967295));return Ce[Pe++]=Ct,Ct=Ct>>8,Ce[Pe++]=Ct,Ct=Ct>>8,Ce[Pe++]=Ct,Ct=Ct>>8,Ce[Pe++]=Ct,Pe}function st(Ce,Ee,Pe,ft,ct){Pt(Ee,ft,ct,Ce,Pe,7);var _t=Number(Ee&BigInt(4294967295));Ce[Pe+7]=_t,_t=_t>>8,Ce[Pe+6]=_t,_t=_t>>8,Ce[Pe+5]=_t,_t=_t>>8,Ce[Pe+4]=_t;var Ct=Number(Ee>>BigInt(32)&BigInt(4294967295));return Ce[Pe+3]=Ct,Ct=Ct>>8,Ce[Pe+2]=Ct,Ct=Ct>>8,Ce[Pe+1]=Ct,Ct=Ct>>8,Ce[Pe]=Ct,Pe+8}f.prototype.writeBigUInt64LE=Ie(function(Ee){var Pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return rt(this,Ee,Pe,BigInt(0),BigInt("0xffffffffffffffff"))}),f.prototype.writeBigUInt64BE=Ie(function(Ee){var Pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return st(this,Ee,Pe,BigInt(0),BigInt("0xffffffffffffffff"))}),f.prototype.writeIntLE=function(Ee,Pe,ft,ct){if(Ee=+Ee,Pe=Pe>>>0,!ct){var _t=Math.pow(2,8*ft-1);nt(this,Ee,Pe,ft,_t-1,-_t)}var Ct=0,ir=1,rr=0;for(this[Pe]=Ee&255;++Ct>0)-rr&255;return Pe+ft},f.prototype.writeIntBE=function(Ee,Pe,ft,ct){if(Ee=+Ee,Pe=Pe>>>0,!ct){var _t=Math.pow(2,8*ft-1);nt(this,Ee,Pe,ft,_t-1,-_t)}var Ct=ft-1,ir=1,rr=0;for(this[Pe+Ct]=Ee&255;--Ct>=0&&(ir*=256);)Ee<0&&rr===0&&this[Pe+Ct+1]!==0&&(rr=1),this[Pe+Ct]=(Ee/ir>>0)-rr&255;return Pe+ft},f.prototype.writeInt8=function(Ee,Pe,ft){return Ee=+Ee,Pe=Pe>>>0,ft||nt(this,Ee,Pe,1,127,-128),Ee<0&&(Ee=255+Ee+1),this[Pe]=Ee&255,Pe+1},f.prototype.writeInt16LE=function(Ee,Pe,ft){return Ee=+Ee,Pe=Pe>>>0,ft||nt(this,Ee,Pe,2,32767,-32768),this[Pe]=Ee&255,this[Pe+1]=Ee>>>8,Pe+2},f.prototype.writeInt16BE=function(Ee,Pe,ft){return Ee=+Ee,Pe=Pe>>>0,ft||nt(this,Ee,Pe,2,32767,-32768),this[Pe]=Ee>>>8,this[Pe+1]=Ee&255,Pe+2},f.prototype.writeInt32LE=function(Ee,Pe,ft){return Ee=+Ee,Pe=Pe>>>0,ft||nt(this,Ee,Pe,4,2147483647,-2147483648),this[Pe]=Ee&255,this[Pe+1]=Ee>>>8,this[Pe+2]=Ee>>>16,this[Pe+3]=Ee>>>24,Pe+4},f.prototype.writeInt32BE=function(Ee,Pe,ft){return Ee=+Ee,Pe=Pe>>>0,ft||nt(this,Ee,Pe,4,2147483647,-2147483648),Ee<0&&(Ee=4294967295+Ee+1),this[Pe]=Ee>>>24,this[Pe+1]=Ee>>>16,this[Pe+2]=Ee>>>8,this[Pe+3]=Ee&255,Pe+4},f.prototype.writeBigInt64LE=Ie(function(Ee){var Pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return rt(this,Ee,Pe,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),f.prototype.writeBigInt64BE=Ie(function(Ee){var Pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return st(this,Ee,Pe,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Me(Ce,Ee,Pe,ft,ct,_t){if(Pe+ft>Ce.length)throw new RangeError("Index out of range");if(Pe<0)throw new RangeError("Index out of range")}function ye(Ce,Ee,Pe,ft,ct){return Ee=+Ee,Pe=Pe>>>0,ct||Me(Ce,Ee,Pe,4,34028234663852886e22,-34028234663852886e22),g.write(Ce,Ee,Pe,ft,23,4),Pe+4}f.prototype.writeFloatLE=function(Ee,Pe,ft){return ye(this,Ee,Pe,!0,ft)},f.prototype.writeFloatBE=function(Ee,Pe,ft){return ye(this,Ee,Pe,!1,ft)};function he(Ce,Ee,Pe,ft,ct){return Ee=+Ee,Pe=Pe>>>0,ct||Me(Ce,Ee,Pe,8,17976931348623157e292,-17976931348623157e292),g.write(Ce,Ee,Pe,ft,52,8),Pe+8}f.prototype.writeDoubleLE=function(Ee,Pe,ft){return he(this,Ee,Pe,!0,ft)},f.prototype.writeDoubleBE=function(Ee,Pe,ft){return he(this,Ee,Pe,!1,ft)},f.prototype.copy=function(Ee,Pe,ft,ct){if(!f.isBuffer(Ee))throw new TypeError("argument should be a Buffer");if(ft||(ft=0),!ct&&ct!==0&&(ct=this.length),Pe>=Ee.length&&(Pe=Ee.length),Pe||(Pe=0),ct>0&&ct=this.length)throw new RangeError("Index out of range");if(ct<0)throw new RangeError("sourceEnd out of bounds");ct>this.length&&(ct=this.length),Ee.length-Pe>>0,ft=ft===void 0?this.length:ft>>>0,Ee||(Ee=0);var Ct;if(typeof Ee=="number")for(Ct=Pe;CtMath.pow(2,32)?ct=ot(String(Pe)):typeof Pe=="bigint"&&(ct=String(Pe),(Pe>Math.pow(BigInt(2),BigInt(32))||Pe<-Math.pow(BigInt(2),BigInt(32)))&&(ct=ot(ct)),ct+="n"),ft+=" It must be ".concat(Ee,". Received ").concat(ct),ft},RangeError);function ot(Ce){for(var Ee="",Pe=Ce.length,ft=Ce[0]==="-"?1:0;Pe>=ft+4;Pe-=3)Ee="_".concat(Ce.slice(Pe-3,Pe)).concat(Ee);return"".concat(Ce.slice(0,Pe)).concat(Ee)}function Qe(Ce,Ee,Pe){It(Ee,"offset"),(Ce[Ee]===void 0||Ce[Ee+Pe]===void 0)&&qt(Ee,Ce.length-(Pe+1))}function Pt(Ce,Ee,Pe,ft,ct,_t){if(Ce>Pe||Ce3?Ee===0||Ee===BigInt(0)?ir=">= 0".concat(Ct," and < 2").concat(Ct," ** ").concat((_t+1)*8).concat(Ct):ir=">= -(2".concat(Ct," ** ").concat((_t+1)*8-1).concat(Ct,") and < 2 ** ")+"".concat((_t+1)*8-1).concat(Ct):ir=">= ".concat(Ee).concat(Ct," and <= ").concat(Pe).concat(Ct),new Oe.ERR_OUT_OF_RANGE("value",ir,Ce)}Qe(ft,ct,_t)}function It(Ce,Ee){if(typeof Ce!="number")throw new Oe.ERR_INVALID_ARG_TYPE(Ee,"number",Ce)}function qt(Ce,Ee,Pe){throw Math.floor(Ce)!==Ce?(It(Ce,Pe),new Oe.ERR_OUT_OF_RANGE(Pe||"offset","an integer",Ce)):Ee<0?new Oe.ERR_BUFFER_OUT_OF_BOUNDS:new Oe.ERR_OUT_OF_RANGE(Pe||"offset",">= ".concat(Pe?1:0," and <= ").concat(Ee),Ce)}var Wt=/[^+/0-9A-Za-z-_]/g;function kr(Ce){if(Ce=Ce.split("=")[0],Ce=Ce.trim().replace(Wt,""),Ce.length<2)return"";for(;Ce.length%4!==0;)Ce=Ce+"=";return Ce}function mr(Ce,Ee){Ee=Ee||1/0;for(var Pe,ft=Ce.length,ct=null,_t=[],Ct=0;Ct55295&&Pe<57344){if(!ct){if(Pe>56319){(Ee-=3)>-1&&_t.push(239,191,189);continue}else if(Ct+1===ft){(Ee-=3)>-1&&_t.push(239,191,189);continue}ct=Pe;continue}if(Pe<56320){(Ee-=3)>-1&&_t.push(239,191,189),ct=Pe;continue}Pe=(ct-55296<<10|Pe-56320)+65536}else ct&&(Ee-=3)>-1&&_t.push(239,191,189);if(ct=null,Pe<128){if((Ee-=1)<0)break;_t.push(Pe)}else if(Pe<2048){if((Ee-=2)<0)break;_t.push(Pe>>6|192,Pe&63|128)}else if(Pe<65536){if((Ee-=3)<0)break;_t.push(Pe>>12|224,Pe>>6&63|128,Pe&63|128)}else if(Pe<1114112){if((Ee-=4)<0)break;_t.push(Pe>>18|240,Pe>>12&63|128,Pe>>6&63|128,Pe&63|128)}else throw new Error("Invalid code point")}return _t}function qr(Ce){for(var Ee=[],Pe=0;Pe>8,ct=Pe%256,_t.push(ct),_t.push(ft);return _t}function Rr(Ce){return M.toByteArray(kr(Ce))}function wt(Ce,Ee,Pe,ft){var ct;for(ct=0;ct=Ee.length||ct>=Ce.length);++ct)Ee[ct+Pe]=Ce[ct];return ct}function Ne(Ce,Ee){return Ce instanceof Ee||Ce!=null&&Ce.constructor!=null&&Ce.constructor.name!=null&&Ce.constructor.name===Ee.name}function Ke(Ce){return Ce!==Ce}var Te=function(){for(var Ce="0123456789abcdef",Ee=new Array(256),Pe=0;Pe<16;++Pe)for(var ft=Pe*16,ct=0;ct<16;++ct)Ee[ft+ct]=Ce[Pe]+Ce[ct];return Ee}();function Ie(Ce){return typeof BigInt>"u"?Ve:Ce}function Ve(){throw new Error("BigInt not supported")}},4844:function(e){e.exports=t;function t(r,o,a,n){return r[0]=o[0]+a[0]*n,r[1]=o[1]+a[1]*n,r[2]=o[2]+a[2]*n,r[3]=o[3]+a[3]*n,r}},4905:function(e,t,r){var o=r(5874);e.exports=a;function a(n,i){var s=o(i),h=[];return h=h.concat(s(n)),h=h.concat(s(null)),h}},4935:function(e,t,r){"use strict";e.exports=_;var o=r(2762),a=r(8116),n=r(4359),i=r(1879).Q,s=window||process.global||{},h=s.__TEXT_CACHE||{};s.__TEXT_CACHE={};var c=3;function m(w,A,M,g){this.gl=w,this.shader=A,this.buffer=M,this.vao=g,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}var p=m.prototype,T=[0,0];p.bind=function(w,A,M,g){this.vao.bind(),this.shader.bind();var b=this.shader.uniforms;b.model=w,b.view=A,b.projection=M,b.pixelScale=g,T[0]=this.gl.drawingBufferWidth,T[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=T},p.unbind=function(){this.vao.unbind()},p.update=function(w,A,M,g,b){var d=[];function u(U,B,X,$,se,le){var fe=[X.style,X.weight,X.variant,X.family].join("_"),V=h[fe];V||(V=h[fe]={});var Y=V[B];Y||(Y=V[B]=l(B,{triangles:!0,font:X.family,fontStyle:X.style,fontWeight:X.weight,fontVariant:X.variant,textAlign:"center",textBaseline:"middle",lineSpacing:se,styletags:le}));for(var ee=($||12)/12,q=Y.positions,oe=Y.cells,ae=0,j=oe.length;ae=0;--re){var ce=q[Q[re]];d.push(ee*ce[0],-ee*ce[1],U)}}for(var y=[0,0,0],f=[0,0,0],R=[0,0,0],L=[0,0,0],z=1.25,F={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},N=0;N<3;++N){R[N]=d.length/c|0,u(.5*(w[0][N]+w[1][N]),A[N],M[N],12,z,F),L[N]=(d.length/c|0)-R[N],y[N]=d.length/c|0;for(var O=0;O0||A.length>0;){for(;w.length>0;){var u=w.pop();if(M[u]!==-_){M[u]=_;for(var y=g[u],f=0;f<3;++f){var R=d[3*u+f];R>=0&&M[R]===0&&(b[3*u+f]?A.push(R):(w.push(R),M[R]=_))}}}var L=A;A=w,w=L,A.length=0,_=-_}var z=h(g,M,p);return T?z.concat(l.boundary):z}},5033:function(e){"use strict";e.exports=t;function t(r,o,a){var n=o||0,i=a||1;return[[r[12]+r[0],r[13]+r[1],r[14]+r[2],r[15]+r[3]],[r[12]-r[0],r[13]-r[1],r[14]-r[2],r[15]-r[3]],[r[12]+r[4],r[13]+r[5],r[14]+r[6],r[15]+r[7]],[r[12]-r[4],r[13]-r[5],r[14]-r[6],r[15]-r[7]],[n*r[12]+r[8],n*r[13]+r[9],n*r[14]+r[10],n*r[15]+r[11]],[i*r[12]-r[8],i*r[13]-r[9],i*r[14]-r[10],i*r[15]-r[11]]]}},5085:function(e,t,r){e.exports=_;var o=r(3250)[3],a=r(4209),n=r(3352),i=r(2478);function s(){return!0}function h(w){return function(A,M){var g=w[A];return g?!!g.queryPoint(M,s):!1}}function c(w){for(var A={},M=0;M0&&A[g]===M[0])b=w[g-1];else return 1;for(var d=1;b;){var u=b.key,y=o(M,u[0],u[1]);if(u[0][0]0)d=-1,b=b.right;else return 0;else if(y>0)b=b.left;else if(y<0)d=1,b=b.right;else return 0}return d}}function p(w){return 1}function T(w){return function(M){return w(M[0],M[1])?0:1}}function l(w,A){return function(g){return w(g[0],g[1])?0:A(g)}}function _(w){for(var A=w.length,M=[],g=[],b=0,d=0;d"u"?r(606):WeakMap,i=new n,s=0;function h(A,M,g,b,d,u,y){this.id=A,this.src=M,this.type=g,this.shader=b,this.count=u,this.programs=[],this.cache=y}h.prototype.dispose=function(){if(--this.count===0){for(var A=this.cache,M=A.gl,g=this.programs,b=0,d=g.length;b0&&(h=1/Math.sqrt(h),r[0]=a*h,r[1]=n*h,r[2]=i*h,r[3]=s*h),r}},5202:function(e,t,r){"use strict";var o=r(1944),a=r(8210);e.exports=s,e.exports.positive=h,e.exports.negative=c;function n(m,p){var T=a(o(m,p),[p[p.length-1]]);return T[T.length-1]}function i(m,p,T,l){var _=l-p,w=-p/_;w<0?w=0:w>1&&(w=1);for(var A=1-w,M=m.length,g=new Array(M),b=0;b0||_>0&&g<0){var b=i(w,g,A,_);T.push(b),l.push(b.slice())}g<0?l.push(A.slice()):g>0?T.push(A.slice()):(T.push(A.slice()),l.push(A.slice())),_=g}return{positive:T,negative:l}}function h(m,p){for(var T=[],l=n(m[m.length-1],p),_=m[m.length-1],w=m[0],A=0;A0||l>0&&M<0)&&T.push(i(_,M,w,l)),M>=0&&T.push(w.slice()),l=M}return T}function c(m,p){for(var T=[],l=n(m[m.length-1],p),_=m[m.length-1],w=m[0],A=0;A0||l>0&&M<0)&&T.push(i(_,M,w,l)),M<=0&&T.push(w.slice()),l=M}return T}},5219:function(e){"use strict";e.exports=function(t){for(var r=t.length,o,a=0;a13)&&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}},5250:function(e){"use strict";e.exports=r;var t=+(Math.pow(2,27)+1);function r(o,a,n){var i=o*a,s=t*o,h=s-o,c=s-h,m=o-c,p=t*a,T=p-a,l=p-T,_=a-l,w=i-c*l,A=w-m*l,M=A-c*_,g=m*_-M;return n?(n[0]=g,n[1]=i,n):[g,i]}},5298:function(e,t){"use strict";var r={"float64,2,1,0":function(){return function(m,p,T,l,_){var w=m[0],A=m[1],M=m[2],g=T[0],b=T[1],d=T[2];l|=0;var u=0,y=0,f=0,R=d,L=b-M*d,z=g-A*b;for(f=0;f0;){O<64?(g=O,O=0):(g=64,O-=64);for(var P=m[1]|0;P>0;){P<64?(b=P,P=0):(b=64,P-=64),l=F+O*u+P*y,A=N+O*R+P*L;var U=0,B=0,X=0,$=f,se=u-d*f,le=y-g*u,fe=z,V=R-d*z,Y=L-g*R;for(X=0;X0;){L<64?(g=L,L=0):(g=64,L-=64);for(var z=m[0]|0;z>0;){z<64?(M=z,z=0):(M=64,z-=64),l=f+L*d+z*b,A=R+L*y+z*u;var F=0,N=0,O=d,P=b-g*d,U=y,B=u-g*y;for(N=0;N0;){N<64?(b=N,N=0):(b=64,N-=64);for(var O=m[0]|0;O>0;){O<64?(M=O,O=0):(M=64,O-=64);for(var P=m[1]|0;P>0;){P<64?(g=P,P=0):(g=64,P-=64),l=z+N*y+O*d+P*u,A=F+N*L+O*f+P*R;var U=0,B=0,X=0,$=y,se=d-b*y,le=u-M*d,fe=L,V=f-b*L,Y=R-M*f;for(X=0;X=0}}(),n.removeTriangle=function(h,c,m){var p=this.stars;i(p[h],c,m),i(p[c],m,h),i(p[m],h,c)},n.addTriangle=function(h,c,m){var p=this.stars;p[h].push(c,m),p[c].push(m,h),p[m].push(h,c)},n.opposite=function(h,c){for(var m=this.stars[c],p=1,T=m.length;p0;){var l=m.pop();h[l]=!1;for(var _=s[l],p=0;p<_.length;++p){var w=_[p];--c[w]===0&&m.push(w)}}for(var A=new Array(i.length),M=[],p=0;p0){for(var fe=0;fe<24;++fe)L.push(L[L.length-12]);O+=2,$=!0}continue e}P[0][f]=Math.min(P[0][f],se[f],le[f]),P[1][f]=Math.max(P[1][f],se[f],le[f])}var V,Y;Array.isArray(B[0])?(V=B.length>y-1?B[y-1]:B.length>0?B[B.length-1]:[0,0,0,1],Y=B.length>y?B[y]:B.length>0?B[B.length-1]:[0,0,0,1]):V=Y=B,V.length===3&&(V=[V[0],V[1],V[2],1]),Y.length===3&&(Y=[Y[0],Y[1],Y[2],1]),!this.hasAlpha&&V[3]<1&&(this.hasAlpha=!0);var ee;Array.isArray(X)?ee=X.length>y-1?X[y-1]:X.length>0?X[X.length-1]:[0,0,0,1]:ee=X;var q=N;if(N+=w(se,le),$){for(f=0;f<2;++f)L.push(se[0],se[1],se[2],le[0],le[1],le[2],q,ee,V[0],V[1],V[2],V[3]);O+=2,$=!1}L.push(se[0],se[1],se[2],le[0],le[1],le[2],q,ee,V[0],V[1],V[2],V[3],se[0],se[1],se[2],le[0],le[1],le[2],q,-ee,V[0],V[1],V[2],V[3],le[0],le[1],le[2],se[0],se[1],se[2],N,-ee,Y[0],Y[1],Y[2],Y[3],le[0],le[1],le[2],se[0],se[1],se[2],N,ee,Y[0],Y[1],Y[2],Y[3]),O+=4}}if(this.buffer.update(L),z.push(N),F.push(U[U.length-1].slice()),this.bounds=P,this.vertexCount=O,this.points=F,this.arcLength=z,"dashes"in u){var oe=u.dashes,ae=oe.slice();for(ae.unshift(0),y=1;yr[a][0]&&(a=n);return oa?[[a],[o]]:[[o]]}},5771:function(e,t,r){"use strict";var o=r(8507),a=r(3788),n=r(2419);e.exports=i;function i(s){s.sort(a);for(var h=s.length,c=0,m=0;m0){var l=s[c-1];if(o(p,l)===0&&n(l)!==T){c-=1;continue}}s[c++]=p}}return s.length=c,s}},5838:function(e,t,r){"use strict";e.exports=a;var o=r(7842);function a(n){for(var i=new Array(n.length),s=0;s0)continue;ot=he.slice(0,1).join("")}return Q(ot),le+=ot.length,P=P.slice(ot.length),P.length}while(!0)}function rt(){return/[^a-fA-F0-9]/.test(N)?(Q(P.join("")),F=h,L):(P.push(N),O=N,L+1)}function st(){return N==="."||/[eE]/.test(N)?(P.push(N),F=w,O=N,L+1):N==="x"&&P.length===1&&P[0]==="0"?(F=u,P.push(N),O=N,L+1):/[^\d]/.test(N)?(Q(P.join("")),F=h,L):(P.push(N),O=N,L+1)}function Me(){return N==="f"&&(P.push(N),O=N,L+=1),/[eE]/.test(N)||(N==="-"||N==="+")&&/[eE]/.test(O)?(P.push(N),O=N,L+1):/[^\d]/.test(N)?(Q(P.join("")),F=h,L):(P.push(N),O=N,L+1)}function ye(){if(/[^\d\w_]/.test(N)){var he=P.join("");return j[he]?F=g:ae[he]?F=M:F=A,Q(P.join("")),F=h,L}return P.push(N),O=N,L+1}}},5878:function(e,t,r){"use strict";e.exports=i;var o=r(3250),a=r(2014);function n(s,h,c){var m=Math.abs(o(s,h,c)),p=Math.sqrt(Math.pow(h[0]-c[0],2)+Math.pow(h[1]-c[1],2));return m/p}function i(s,h,c){for(var m=h.length,p=s.length,T=new Array(m),l=new Array(m),_=new Array(m),w=new Array(m),A=0;A>1:(V>>1)-1}function R(V){for(var Y=y(V);;){var ee=Y,q=2*V+1,oe=2*(V+1),ae=V;if(q0;){var ee=f(V);if(ee>=0){var q=y(ee);if(Y0){var V=O[0];return u(0,B-1),B-=1,R(0),V}return-1}function F(V,Y){var ee=O[V];return _[ee]===Y?V:(_[ee]=-1/0,L(V),z(),_[ee]=Y,B+=1,L(B-1))}function N(V){if(!w[V]){w[V]=!0;var Y=T[V],ee=l[V];T[ee]>=0&&(T[ee]=Y),l[Y]>=0&&(l[Y]=ee),P[Y]>=0&&F(P[Y],d(Y)),P[ee]>=0&&F(P[ee],d(ee))}}for(var O=[],P=new Array(m),A=0;A>1;A>=0;--A)R(A);for(;;){var X=z();if(X<0||_[X]>c)break;N(X)}for(var $=[],A=0;A=0&&ee>=0&&Y!==ee){var q=P[Y],oe=P[ee];q!==oe&&fe.push([q,oe])}}),a.unique(a.normalize(fe)),{positions:$,edges:fe}}},5911:function(e){e.exports=t;function t(r,o,a){var n=o[0],i=o[1],s=o[2],h=a[0],c=a[1],m=a[2];return r[0]=i*m-s*c,r[1]=s*h-n*m,r[2]=n*c-i*h,r}},5964:function(e){"use strict";e.exports=function(t){return!t&&t!==0?"":t.toString()}},5995:function(e,t,r){"use strict";e.exports=n;var o=r(7642),a=r(6037);function n(i,s){return o(s).filter(function(h){for(var c=new Array(h.length),m=0;m2&&f[1]>2&&d(y.pick(-1,-1).lo(1,1).hi(f[0]-2,f[1]-2),u.pick(-1,-1,0).lo(1,1).hi(f[0]-2,f[1]-2),u.pick(-1,-1,1).lo(1,1).hi(f[0]-2,f[1]-2)),f[1]>2&&(b(y.pick(0,-1).lo(1).hi(f[1]-2),u.pick(0,-1,1).lo(1).hi(f[1]-2)),g(u.pick(0,-1,0).lo(1).hi(f[1]-2))),f[1]>2&&(b(y.pick(f[0]-1,-1).lo(1).hi(f[1]-2),u.pick(f[0]-1,-1,1).lo(1).hi(f[1]-2)),g(u.pick(f[0]-1,-1,0).lo(1).hi(f[1]-2))),f[0]>2&&(b(y.pick(-1,0).lo(1).hi(f[0]-2),u.pick(-1,0,0).lo(1).hi(f[0]-2)),g(u.pick(-1,0,1).lo(1).hi(f[0]-2))),f[0]>2&&(b(y.pick(-1,f[1]-1).lo(1).hi(f[0]-2),u.pick(-1,f[1]-1,0).lo(1).hi(f[0]-2)),g(u.pick(-1,f[1]-1,1).lo(1).hi(f[0]-2))),u.set(0,0,0,0),u.set(0,0,1,0),u.set(f[0]-1,0,0,0),u.set(f[0]-1,0,1,0),u.set(0,f[1]-1,0,0),u.set(0,f[1]-1,1,0),u.set(f[0]-1,f[1]-1,0,0),u.set(f[0]-1,f[1]-1,1,0),u}}function A(M){var g=M.join(),f=m[g];if(f)return f;for(var b=M.length,d=[T,l],u=1;u<=b;++u)d.push(_(u));var y=w,f=y.apply(void 0,d);return m[g]=f,f}e.exports=function(g,b,d){if(Array.isArray(d)||(typeof d=="string"?d=o(b.dimension,d):d=o(b.dimension,"clamp")),b.size===0)return g;if(b.dimension===0)return g.set(0),g;var u=A(d);return u(g,b)}},6204:function(e){"use strict";e.exports=t;function t(r){var o,a,n,i=r.length,s=0;for(o=0;om&&(m=o.length(L)),f&&!y){var z=2*o.distance(M,R)/(o.length(g)+o.length(L));z?(d=Math.min(d,z),u=!1):u=!0}u||(M=R,g=L),b.push(L)}var F=[p,l,w],N=[T,_,A];i&&(i[0]=F,i[1]=N),m===0&&(m=1);var O=1/m;isFinite(d)||(d=1),c.vectorScale=d;var P=n.coneSize||(y?1:.5);n.absoluteConeSize&&(P=n.absoluteConeSize*O),c.coneScale=P;for(var f=0,U=0;f$&&(N|=1<$){N|=1<c[L][1])&&(oe=L);for(var ae=-1,L=0;L<3;++L){var j=oe^1<c[Q][0]&&(Q=j)}}var re=w;re[0]=re[1]=re[2]=0,re[o.log2(ae^oe)]=oe&ae,re[o.log2(oe^Q)]=oe&Q;var ce=Q^7;ce===N||ce===q?(ce=ae^7,re[o.log2(Q^ce)]=ce&Q):re[o.log2(ae^ce)]=ce&ae;for(var be=A,Ae=N,U=0;U<3;++U)Ae&1<=0&&(c=s.length-h-1);var m=Math.pow(10,c),p=Math.round(n*i*m),T=p+"";if(T.indexOf("e")>=0)return T;var l=p/m,_=p%m;p<0?(l=-Math.ceil(l)|0,_=-_|0):(l=Math.floor(l)|0,_=_|0);var w=""+l;if(p<0&&(w="-"+w),c){for(var A=""+_;A.length=n[0][h];--p)c.push({x:p*i[h],text:r(i[h],p)});s.push(c)}return s}function a(n,i){for(var s=0;s<3;++s){if(n[s].length!==i[s].length)return!1;for(var h=0;hM+1)throw new Error(w+" map requires nshades to be at least size "+_.length);Array.isArray(c.alpha)?c.alpha.length!==2?g=[1,1]:g=c.alpha.slice():typeof c.alpha=="number"?g=[c.alpha,c.alpha]:g=[1,1],m=_.map(function(R){return Math.round(R.index*M)}),g[0]=Math.min(Math.max(g[0],0),1),g[1]=Math.min(Math.max(g[1],0),1);var d=_.map(function(R,L){var z=_[L].index,F=_[L].rgb.slice();return F.length===4&&F[3]>=0&&F[3]<=1||(F[3]=g[0]+(g[1]-g[0])*z),F}),u=[];for(b=0;b 0 U ||b|| > 0. // Assign z = 0, x = -b, y = a: // a*-b + b*a + c*0 = -ba + ba + 0 = 0 if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) { return normalize(vec3(-v.y, v.x, 0.0)); } else { return normalize(vec3(0.0, v.z, -v.y)); } } // Calculate the tube vertex and normal at the given index. // // The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d. // // Each tube segment is made up of a ring of vertices. // These vertices are used to make up the triangles of the tube by connecting them together in the vertex array. // The indexes of tube segments run from 0 to 8. // vec3 getTubePosition(vec3 d, float index, out vec3 normal) { float segmentCount = 8.0; float angle = 2.0 * 3.14159 * (index / segmentCount); vec3 u = getOrthogonalVector(d); vec3 v = normalize(cross(u, d)); vec3 x = u * cos(angle) * length(d); vec3 y = v * sin(angle) * length(d); vec3 v3 = x + y; normal = normalize(v3); return v3; } attribute vec4 vector; attribute vec4 color, position; attribute vec2 uv; uniform float vectorScale, tubeScale; uniform mat4 model, view, projection, inverseModel; uniform vec3 eyePosition, lightPosition; varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position; varying vec4 f_color; varying vec2 f_uv; void main() { // Scale the vector magnitude to stay constant with // model & view changes. vec3 normal; vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal); vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0); //Lighting geometry parameters vec4 cameraCoordinate = view * tubePosition; cameraCoordinate.xyz /= cameraCoordinate.w; f_lightDirection = lightPosition - cameraCoordinate.xyz; f_eyeDirection = eyePosition - cameraCoordinate.xyz; f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz); // vec4 m_position = model * vec4(tubePosition, 1.0); vec4 t_position = view * tubePosition; gl_Position = projection * t_position; f_color = color; f_data = tubePosition.xyz; f_position = position.xyz; f_uv = uv; } `]),n=o([`#extension GL_OES_standard_derivatives : enable precision highp float; #define GLSLIFY 1 float beckmannDistribution(float x, float roughness) { float NdotH = max(x, 0.0001); float cos2Alpha = NdotH * NdotH; float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha; float roughness2 = roughness * roughness; float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha; return exp(tan2Alpha / roughness2) / denom; } float cookTorranceSpecular( vec3 lightDirection, vec3 viewDirection, vec3 surfaceNormal, float roughness, float fresnel) { float VdotN = max(dot(viewDirection, surfaceNormal), 0.0); float LdotN = max(dot(lightDirection, surfaceNormal), 0.0); //Half angle vector vec3 H = normalize(lightDirection + viewDirection); //Geometric term float NdotH = max(dot(surfaceNormal, H), 0.0); float VdotH = max(dot(viewDirection, H), 0.000001); float LdotH = max(dot(lightDirection, H), 0.000001); float G1 = (2.0 * NdotH * VdotN) / VdotH; float G2 = (2.0 * NdotH * LdotN) / LdotH; float G = min(1.0, min(G1, G2)); //Distribution term float D = beckmannDistribution(NdotH, roughness); //Fresnel term float F = pow(1.0 - VdotN, fresnel); //Multiply terms and done return G * F * D / max(3.14159265 * VdotN, 0.000001); } bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 clipBounds[2]; uniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity; uniform sampler2D texture; varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position; varying vec4 f_color; varying vec2 f_uv; void main() { if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; vec3 N = normalize(f_normal); vec3 L = normalize(f_lightDirection); vec3 V = normalize(f_eyeDirection); if(gl_FrontFacing) { N = -N; } float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel))); float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0); vec4 surfaceColor = f_color * texture2D(texture, f_uv); vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0); gl_FragColor = litColor * opacity; } `]),i=o([`precision highp float; precision highp float; #define GLSLIFY 1 vec3 getOrthogonalVector(vec3 v) { // Return up-vector for only-z vector. // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0). // From the above if-statement we have ||a|| > 0 U ||b|| > 0. // Assign z = 0, x = -b, y = a: // a*-b + b*a + c*0 = -ba + ba + 0 = 0 if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) { return normalize(vec3(-v.y, v.x, 0.0)); } else { return normalize(vec3(0.0, v.z, -v.y)); } } // Calculate the tube vertex and normal at the given index. // // The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d. // // Each tube segment is made up of a ring of vertices. // These vertices are used to make up the triangles of the tube by connecting them together in the vertex array. // The indexes of tube segments run from 0 to 8. // vec3 getTubePosition(vec3 d, float index, out vec3 normal) { float segmentCount = 8.0; float angle = 2.0 * 3.14159 * (index / segmentCount); vec3 u = getOrthogonalVector(d); vec3 v = normalize(cross(u, d)); vec3 x = u * cos(angle) * length(d); vec3 y = v * sin(angle) * length(d); vec3 v3 = x + y; normal = normalize(v3); return v3; } attribute vec4 vector; attribute vec4 position; attribute vec4 id; uniform mat4 model, view, projection; uniform float tubeScale; varying vec3 f_position; varying vec4 f_id; void main() { vec3 normal; vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal); vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0); gl_Position = projection * (view * tubePosition); f_id = id; f_position = position.xyz; } `]),s=o([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 clipBounds[2]; uniform float pickId; varying vec3 f_position; varying vec4 f_id; void main() { if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; gl_FragColor = vec4(pickId, f_id.xyz); }`]);t.meshShader={vertex:a,fragment:n,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec4"}]},t.pickShader={vertex:i,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec4"}]}},6743:function(e){e.exports=t;function t(r,o,a){var n=o[0],i=o[1],s=o[2],h=o[3],c=n+n,m=i+i,p=s+s,T=n*c,l=n*m,_=n*p,w=i*m,A=i*p,M=s*p,g=h*c,b=h*m,d=h*p;return r[0]=1-(w+M),r[1]=l+d,r[2]=_-b,r[3]=0,r[4]=l-d,r[5]=1-(T+M),r[6]=A+g,r[7]=0,r[8]=_+b,r[9]=A-g,r[10]=1-(T+w),r[11]=0,r[12]=a[0],r[13]=a[1],r[14]=a[2],r[15]=1,r}},6760:function(e){e.exports=t;function t(r,o,a){var n=o[0],i=o[1],s=o[2],h=o[3],c=o[4],m=o[5],p=o[6],T=o[7],l=o[8],_=o[9],w=o[10],A=o[11],M=o[12],g=o[13],b=o[14],d=o[15],u=a[0],y=a[1],f=a[2],R=a[3];return r[0]=u*n+y*c+f*l+R*M,r[1]=u*i+y*m+f*_+R*g,r[2]=u*s+y*p+f*w+R*b,r[3]=u*h+y*T+f*A+R*d,u=a[4],y=a[5],f=a[6],R=a[7],r[4]=u*n+y*c+f*l+R*M,r[5]=u*i+y*m+f*_+R*g,r[6]=u*s+y*p+f*w+R*b,r[7]=u*h+y*T+f*A+R*d,u=a[8],y=a[9],f=a[10],R=a[11],r[8]=u*n+y*c+f*l+R*M,r[9]=u*i+y*m+f*_+R*g,r[10]=u*s+y*p+f*w+R*b,r[11]=u*h+y*T+f*A+R*d,u=a[12],y=a[13],f=a[14],R=a[15],r[12]=u*n+y*c+f*l+R*M,r[13]=u*i+y*m+f*_+R*g,r[14]=u*s+y*p+f*w+R*b,r[15]=u*h+y*T+f*A+R*d,r}},6768:function(e,t,r){"use strict";var o=r(6859);e.exports=a;function a(n){return new o(n)}},6803:function(e,t,r){"use strict";var o,a=r(8828),n=r(1755);function i(y){for(var f=0,R=Math.max,L=0,z=y.length;L>1,N=c(y[F],f);N<=0?(N===0&&(z=F),R=F+1):N>0&&(L=F-1)}return z}o=l;function _(y,f){for(var R=new Array(y.length),L=0,z=R.length;L=y.length||c(y[se],F)!==0););}return R}o=_;function w(y,f){if(!f)return _(T(M(y,0)),y,0);for(var R=new Array(f),L=0;L>>U&1&&P.push(z[U]);f.push(P)}return p(f)}o=A;function M(y,f){if(f<0)return[];for(var R=[],L=(1<0?P:U},s.min=function(P,U){return P.cmp(U)<0?P:U},s.prototype._init=function(P,U,B){if(typeof P=="number")return this._initNumber(P,U,B);if(typeof P=="object")return this._initArray(P,U,B);U==="hex"&&(U=16),n(U===(U|0)&&U>=2&&U<=36),P=P.toString().replace(/\s+/g,"");var X=0;P[0]==="-"&&(X++,this.negative=1),X=0;X-=3)se=P[X]|P[X-1]<<8|P[X-2]<<16,this.words[$]|=se<>>26-le&67108863,le+=24,le>=26&&(le-=26,$++);else if(B==="le")for(X=0,$=0;X>>26-le&67108863,le+=24,le>=26&&(le-=26,$++);return this.strip()};function c(O,P){var U=O.charCodeAt(P);return U>=65&&U<=70?U-55:U>=97&&U<=102?U-87:U-48&15}function m(O,P,U){var B=c(O,U);return U-1>=P&&(B|=c(O,U-1)<<4),B}s.prototype._parseHex=function(P,U,B){this.length=Math.ceil((P.length-U)/6),this.words=new Array(this.length);for(var X=0;X=U;X-=2)le=m(P,U,X)<<$,this.words[se]|=le&67108863,$>=18?($-=18,se+=1,this.words[se]|=le>>>26):$+=8;else{var fe=P.length-U;for(X=fe%2===0?U+1:U;X=18?($-=18,se+=1,this.words[se]|=le>>>26):$+=8}this.strip()};function p(O,P,U,B){for(var X=0,$=Math.min(O.length,U),se=P;se<$;se++){var le=O.charCodeAt(se)-48;X*=B,le>=49?X+=le-49+10:le>=17?X+=le-17+10:X+=le}return X}s.prototype._parseBase=function(P,U,B){this.words=[0],this.length=1;for(var X=0,$=1;$<=67108863;$*=U)X++;X--,$=$/U|0;for(var se=P.length-B,le=se%X,fe=Math.min(se,se-le)+B,V=0,Y=B;Y1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},s.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},s.prototype.inspect=function(){return(this.red?""};var T=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],l=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],_=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];s.prototype.toString=function(P,U){P=P||10,U=U|0||1;var B;if(P===16||P==="hex"){B="";for(var X=0,$=0,se=0;se>>24-X&16777215,$!==0||se!==this.length-1?B=T[6-fe.length]+fe+B:B=fe+B,X+=2,X>=26&&(X-=26,se--)}for($!==0&&(B=$.toString(16)+B);B.length%U!==0;)B="0"+B;return this.negative!==0&&(B="-"+B),B}if(P===(P|0)&&P>=2&&P<=36){var V=l[P],Y=_[P];B="";var ee=this.clone();for(ee.negative=0;!ee.isZero();){var q=ee.modn(Y).toString(P);ee=ee.idivn(Y),ee.isZero()?B=q+B:B=T[V-q.length]+q+B}for(this.isZero()&&(B="0"+B);B.length%U!==0;)B="0"+B;return this.negative!==0&&(B="-"+B),B}n(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var P=this.words[0];return this.length===2?P+=this.words[1]*67108864:this.length===3&&this.words[2]===1?P+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-P:P},s.prototype.toJSON=function(){return this.toString(16)},s.prototype.toBuffer=function(P,U){return n(typeof h<"u"),this.toArrayLike(h,P,U)},s.prototype.toArray=function(P,U){return this.toArrayLike(Array,P,U)},s.prototype.toArrayLike=function(P,U,B){var X=this.byteLength(),$=B||Math.max(1,X);n(X<=$,"byte array longer than desired length"),n($>0,"Requested array length <= 0"),this.strip();var se=U==="le",le=new P($),fe,V,Y=this.clone();if(se){for(V=0;!Y.isZero();V++)fe=Y.andln(255),Y.iushrn(8),le[V]=fe;for(;V<$;V++)le[V]=0}else{for(V=0;V<$-X;V++)le[V]=0;for(V=0;!Y.isZero();V++)fe=Y.andln(255),Y.iushrn(8),le[$-V-1]=fe}return le},Math.clz32?s.prototype._countBits=function(P){return 32-Math.clz32(P)}:s.prototype._countBits=function(P){var U=P,B=0;return U>=4096&&(B+=13,U>>>=13),U>=64&&(B+=7,U>>>=7),U>=8&&(B+=4,U>>>=4),U>=2&&(B+=2,U>>>=2),B+U},s.prototype._zeroBits=function(P){if(P===0)return 26;var U=P,B=0;return U&8191||(B+=13,U>>>=13),U&127||(B+=7,U>>>=7),U&15||(B+=4,U>>>=4),U&3||(B+=2,U>>>=2),U&1||B++,B},s.prototype.bitLength=function(){var P=this.words[this.length-1],U=this._countBits(P);return(this.length-1)*26+U};function w(O){for(var P=new Array(O.bitLength()),U=0;U>>X}return P}s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var P=0,U=0;UP.length?this.clone().ior(P):P.clone().ior(this)},s.prototype.uor=function(P){return this.length>P.length?this.clone().iuor(P):P.clone().iuor(this)},s.prototype.iuand=function(P){var U;this.length>P.length?U=P:U=this;for(var B=0;BP.length?this.clone().iand(P):P.clone().iand(this)},s.prototype.uand=function(P){return this.length>P.length?this.clone().iuand(P):P.clone().iuand(this)},s.prototype.iuxor=function(P){var U,B;this.length>P.length?(U=this,B=P):(U=P,B=this);for(var X=0;XP.length?this.clone().ixor(P):P.clone().ixor(this)},s.prototype.uxor=function(P){return this.length>P.length?this.clone().iuxor(P):P.clone().iuxor(this)},s.prototype.inotn=function(P){n(typeof P=="number"&&P>=0);var U=Math.ceil(P/26)|0,B=P%26;this._expand(U),B>0&&U--;for(var X=0;X0&&(this.words[X]=~this.words[X]&67108863>>26-B),this.strip()},s.prototype.notn=function(P){return this.clone().inotn(P)},s.prototype.setn=function(P,U){n(typeof P=="number"&&P>=0);var B=P/26|0,X=P%26;return this._expand(B+1),U?this.words[B]=this.words[B]|1<P.length?(B=this,X=P):(B=P,X=this);for(var $=0,se=0;se>>26;for(;$!==0&&se>>26;if(this.length=B.length,$!==0)this.words[this.length]=$,this.length++;else if(B!==this)for(;seP.length?this.clone().iadd(P):P.clone().iadd(this)},s.prototype.isub=function(P){if(P.negative!==0){P.negative=0;var U=this.iadd(P);return P.negative=1,U._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(P),this.negative=1,this._normSign();var B=this.cmp(P);if(B===0)return this.negative=0,this.length=1,this.words[0]=0,this;var X,$;B>0?(X=this,$=P):(X=P,$=this);for(var se=0,le=0;le<$.length;le++)U=(X.words[le]|0)-($.words[le]|0)+se,se=U>>26,this.words[le]=U&67108863;for(;se!==0&&le>26,this.words[le]=U&67108863;if(se===0&&le>>26,ee=fe&67108863,q=Math.min(V,P.length-1),oe=Math.max(0,V-O.length+1);oe<=q;oe++){var ae=V-oe|0;X=O.words[ae]|0,$=P.words[oe]|0,se=X*$+ee,Y+=se/67108864|0,ee=se&67108863}U.words[V]=ee|0,fe=Y|0}return fe!==0?U.words[V]=fe|0:U.length--,U.strip()}var M=function(P,U,B){var X=P.words,$=U.words,se=B.words,le=0,fe,V,Y,ee=X[0]|0,q=ee&8191,oe=ee>>>13,ae=X[1]|0,j=ae&8191,Q=ae>>>13,re=X[2]|0,ce=re&8191,be=re>>>13,Ae=X[3]|0,De=Ae&8191,ze=Ae>>>13,Ze=X[4]|0,at=Ze&8191,nt=Ze>>>13,rt=X[5]|0,st=rt&8191,Me=rt>>>13,ye=X[6]|0,he=ye&8191,Oe=ye>>>13,tt=X[7]|0,ot=tt&8191,Qe=tt>>>13,Pt=X[8]|0,It=Pt&8191,qt=Pt>>>13,Wt=X[9]|0,kr=Wt&8191,mr=Wt>>>13,qr=$[0]|0,Sr=qr&8191,Rr=qr>>>13,wt=$[1]|0,Ne=wt&8191,Ke=wt>>>13,Te=$[2]|0,Ie=Te&8191,Ve=Te>>>13,Ce=$[3]|0,Ee=Ce&8191,Pe=Ce>>>13,ft=$[4]|0,ct=ft&8191,_t=ft>>>13,Ct=$[5]|0,ir=Ct&8191,rr=Ct>>>13,er=$[6]|0,Lr=er&8191,fa=er>>>13,Da=$[7]|0,Ia=Da&8191,qa=Da>>>13,Wa=$[8]|0,Ca=Wa&8191,hi=Wa>>>13,wi=$[9]|0,Kt=wi&8191,Ft=wi>>>13;B.negative=P.negative^U.negative,B.length=19,fe=Math.imul(q,Sr),V=Math.imul(q,Rr),V=V+Math.imul(oe,Sr)|0,Y=Math.imul(oe,Rr);var Yt=(le+fe|0)+((V&8191)<<13)|0;le=(Y+(V>>>13)|0)+(Yt>>>26)|0,Yt&=67108863,fe=Math.imul(j,Sr),V=Math.imul(j,Rr),V=V+Math.imul(Q,Sr)|0,Y=Math.imul(Q,Rr),fe=fe+Math.imul(q,Ne)|0,V=V+Math.imul(q,Ke)|0,V=V+Math.imul(oe,Ne)|0,Y=Y+Math.imul(oe,Ke)|0;var Jt=(le+fe|0)+((V&8191)<<13)|0;le=(Y+(V>>>13)|0)+(Jt>>>26)|0,Jt&=67108863,fe=Math.imul(ce,Sr),V=Math.imul(ce,Rr),V=V+Math.imul(be,Sr)|0,Y=Math.imul(be,Rr),fe=fe+Math.imul(j,Ne)|0,V=V+Math.imul(j,Ke)|0,V=V+Math.imul(Q,Ne)|0,Y=Y+Math.imul(Q,Ke)|0,fe=fe+Math.imul(q,Ie)|0,V=V+Math.imul(q,Ve)|0,V=V+Math.imul(oe,Ie)|0,Y=Y+Math.imul(oe,Ve)|0;var Fr=(le+fe|0)+((V&8191)<<13)|0;le=(Y+(V>>>13)|0)+(Fr>>>26)|0,Fr&=67108863,fe=Math.imul(De,Sr),V=Math.imul(De,Rr),V=V+Math.imul(ze,Sr)|0,Y=Math.imul(ze,Rr),fe=fe+Math.imul(ce,Ne)|0,V=V+Math.imul(ce,Ke)|0,V=V+Math.imul(be,Ne)|0,Y=Y+Math.imul(be,Ke)|0,fe=fe+Math.imul(j,Ie)|0,V=V+Math.imul(j,Ve)|0,V=V+Math.imul(Q,Ie)|0,Y=Y+Math.imul(Q,Ve)|0,fe=fe+Math.imul(q,Ee)|0,V=V+Math.imul(q,Pe)|0,V=V+Math.imul(oe,Ee)|0,Y=Y+Math.imul(oe,Pe)|0;var ta=(le+fe|0)+((V&8191)<<13)|0;le=(Y+(V>>>13)|0)+(ta>>>26)|0,ta&=67108863,fe=Math.imul(at,Sr),V=Math.imul(at,Rr),V=V+Math.imul(nt,Sr)|0,Y=Math.imul(nt,Rr),fe=fe+Math.imul(De,Ne)|0,V=V+Math.imul(De,Ke)|0,V=V+Math.imul(ze,Ne)|0,Y=Y+Math.imul(ze,Ke)|0,fe=fe+Math.imul(ce,Ie)|0,V=V+Math.imul(ce,Ve)|0,V=V+Math.imul(be,Ie)|0,Y=Y+Math.imul(be,Ve)|0,fe=fe+Math.imul(j,Ee)|0,V=V+Math.imul(j,Pe)|0,V=V+Math.imul(Q,Ee)|0,Y=Y+Math.imul(Q,Pe)|0,fe=fe+Math.imul(q,ct)|0,V=V+Math.imul(q,_t)|0,V=V+Math.imul(oe,ct)|0,Y=Y+Math.imul(oe,_t)|0;var ra=(le+fe|0)+((V&8191)<<13)|0;le=(Y+(V>>>13)|0)+(ra>>>26)|0,ra&=67108863,fe=Math.imul(st,Sr),V=Math.imul(st,Rr),V=V+Math.imul(Me,Sr)|0,Y=Math.imul(Me,Rr),fe=fe+Math.imul(at,Ne)|0,V=V+Math.imul(at,Ke)|0,V=V+Math.imul(nt,Ne)|0,Y=Y+Math.imul(nt,Ke)|0,fe=fe+Math.imul(De,Ie)|0,V=V+Math.imul(De,Ve)|0,V=V+Math.imul(ze,Ie)|0,Y=Y+Math.imul(ze,Ve)|0,fe=fe+Math.imul(ce,Ee)|0,V=V+Math.imul(ce,Pe)|0,V=V+Math.imul(be,Ee)|0,Y=Y+Math.imul(be,Pe)|0,fe=fe+Math.imul(j,ct)|0,V=V+Math.imul(j,_t)|0,V=V+Math.imul(Q,ct)|0,Y=Y+Math.imul(Q,_t)|0,fe=fe+Math.imul(q,ir)|0,V=V+Math.imul(q,rr)|0,V=V+Math.imul(oe,ir)|0,Y=Y+Math.imul(oe,rr)|0;var ca=(le+fe|0)+((V&8191)<<13)|0;le=(Y+(V>>>13)|0)+(ca>>>26)|0,ca&=67108863,fe=Math.imul(he,Sr),V=Math.imul(he,Rr),V=V+Math.imul(Oe,Sr)|0,Y=Math.imul(Oe,Rr),fe=fe+Math.imul(st,Ne)|0,V=V+Math.imul(st,Ke)|0,V=V+Math.imul(Me,Ne)|0,Y=Y+Math.imul(Me,Ke)|0,fe=fe+Math.imul(at,Ie)|0,V=V+Math.imul(at,Ve)|0,V=V+Math.imul(nt,Ie)|0,Y=Y+Math.imul(nt,Ve)|0,fe=fe+Math.imul(De,Ee)|0,V=V+Math.imul(De,Pe)|0,V=V+Math.imul(ze,Ee)|0,Y=Y+Math.imul(ze,Pe)|0,fe=fe+Math.imul(ce,ct)|0,V=V+Math.imul(ce,_t)|0,V=V+Math.imul(be,ct)|0,Y=Y+Math.imul(be,_t)|0,fe=fe+Math.imul(j,ir)|0,V=V+Math.imul(j,rr)|0,V=V+Math.imul(Q,ir)|0,Y=Y+Math.imul(Q,rr)|0,fe=fe+Math.imul(q,Lr)|0,V=V+Math.imul(q,fa)|0,V=V+Math.imul(oe,Lr)|0,Y=Y+Math.imul(oe,fa)|0;var Ba=(le+fe|0)+((V&8191)<<13)|0;le=(Y+(V>>>13)|0)+(Ba>>>26)|0,Ba&=67108863,fe=Math.imul(ot,Sr),V=Math.imul(ot,Rr),V=V+Math.imul(Qe,Sr)|0,Y=Math.imul(Qe,Rr),fe=fe+Math.imul(he,Ne)|0,V=V+Math.imul(he,Ke)|0,V=V+Math.imul(Oe,Ne)|0,Y=Y+Math.imul(Oe,Ke)|0,fe=fe+Math.imul(st,Ie)|0,V=V+Math.imul(st,Ve)|0,V=V+Math.imul(Me,Ie)|0,Y=Y+Math.imul(Me,Ve)|0,fe=fe+Math.imul(at,Ee)|0,V=V+Math.imul(at,Pe)|0,V=V+Math.imul(nt,Ee)|0,Y=Y+Math.imul(nt,Pe)|0,fe=fe+Math.imul(De,ct)|0,V=V+Math.imul(De,_t)|0,V=V+Math.imul(ze,ct)|0,Y=Y+Math.imul(ze,_t)|0,fe=fe+Math.imul(ce,ir)|0,V=V+Math.imul(ce,rr)|0,V=V+Math.imul(be,ir)|0,Y=Y+Math.imul(be,rr)|0,fe=fe+Math.imul(j,Lr)|0,V=V+Math.imul(j,fa)|0,V=V+Math.imul(Q,Lr)|0,Y=Y+Math.imul(Q,fa)|0,fe=fe+Math.imul(q,Ia)|0,V=V+Math.imul(q,qa)|0,V=V+Math.imul(oe,Ia)|0,Y=Y+Math.imul(oe,qa)|0;var $a=(le+fe|0)+((V&8191)<<13)|0;le=(Y+(V>>>13)|0)+($a>>>26)|0,$a&=67108863,fe=Math.imul(It,Sr),V=Math.imul(It,Rr),V=V+Math.imul(qt,Sr)|0,Y=Math.imul(qt,Rr),fe=fe+Math.imul(ot,Ne)|0,V=V+Math.imul(ot,Ke)|0,V=V+Math.imul(Qe,Ne)|0,Y=Y+Math.imul(Qe,Ke)|0,fe=fe+Math.imul(he,Ie)|0,V=V+Math.imul(he,Ve)|0,V=V+Math.imul(Oe,Ie)|0,Y=Y+Math.imul(Oe,Ve)|0,fe=fe+Math.imul(st,Ee)|0,V=V+Math.imul(st,Pe)|0,V=V+Math.imul(Me,Ee)|0,Y=Y+Math.imul(Me,Pe)|0,fe=fe+Math.imul(at,ct)|0,V=V+Math.imul(at,_t)|0,V=V+Math.imul(nt,ct)|0,Y=Y+Math.imul(nt,_t)|0,fe=fe+Math.imul(De,ir)|0,V=V+Math.imul(De,rr)|0,V=V+Math.imul(ze,ir)|0,Y=Y+Math.imul(ze,rr)|0,fe=fe+Math.imul(ce,Lr)|0,V=V+Math.imul(ce,fa)|0,V=V+Math.imul(be,Lr)|0,Y=Y+Math.imul(be,fa)|0,fe=fe+Math.imul(j,Ia)|0,V=V+Math.imul(j,qa)|0,V=V+Math.imul(Q,Ia)|0,Y=Y+Math.imul(Q,qa)|0,fe=fe+Math.imul(q,Ca)|0,V=V+Math.imul(q,hi)|0,V=V+Math.imul(oe,Ca)|0,Y=Y+Math.imul(oe,hi)|0;var Za=(le+fe|0)+((V&8191)<<13)|0;le=(Y+(V>>>13)|0)+(Za>>>26)|0,Za&=67108863,fe=Math.imul(kr,Sr),V=Math.imul(kr,Rr),V=V+Math.imul(mr,Sr)|0,Y=Math.imul(mr,Rr),fe=fe+Math.imul(It,Ne)|0,V=V+Math.imul(It,Ke)|0,V=V+Math.imul(qt,Ne)|0,Y=Y+Math.imul(qt,Ke)|0,fe=fe+Math.imul(ot,Ie)|0,V=V+Math.imul(ot,Ve)|0,V=V+Math.imul(Qe,Ie)|0,Y=Y+Math.imul(Qe,Ve)|0,fe=fe+Math.imul(he,Ee)|0,V=V+Math.imul(he,Pe)|0,V=V+Math.imul(Oe,Ee)|0,Y=Y+Math.imul(Oe,Pe)|0,fe=fe+Math.imul(st,ct)|0,V=V+Math.imul(st,_t)|0,V=V+Math.imul(Me,ct)|0,Y=Y+Math.imul(Me,_t)|0,fe=fe+Math.imul(at,ir)|0,V=V+Math.imul(at,rr)|0,V=V+Math.imul(nt,ir)|0,Y=Y+Math.imul(nt,rr)|0,fe=fe+Math.imul(De,Lr)|0,V=V+Math.imul(De,fa)|0,V=V+Math.imul(ze,Lr)|0,Y=Y+Math.imul(ze,fa)|0,fe=fe+Math.imul(ce,Ia)|0,V=V+Math.imul(ce,qa)|0,V=V+Math.imul(be,Ia)|0,Y=Y+Math.imul(be,qa)|0,fe=fe+Math.imul(j,Ca)|0,V=V+Math.imul(j,hi)|0,V=V+Math.imul(Q,Ca)|0,Y=Y+Math.imul(Q,hi)|0,fe=fe+Math.imul(q,Kt)|0,V=V+Math.imul(q,Ft)|0,V=V+Math.imul(oe,Kt)|0,Y=Y+Math.imul(oe,Ft)|0;var ri=(le+fe|0)+((V&8191)<<13)|0;le=(Y+(V>>>13)|0)+(ri>>>26)|0,ri&=67108863,fe=Math.imul(kr,Ne),V=Math.imul(kr,Ke),V=V+Math.imul(mr,Ne)|0,Y=Math.imul(mr,Ke),fe=fe+Math.imul(It,Ie)|0,V=V+Math.imul(It,Ve)|0,V=V+Math.imul(qt,Ie)|0,Y=Y+Math.imul(qt,Ve)|0,fe=fe+Math.imul(ot,Ee)|0,V=V+Math.imul(ot,Pe)|0,V=V+Math.imul(Qe,Ee)|0,Y=Y+Math.imul(Qe,Pe)|0,fe=fe+Math.imul(he,ct)|0,V=V+Math.imul(he,_t)|0,V=V+Math.imul(Oe,ct)|0,Y=Y+Math.imul(Oe,_t)|0,fe=fe+Math.imul(st,ir)|0,V=V+Math.imul(st,rr)|0,V=V+Math.imul(Me,ir)|0,Y=Y+Math.imul(Me,rr)|0,fe=fe+Math.imul(at,Lr)|0,V=V+Math.imul(at,fa)|0,V=V+Math.imul(nt,Lr)|0,Y=Y+Math.imul(nt,fa)|0,fe=fe+Math.imul(De,Ia)|0,V=V+Math.imul(De,qa)|0,V=V+Math.imul(ze,Ia)|0,Y=Y+Math.imul(ze,qa)|0,fe=fe+Math.imul(ce,Ca)|0,V=V+Math.imul(ce,hi)|0,V=V+Math.imul(be,Ca)|0,Y=Y+Math.imul(be,hi)|0,fe=fe+Math.imul(j,Kt)|0,V=V+Math.imul(j,Ft)|0,V=V+Math.imul(Q,Kt)|0,Y=Y+Math.imul(Q,Ft)|0;var pi=(le+fe|0)+((V&8191)<<13)|0;le=(Y+(V>>>13)|0)+(pi>>>26)|0,pi&=67108863,fe=Math.imul(kr,Ie),V=Math.imul(kr,Ve),V=V+Math.imul(mr,Ie)|0,Y=Math.imul(mr,Ve),fe=fe+Math.imul(It,Ee)|0,V=V+Math.imul(It,Pe)|0,V=V+Math.imul(qt,Ee)|0,Y=Y+Math.imul(qt,Pe)|0,fe=fe+Math.imul(ot,ct)|0,V=V+Math.imul(ot,_t)|0,V=V+Math.imul(Qe,ct)|0,Y=Y+Math.imul(Qe,_t)|0,fe=fe+Math.imul(he,ir)|0,V=V+Math.imul(he,rr)|0,V=V+Math.imul(Oe,ir)|0,Y=Y+Math.imul(Oe,rr)|0,fe=fe+Math.imul(st,Lr)|0,V=V+Math.imul(st,fa)|0,V=V+Math.imul(Me,Lr)|0,Y=Y+Math.imul(Me,fa)|0,fe=fe+Math.imul(at,Ia)|0,V=V+Math.imul(at,qa)|0,V=V+Math.imul(nt,Ia)|0,Y=Y+Math.imul(nt,qa)|0,fe=fe+Math.imul(De,Ca)|0,V=V+Math.imul(De,hi)|0,V=V+Math.imul(ze,Ca)|0,Y=Y+Math.imul(ze,hi)|0,fe=fe+Math.imul(ce,Kt)|0,V=V+Math.imul(ce,Ft)|0,V=V+Math.imul(be,Kt)|0,Y=Y+Math.imul(be,Ft)|0;var Ra=(le+fe|0)+((V&8191)<<13)|0;le=(Y+(V>>>13)|0)+(Ra>>>26)|0,Ra&=67108863,fe=Math.imul(kr,Ee),V=Math.imul(kr,Pe),V=V+Math.imul(mr,Ee)|0,Y=Math.imul(mr,Pe),fe=fe+Math.imul(It,ct)|0,V=V+Math.imul(It,_t)|0,V=V+Math.imul(qt,ct)|0,Y=Y+Math.imul(qt,_t)|0,fe=fe+Math.imul(ot,ir)|0,V=V+Math.imul(ot,rr)|0,V=V+Math.imul(Qe,ir)|0,Y=Y+Math.imul(Qe,rr)|0,fe=fe+Math.imul(he,Lr)|0,V=V+Math.imul(he,fa)|0,V=V+Math.imul(Oe,Lr)|0,Y=Y+Math.imul(Oe,fa)|0,fe=fe+Math.imul(st,Ia)|0,V=V+Math.imul(st,qa)|0,V=V+Math.imul(Me,Ia)|0,Y=Y+Math.imul(Me,qa)|0,fe=fe+Math.imul(at,Ca)|0,V=V+Math.imul(at,hi)|0,V=V+Math.imul(nt,Ca)|0,Y=Y+Math.imul(nt,hi)|0,fe=fe+Math.imul(De,Kt)|0,V=V+Math.imul(De,Ft)|0,V=V+Math.imul(ze,Kt)|0,Y=Y+Math.imul(ze,Ft)|0;var tn=(le+fe|0)+((V&8191)<<13)|0;le=(Y+(V>>>13)|0)+(tn>>>26)|0,tn&=67108863,fe=Math.imul(kr,ct),V=Math.imul(kr,_t),V=V+Math.imul(mr,ct)|0,Y=Math.imul(mr,_t),fe=fe+Math.imul(It,ir)|0,V=V+Math.imul(It,rr)|0,V=V+Math.imul(qt,ir)|0,Y=Y+Math.imul(qt,rr)|0,fe=fe+Math.imul(ot,Lr)|0,V=V+Math.imul(ot,fa)|0,V=V+Math.imul(Qe,Lr)|0,Y=Y+Math.imul(Qe,fa)|0,fe=fe+Math.imul(he,Ia)|0,V=V+Math.imul(he,qa)|0,V=V+Math.imul(Oe,Ia)|0,Y=Y+Math.imul(Oe,qa)|0,fe=fe+Math.imul(st,Ca)|0,V=V+Math.imul(st,hi)|0,V=V+Math.imul(Me,Ca)|0,Y=Y+Math.imul(Me,hi)|0,fe=fe+Math.imul(at,Kt)|0,V=V+Math.imul(at,Ft)|0,V=V+Math.imul(nt,Kt)|0,Y=Y+Math.imul(nt,Ft)|0;var on=(le+fe|0)+((V&8191)<<13)|0;le=(Y+(V>>>13)|0)+(on>>>26)|0,on&=67108863,fe=Math.imul(kr,ir),V=Math.imul(kr,rr),V=V+Math.imul(mr,ir)|0,Y=Math.imul(mr,rr),fe=fe+Math.imul(It,Lr)|0,V=V+Math.imul(It,fa)|0,V=V+Math.imul(qt,Lr)|0,Y=Y+Math.imul(qt,fa)|0,fe=fe+Math.imul(ot,Ia)|0,V=V+Math.imul(ot,qa)|0,V=V+Math.imul(Qe,Ia)|0,Y=Y+Math.imul(Qe,qa)|0,fe=fe+Math.imul(he,Ca)|0,V=V+Math.imul(he,hi)|0,V=V+Math.imul(Oe,Ca)|0,Y=Y+Math.imul(Oe,hi)|0,fe=fe+Math.imul(st,Kt)|0,V=V+Math.imul(st,Ft)|0,V=V+Math.imul(Me,Kt)|0,Y=Y+Math.imul(Me,Ft)|0;var hn=(le+fe|0)+((V&8191)<<13)|0;le=(Y+(V>>>13)|0)+(hn>>>26)|0,hn&=67108863,fe=Math.imul(kr,Lr),V=Math.imul(kr,fa),V=V+Math.imul(mr,Lr)|0,Y=Math.imul(mr,fa),fe=fe+Math.imul(It,Ia)|0,V=V+Math.imul(It,qa)|0,V=V+Math.imul(qt,Ia)|0,Y=Y+Math.imul(qt,qa)|0,fe=fe+Math.imul(ot,Ca)|0,V=V+Math.imul(ot,hi)|0,V=V+Math.imul(Qe,Ca)|0,Y=Y+Math.imul(Qe,hi)|0,fe=fe+Math.imul(he,Kt)|0,V=V+Math.imul(he,Ft)|0,V=V+Math.imul(Oe,Kt)|0,Y=Y+Math.imul(Oe,Ft)|0;var Tt=(le+fe|0)+((V&8191)<<13)|0;le=(Y+(V>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,fe=Math.imul(kr,Ia),V=Math.imul(kr,qa),V=V+Math.imul(mr,Ia)|0,Y=Math.imul(mr,qa),fe=fe+Math.imul(It,Ca)|0,V=V+Math.imul(It,hi)|0,V=V+Math.imul(qt,Ca)|0,Y=Y+Math.imul(qt,hi)|0,fe=fe+Math.imul(ot,Kt)|0,V=V+Math.imul(ot,Ft)|0,V=V+Math.imul(Qe,Kt)|0,Y=Y+Math.imul(Qe,Ft)|0;var ut=(le+fe|0)+((V&8191)<<13)|0;le=(Y+(V>>>13)|0)+(ut>>>26)|0,ut&=67108863,fe=Math.imul(kr,Ca),V=Math.imul(kr,hi),V=V+Math.imul(mr,Ca)|0,Y=Math.imul(mr,hi),fe=fe+Math.imul(It,Kt)|0,V=V+Math.imul(It,Ft)|0,V=V+Math.imul(qt,Kt)|0,Y=Y+Math.imul(qt,Ft)|0;var Br=(le+fe|0)+((V&8191)<<13)|0;le=(Y+(V>>>13)|0)+(Br>>>26)|0,Br&=67108863,fe=Math.imul(kr,Kt),V=Math.imul(kr,Ft),V=V+Math.imul(mr,Kt)|0,Y=Math.imul(mr,Ft);var Cr=(le+fe|0)+((V&8191)<<13)|0;return le=(Y+(V>>>13)|0)+(Cr>>>26)|0,Cr&=67108863,se[0]=Yt,se[1]=Jt,se[2]=Fr,se[3]=ta,se[4]=ra,se[5]=ca,se[6]=Ba,se[7]=$a,se[8]=Za,se[9]=ri,se[10]=pi,se[11]=Ra,se[12]=tn,se[13]=on,se[14]=hn,se[15]=Tt,se[16]=ut,se[17]=Br,se[18]=Cr,le!==0&&(se[19]=le,B.length++),B};Math.imul||(M=A);function g(O,P,U){U.negative=P.negative^O.negative,U.length=O.length+P.length;for(var B=0,X=0,$=0;$>>26)|0,X+=se>>>26,se&=67108863}U.words[$]=le,B=se,se=X}return B!==0?U.words[$]=B:U.length--,U.strip()}function b(O,P,U){var B=new d;return B.mulp(O,P,U)}s.prototype.mulTo=function(P,U){var B,X=this.length+P.length;return this.length===10&&P.length===10?B=M(this,P,U):X<63?B=A(this,P,U):X<1024?B=g(this,P,U):B=b(this,P,U),B};function d(O,P){this.x=O,this.y=P}d.prototype.makeRBT=function(P){for(var U=new Array(P),B=s.prototype._countBits(P)-1,X=0;X>=1;return X},d.prototype.permute=function(P,U,B,X,$,se){for(var le=0;le>>1)$++;return 1<<$+1+X},d.prototype.conjugate=function(P,U,B){if(!(B<=1))for(var X=0;X>>13,B[2*se+1]=$&8191,$=$>>>13;for(se=2*U;se>=26,U+=X/67108864|0,U+=$>>>26,this.words[B]=$&67108863}return U!==0&&(this.words[B]=U,this.length++),this},s.prototype.muln=function(P){return this.clone().imuln(P)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(P){var U=w(P);if(U.length===0)return new s(1);for(var B=this,X=0;X=0);var U=P%26,B=(P-U)/26,X=67108863>>>26-U<<26-U,$;if(U!==0){var se=0;for($=0;$>>26-U}se&&(this.words[$]=se,this.length++)}if(B!==0){for($=this.length-1;$>=0;$--)this.words[$+B]=this.words[$];for($=0;$=0);var X;U?X=(U-U%26)/26:X=0;var $=P%26,se=Math.min((P-$)/26,this.length),le=67108863^67108863>>>$<<$,fe=B;if(X-=se,X=Math.max(0,X),fe){for(var V=0;Vse)for(this.length-=se,V=0;V=0&&(Y!==0||V>=X);V--){var ee=this.words[V]|0;this.words[V]=Y<<26-$|ee>>>$,Y=ee&le}return fe&&Y!==0&&(fe.words[fe.length++]=Y),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},s.prototype.ishrn=function(P,U,B){return n(this.negative===0),this.iushrn(P,U,B)},s.prototype.shln=function(P){return this.clone().ishln(P)},s.prototype.ushln=function(P){return this.clone().iushln(P)},s.prototype.shrn=function(P){return this.clone().ishrn(P)},s.prototype.ushrn=function(P){return this.clone().iushrn(P)},s.prototype.testn=function(P){n(typeof P=="number"&&P>=0);var U=P%26,B=(P-U)/26,X=1<=0);var U=P%26,B=(P-U)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=B)return this;if(U!==0&&B++,this.length=Math.min(B,this.length),U!==0){var X=67108863^67108863>>>U<=67108864;U++)this.words[U]-=67108864,U===this.length-1?this.words[U+1]=1:this.words[U+1]++;return this.length=Math.max(this.length,U+1),this},s.prototype.isubn=function(P){if(n(typeof P=="number"),n(P<67108864),P<0)return this.iaddn(-P);if(this.negative!==0)return this.negative=0,this.iaddn(P),this.negative=1,this;if(this.words[0]-=P,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var U=0;U>26)-(fe/67108864|0),this.words[$+B]=se&67108863}for(;$>26,this.words[$+B]=se&67108863;if(le===0)return this.strip();for(n(le===-1),le=0,$=0;$>26,this.words[$]=se&67108863;return this.negative=1,this.strip()},s.prototype._wordDiv=function(P,U){var B=this.length-P.length,X=this.clone(),$=P,se=$.words[$.length-1]|0,le=this._countBits(se);B=26-le,B!==0&&($=$.ushln(B),X.iushln(B),se=$.words[$.length-1]|0);var fe=X.length-$.length,V;if(U!=="mod"){V=new s(null),V.length=fe+1,V.words=new Array(V.length);for(var Y=0;Y=0;q--){var oe=(X.words[$.length+q]|0)*67108864+(X.words[$.length+q-1]|0);for(oe=Math.min(oe/se|0,67108863),X._ishlnsubmul($,oe,q);X.negative!==0;)oe--,X.negative=0,X._ishlnsubmul($,1,q),X.isZero()||(X.negative^=1);V&&(V.words[q]=oe)}return V&&V.strip(),X.strip(),U!=="div"&&B!==0&&X.iushrn(B),{div:V||null,mod:X}},s.prototype.divmod=function(P,U,B){if(n(!P.isZero()),this.isZero())return{div:new s(0),mod:new s(0)};var X,$,se;return this.negative!==0&&P.negative===0?(se=this.neg().divmod(P,U),U!=="mod"&&(X=se.div.neg()),U!=="div"&&($=se.mod.neg(),B&&$.negative!==0&&$.iadd(P)),{div:X,mod:$}):this.negative===0&&P.negative!==0?(se=this.divmod(P.neg(),U),U!=="mod"&&(X=se.div.neg()),{div:X,mod:se.mod}):this.negative&P.negative?(se=this.neg().divmod(P.neg(),U),U!=="div"&&($=se.mod.neg(),B&&$.negative!==0&&$.isub(P)),{div:se.div,mod:$}):P.length>this.length||this.cmp(P)<0?{div:new s(0),mod:this}:P.length===1?U==="div"?{div:this.divn(P.words[0]),mod:null}:U==="mod"?{div:null,mod:new s(this.modn(P.words[0]))}:{div:this.divn(P.words[0]),mod:new s(this.modn(P.words[0]))}:this._wordDiv(P,U)},s.prototype.div=function(P){return this.divmod(P,"div",!1).div},s.prototype.mod=function(P){return this.divmod(P,"mod",!1).mod},s.prototype.umod=function(P){return this.divmod(P,"mod",!0).mod},s.prototype.divRound=function(P){var U=this.divmod(P);if(U.mod.isZero())return U.div;var B=U.div.negative!==0?U.mod.isub(P):U.mod,X=P.ushrn(1),$=P.andln(1),se=B.cmp(X);return se<0||$===1&&se===0?U.div:U.div.negative!==0?U.div.isubn(1):U.div.iaddn(1)},s.prototype.modn=function(P){n(P<=67108863);for(var U=(1<<26)%P,B=0,X=this.length-1;X>=0;X--)B=(U*B+(this.words[X]|0))%P;return B},s.prototype.idivn=function(P){n(P<=67108863);for(var U=0,B=this.length-1;B>=0;B--){var X=(this.words[B]|0)+U*67108864;this.words[B]=X/P|0,U=X%P}return this.strip()},s.prototype.divn=function(P){return this.clone().idivn(P)},s.prototype.egcd=function(P){n(P.negative===0),n(!P.isZero());var U=this,B=P.clone();U.negative!==0?U=U.umod(P):U=U.clone();for(var X=new s(1),$=new s(0),se=new s(0),le=new s(1),fe=0;U.isEven()&&B.isEven();)U.iushrn(1),B.iushrn(1),++fe;for(var V=B.clone(),Y=U.clone();!U.isZero();){for(var ee=0,q=1;!(U.words[0]&q)&&ee<26;++ee,q<<=1);if(ee>0)for(U.iushrn(ee);ee-- >0;)(X.isOdd()||$.isOdd())&&(X.iadd(V),$.isub(Y)),X.iushrn(1),$.iushrn(1);for(var oe=0,ae=1;!(B.words[0]&ae)&&oe<26;++oe,ae<<=1);if(oe>0)for(B.iushrn(oe);oe-- >0;)(se.isOdd()||le.isOdd())&&(se.iadd(V),le.isub(Y)),se.iushrn(1),le.iushrn(1);U.cmp(B)>=0?(U.isub(B),X.isub(se),$.isub(le)):(B.isub(U),se.isub(X),le.isub($))}return{a:se,b:le,gcd:B.iushln(fe)}},s.prototype._invmp=function(P){n(P.negative===0),n(!P.isZero());var U=this,B=P.clone();U.negative!==0?U=U.umod(P):U=U.clone();for(var X=new s(1),$=new s(0),se=B.clone();U.cmpn(1)>0&&B.cmpn(1)>0;){for(var le=0,fe=1;!(U.words[0]&fe)&&le<26;++le,fe<<=1);if(le>0)for(U.iushrn(le);le-- >0;)X.isOdd()&&X.iadd(se),X.iushrn(1);for(var V=0,Y=1;!(B.words[0]&Y)&&V<26;++V,Y<<=1);if(V>0)for(B.iushrn(V);V-- >0;)$.isOdd()&&$.iadd(se),$.iushrn(1);U.cmp(B)>=0?(U.isub(B),X.isub($)):(B.isub(U),$.isub(X))}var ee;return U.cmpn(1)===0?ee=X:ee=$,ee.cmpn(0)<0&&ee.iadd(P),ee},s.prototype.gcd=function(P){if(this.isZero())return P.abs();if(P.isZero())return this.abs();var U=this.clone(),B=P.clone();U.negative=0,B.negative=0;for(var X=0;U.isEven()&&B.isEven();X++)U.iushrn(1),B.iushrn(1);do{for(;U.isEven();)U.iushrn(1);for(;B.isEven();)B.iushrn(1);var $=U.cmp(B);if($<0){var se=U;U=B,B=se}else if($===0||B.cmpn(1)===0)break;U.isub(B)}while(!0);return B.iushln(X)},s.prototype.invm=function(P){return this.egcd(P).a.umod(P)},s.prototype.isEven=function(){return(this.words[0]&1)===0},s.prototype.isOdd=function(){return(this.words[0]&1)===1},s.prototype.andln=function(P){return this.words[0]&P},s.prototype.bincn=function(P){n(typeof P=="number");var U=P%26,B=(P-U)/26,X=1<>>26,le&=67108863,this.words[se]=le}return $!==0&&(this.words[se]=$,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(P){var U=P<0;if(this.negative!==0&&!U)return-1;if(this.negative===0&&U)return 1;this.strip();var B;if(this.length>1)B=1;else{U&&(P=-P),n(P<=67108863,"Number is too big");var X=this.words[0]|0;B=X===P?0:XP.length)return 1;if(this.length=0;B--){var X=this.words[B]|0,$=P.words[B]|0;if(X!==$){X<$?U=-1:X>$&&(U=1);break}}return U},s.prototype.gtn=function(P){return this.cmpn(P)===1},s.prototype.gt=function(P){return this.cmp(P)===1},s.prototype.gten=function(P){return this.cmpn(P)>=0},s.prototype.gte=function(P){return this.cmp(P)>=0},s.prototype.ltn=function(P){return this.cmpn(P)===-1},s.prototype.lt=function(P){return this.cmp(P)===-1},s.prototype.lten=function(P){return this.cmpn(P)<=0},s.prototype.lte=function(P){return this.cmp(P)<=0},s.prototype.eqn=function(P){return this.cmpn(P)===0},s.prototype.eq=function(P){return this.cmp(P)===0},s.red=function(P){return new F(P)},s.prototype.toRed=function(P){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),P.convertTo(this)._forceRed(P)},s.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(P){return this.red=P,this},s.prototype.forceRed=function(P){return n(!this.red,"Already a number in reduction context"),this._forceRed(P)},s.prototype.redAdd=function(P){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,P)},s.prototype.redIAdd=function(P){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,P)},s.prototype.redSub=function(P){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,P)},s.prototype.redISub=function(P){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,P)},s.prototype.redShl=function(P){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,P)},s.prototype.redMul=function(P){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,P),this.red.mul(this,P)},s.prototype.redIMul=function(P){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,P),this.red.imul(this,P)},s.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(P){return n(this.red&&!P.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,P)};var u={k256:null,p224:null,p192:null,p25519:null};function y(O,P){this.name=O,this.p=new s(P,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}y.prototype._tmp=function(){var P=new s(null);return P.words=new Array(Math.ceil(this.n/13)),P},y.prototype.ireduce=function(P){var U=P,B;do this.split(U,this.tmp),U=this.imulK(U),U=U.iadd(this.tmp),B=U.bitLength();while(B>this.n);var X=B0?U.isub(this.p):U.strip!==void 0?U.strip():U._strip(),U},y.prototype.split=function(P,U){P.iushrn(this.n,0,U)},y.prototype.imulK=function(P){return P.imul(this.k)};function f(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(f,y),f.prototype.split=function(P,U){for(var B=4194303,X=Math.min(P.length,9),$=0;$>>22,se=le}se>>>=22,P.words[$-10]=se,se===0&&P.length>10?P.length-=10:P.length-=9},f.prototype.imulK=function(P){P.words[P.length]=0,P.words[P.length+1]=0,P.length+=2;for(var U=0,B=0;B>>=26,P.words[B]=$,U=X}return U!==0&&(P.words[P.length++]=U),P},s._prime=function(P){if(u[P])return u[P];var U;if(P==="k256")U=new f;else if(P==="p224")U=new R;else if(P==="p192")U=new L;else if(P==="p25519")U=new z;else throw new Error("Unknown prime "+P);return u[P]=U,U};function F(O){if(typeof O=="string"){var P=s._prime(O);this.m=P.p,this.prime=P}else n(O.gtn(1),"modulus must be greater than 1"),this.m=O,this.prime=null}F.prototype._verify1=function(P){n(P.negative===0,"red works only with positives"),n(P.red,"red works only with red numbers")},F.prototype._verify2=function(P,U){n((P.negative|U.negative)===0,"red works only with positives"),n(P.red&&P.red===U.red,"red works only with red numbers")},F.prototype.imod=function(P){return this.prime?this.prime.ireduce(P)._forceRed(this):P.umod(this.m)._forceRed(this)},F.prototype.neg=function(P){return P.isZero()?P.clone():this.m.sub(P)._forceRed(this)},F.prototype.add=function(P,U){this._verify2(P,U);var B=P.add(U);return B.cmp(this.m)>=0&&B.isub(this.m),B._forceRed(this)},F.prototype.iadd=function(P,U){this._verify2(P,U);var B=P.iadd(U);return B.cmp(this.m)>=0&&B.isub(this.m),B},F.prototype.sub=function(P,U){this._verify2(P,U);var B=P.sub(U);return B.cmpn(0)<0&&B.iadd(this.m),B._forceRed(this)},F.prototype.isub=function(P,U){this._verify2(P,U);var B=P.isub(U);return B.cmpn(0)<0&&B.iadd(this.m),B},F.prototype.shl=function(P,U){return this._verify1(P),this.imod(P.ushln(U))},F.prototype.imul=function(P,U){return this._verify2(P,U),this.imod(P.imul(U))},F.prototype.mul=function(P,U){return this._verify2(P,U),this.imod(P.mul(U))},F.prototype.isqr=function(P){return this.imul(P,P.clone())},F.prototype.sqr=function(P){return this.mul(P,P)},F.prototype.sqrt=function(P){if(P.isZero())return P.clone();var U=this.m.andln(3);if(n(U%2===1),U===3){var B=this.m.add(new s(1)).iushrn(2);return this.pow(P,B)}for(var X=this.m.subn(1),$=0;!X.isZero()&&X.andln(1)===0;)$++,X.iushrn(1);n(!X.isZero());var se=new s(1).toRed(this),le=se.redNeg(),fe=this.m.subn(1).iushrn(1),V=this.m.bitLength();for(V=new s(2*V*V).toRed(this);this.pow(V,fe).cmp(le)!==0;)V.redIAdd(le);for(var Y=this.pow(V,X),ee=this.pow(P,X.addn(1).iushrn(1)),q=this.pow(P,X),oe=$;q.cmp(se)!==0;){for(var ae=q,j=0;ae.cmp(se)!==0;j++)ae=ae.redSqr();n(j=0;$--){for(var Y=U.words[$],ee=V-1;ee>=0;ee--){var q=Y>>ee&1;if(se!==X[0]&&(se=this.sqr(se)),q===0&&le===0){fe=0;continue}le<<=1,le|=q,fe++,!(fe!==B&&($!==0||ee!==0))&&(se=this.mul(se,X[le]),fe=0,le=0)}V=26}return se},F.prototype.convertTo=function(P){var U=P.umod(this.m);return U===P?U.clone():U},F.prototype.convertFrom=function(P){var U=P.clone();return U.red=null,U},s.mont=function(P){return new N(P)};function N(O){F.call(this,O),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new s(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}i(N,F),N.prototype.convertTo=function(P){return this.imod(P.ushln(this.shift))},N.prototype.convertFrom=function(P){var U=this.imod(P.mul(this.rinv));return U.red=null,U},N.prototype.imul=function(P,U){if(P.isZero()||U.isZero())return P.words[0]=0,P.length=1,P;var B=P.imul(U),X=B.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),$=B.isub(X).iushrn(this.shift),se=$;return $.cmp(this.m)>=0?se=$.isub(this.m):$.cmpn(0)<0&&(se=$.iadd(this.m)),se._forceRed(this)},N.prototype.mul=function(P,U){if(P.isZero()||U.isZero())return new s(0)._forceRed(this);var B=P.mul(U),X=B.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),$=B.isub(X).iushrn(this.shift),se=$;return $.cmp(this.m)>=0?se=$.isub(this.m):$.cmpn(0)<0&&(se=$.iadd(this.m)),se._forceRed(this)},N.prototype.invm=function(P){var U=this.imod(P._invmp(this.m).mul(this.r2));return U._forceRed(this)}}(e,this)},6860:function(e){e.exports=t;function t(r,o,a){return r[0]=o[0]-a[0],r[1]=o[1]-a[1],r[2]=o[2]-a[2],r[3]=o[3]-a[3],r}},6864:function(e){e.exports=t;function t(){var r=new Float32Array(16);return r[0]=1,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=1,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=1,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r}},6867:function(e,t,r){"use strict";e.exports=l;var o=r(1888),a=r(855),n=r(7150);function i(_,w){for(var A=0;A<_;++A)if(!(w[A]<=w[A+_]))return!0;return!1}function s(_,w,A,M){for(var g=0,b=0,d=0,u=_.length;d>>1;if(!(d<=0)){var u,y=o.mallocDouble(2*d*g),f=o.mallocInt32(g);if(g=s(_,d,y,f),g>0){if(d===1&&M)a.init(g),u=a.sweepComplete(d,A,0,g,y,f,0,g,y,f);else{var R=o.mallocDouble(2*d*b),L=o.mallocInt32(b);b=s(w,d,R,L),b>0&&(a.init(g+b),d===1?u=a.sweepBipartite(d,A,0,g,y,f,0,b,R,L):u=n(d,A,M,g,y,f,b,R,L),o.free(R),o.free(L))}o.free(y),o.free(f)}return u}}}var c;function m(_,w){c.push([_,w])}function p(_){return c=[],h(_,_,m,!0),c}function T(_,w){return c=[],h(_,w,m,!1),c}function l(_,w,A){switch(arguments.length){case 1:return p(_);case 2:return typeof w=="function"?h(_,_,w,!0):T(_,w);case 3:return h(_,w,A,!1);default:throw new Error("box-intersect: Invalid arguments")}}},6894:function(e){e.exports=t;function t(r,o,a,n){var i=a[1],s=a[2],h=o[1]-i,c=o[2]-s,m=Math.sin(n),p=Math.cos(n);return r[0]=o[0],r[1]=i+h*p-c*m,r[2]=s+h*m+c*p,r}},7004:function(e){"use strict";e.exports=t;function t(r){for(var o=r.length,a=r[r.length-1],n=o,i=o-2;i>=0;--i){var s=a,h=r[i];a=s+h;var c=a-s,m=h-c;m&&(r[--n]=a,a=m)}for(var p=0,i=n;i=p0)&&!(p1>=hi)"),w=m("lo===p0"),A=m("lo0;){Y-=1;var oe=Y*d,ae=f[oe],j=f[oe+1],Q=f[oe+2],re=f[oe+3],ce=f[oe+4],be=f[oe+5],Ae=Y*u,De=R[Ae],ze=R[Ae+1],Ze=be&1,at=!!(be&16),nt=$,rt=se,st=fe,Me=V;if(Ze&&(nt=fe,rt=V,st=$,Me=se),!(be&2&&(Q=A(P,ae,j,Q,nt,rt,ze),j>=Q))&&!(be&4&&(j=M(P,ae,j,Q,nt,rt,De),j>=Q))){var ye=Q-j,he=ce-re;if(at){if(P*ye*(ye+he)"u"?r(1538):WeakMap,a=r(2762),n=r(8116),i=new o;function s(h){var c=i.get(h),m=c&&(c._triangleBuffer.handle||c._triangleBuffer.buffer);if(!m||!h.isBuffer(m)){var p=a(h,new Float32Array([-1,-1,-1,4,4,-1]));c=n(h,[{buffer:p,type:h.FLOAT,size:2}]),c._triangleBuffer=p,i.set(h,c)}c.bind(),h.drawArrays(h.TRIANGLES,0,3),c.unbind()}e.exports=s},7182:function(e,t,r){var o={identity:r(7894),translate:r(7656),multiply:r(6760),create:r(6864),scale:r(2504),fromRotationTranslation:r(6743)},a=o.create(),n=o.create();e.exports=function(s,h,c,m,p,T){return o.identity(s),o.fromRotationTranslation(s,T,h),s[3]=p[0],s[7]=p[1],s[11]=p[2],s[15]=p[3],o.identity(n),m[2]!==0&&(n[9]=m[2],o.multiply(s,s,n)),m[1]!==0&&(n[9]=0,n[8]=m[1],o.multiply(s,s,n)),m[0]!==0&&(n[8]=0,n[4]=m[0],o.multiply(s,s,n)),o.scale(s,s,c),s}},7201:function(e,t,r){"use strict";var o=1e-6,a=1e-6,n=r(9405),i=r(2762),s=r(8116),h=r(7766),c=r(8406),m=r(6760),p=r(7608),T=r(9618),l=r(6729),_=r(7765),w=r(1888),A=r(840),M=r(7626),g=A.meshShader,b=A.wireShader,d=A.pointShader,u=A.pickShader,y=A.pointPickShader,f=A.contourShader,R=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function L(fe,V,Y,ee,q,oe,ae,j,Q,re,ce,be,Ae,De,ze,Ze,at,nt,rt,st,Me,ye,he,Oe,tt,ot,Qe){this.gl=fe,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=V,this.dirty=!0,this.triShader=Y,this.lineShader=ee,this.pointShader=q,this.pickShader=oe,this.pointPickShader=ae,this.contourShader=j,this.trianglePositions=Q,this.triangleColors=ce,this.triangleNormals=Ae,this.triangleUVs=be,this.triangleIds=re,this.triangleVAO=De,this.triangleCount=0,this.lineWidth=1,this.edgePositions=ze,this.edgeColors=at,this.edgeUVs=nt,this.edgeIds=Ze,this.edgeVAO=rt,this.edgeCount=0,this.pointPositions=st,this.pointColors=ye,this.pointUVs=he,this.pointSizes=Oe,this.pointIds=Me,this.pointVAO=tt,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=ot,this.contourVAO=Qe,this.contourCount=0,this.contourColor=[0,0,0],this.contourEnable=!0,this.pickVertex=!0,this.pickId=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lightPosition=[1e5,1e5,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.opacity=1,this.hasAlpha=!1,this.opacityscale=!1,this._model=R,this._view=R,this._projection=R,this._resolution=[1,1]}var z=L.prototype;z.isOpaque=function(){return!this.hasAlpha},z.isTransparent=function(){return this.hasAlpha},z.pickSlots=1,z.setPickBase=function(fe){this.pickId=fe};function F(fe,V){if(!V||!V.length)return 1;for(var Y=0;Yfe&&Y>0){var ee=(V[Y][0]-fe)/(V[Y][0]-V[Y-1][0]);return V[Y][1]*(1-ee)+ee*V[Y-1][1]}}return 1}function N(fe,V){for(var Y=l({colormap:fe,nshades:256,format:"rgba"}),ee=new Uint8Array(256*4),q=0;q<256;++q){for(var oe=Y[q],ae=0;ae<3;++ae)ee[4*q+ae]=oe[ae];V?ee[4*q+3]=255*F(q/255,V):ee[4*q+3]=255*oe[3]}return T(ee,[256,256,4],[4,0,1])}function O(fe){for(var V=fe.length,Y=new Array(V),ee=0;ee0){var Ae=this.triShader;Ae.bind(),Ae.uniforms=j,this.triangleVAO.bind(),V.drawArrays(V.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}if(this.edgeCount>0&&this.lineWidth>0){var Ae=this.lineShader;Ae.bind(),Ae.uniforms=j,this.edgeVAO.bind(),V.lineWidth(this.lineWidth*this.pixelRatio),V.drawArrays(V.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()}if(this.pointCount>0){var Ae=this.pointShader;Ae.bind(),Ae.uniforms=j,this.pointVAO.bind(),V.drawArrays(V.POINTS,0,this.pointCount),this.pointVAO.unbind()}if(this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0){var Ae=this.contourShader;Ae.bind(),Ae.uniforms=j,this.contourVAO.bind(),V.drawArrays(V.LINES,0,this.contourCount),this.contourVAO.unbind()}},z.drawPick=function(fe){fe=fe||{};for(var V=this.gl,Y=fe.model||R,ee=fe.view||R,q=fe.projection||R,oe=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],ae=0;ae<3;++ae)oe[0][ae]=Math.max(oe[0][ae],this.clipBounds[0][ae]),oe[1][ae]=Math.min(oe[1][ae],this.clipBounds[1][ae]);this._model=[].slice.call(Y),this._view=[].slice.call(ee),this._projection=[].slice.call(q),this._resolution=[V.drawingBufferWidth,V.drawingBufferHeight];var j={model:Y,view:ee,projection:q,clipBounds:oe,pickId:this.pickId/255},Q=this.pickShader;if(Q.bind(),Q.uniforms=j,this.triangleCount>0&&(this.triangleVAO.bind(),V.drawArrays(V.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),V.lineWidth(this.lineWidth*this.pixelRatio),V.drawArrays(V.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()),this.pointCount>0){var Q=this.pointPickShader;Q.bind(),Q.uniforms=j,this.pointVAO.bind(),V.drawArrays(V.POINTS,0,this.pointCount),this.pointVAO.unbind()}},z.pick=function(fe){if(!fe||fe.id!==this.pickId)return null;for(var V=fe.value[0]+256*fe.value[1]+65536*fe.value[2],Y=this.cells[V],ee=this.positions,q=new Array(Y.length),oe=0;oeMath.max(g,b)?d[2]=1:g>Math.max(M,b)?d[0]=1:d[1]=1;for(var u=0,y=0,f=0;f<3;++f)u+=A[f]*A[f],y+=d[f]*A[f];for(var f=0;f<3;++f)d[f]-=y/u*A[f];return s(d,d),d}function T(A,M,g,b,d,u,y,f){this.center=o(g),this.up=o(b),this.right=o(d),this.radius=o([u]),this.angle=o([y,f]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(A,M),this.computedCenter=this.center.curve(0),this.computedUp=this.up.curve(0),this.computedRight=this.right.curve(0),this.computedRadius=this.radius.curve(0),this.computedAngle=this.angle.curve(0),this.computedToward=[0,0,0],this.computedEye=[0,0,0],this.computedMatrix=new Array(16);for(var R=0;R<16;++R)this.computedMatrix[R]=.5;this.recalcMatrix(0)}var l=T.prototype;l.setDistanceLimits=function(A,M){A>0?A=Math.log(A):A=-1/0,M>0?M=Math.log(M):M=1/0,M=Math.max(M,A),this.radius.bounds[0][0]=A,this.radius.bounds[1][0]=M},l.getDistanceLimits=function(A){var M=this.radius.bounds[0];return A?(A[0]=Math.exp(M[0][0]),A[1]=Math.exp(M[1][0]),A):[Math.exp(M[0][0]),Math.exp(M[1][0])]},l.recalcMatrix=function(A){this.center.curve(A),this.up.curve(A),this.right.curve(A),this.radius.curve(A),this.angle.curve(A);for(var M=this.computedUp,g=this.computedRight,b=0,d=0,u=0;u<3;++u)d+=M[u]*g[u],b+=M[u]*M[u];for(var y=Math.sqrt(b),f=0,u=0;u<3;++u)g[u]-=M[u]*d/b,f+=g[u]*g[u],M[u]/=y;for(var R=Math.sqrt(f),u=0;u<3;++u)g[u]/=R;var L=this.computedToward;i(L,M,g),s(L,L);for(var z=Math.exp(this.computedRadius[0]),F=this.computedAngle[0],N=this.computedAngle[1],O=Math.cos(F),P=Math.sin(F),U=Math.cos(N),B=Math.sin(N),X=this.computedCenter,$=O*U,se=P*U,le=B,fe=-O*B,V=-P*B,Y=U,ee=this.computedEye,q=this.computedMatrix,u=0;u<3;++u){var oe=$*g[u]+se*L[u]+le*M[u];q[4*u+1]=fe*g[u]+V*L[u]+Y*M[u],q[4*u+2]=oe,q[4*u+3]=0}var ae=q[1],j=q[5],Q=q[9],re=q[2],ce=q[6],be=q[10],Ae=j*be-Q*ce,De=Q*re-ae*be,ze=ae*ce-j*re,Ze=c(Ae,De,ze);Ae/=Ze,De/=Ze,ze/=Ze,q[0]=Ae,q[4]=De,q[8]=ze;for(var u=0;u<3;++u)ee[u]=X[u]+q[2+4*u]*z;for(var u=0;u<3;++u){for(var f=0,at=0;at<3;++at)f+=q[u+4*at]*ee[at];q[12+u]=-f}q[15]=1},l.getMatrix=function(A,M){this.recalcMatrix(A);var g=this.computedMatrix;if(M){for(var b=0;b<16;++b)M[b]=g[b];return M}return g};var _=[0,0,0];l.rotate=function(A,M,g,b){if(this.angle.move(A,M,g),b){this.recalcMatrix(A);var d=this.computedMatrix;_[0]=d[2],_[1]=d[6],_[2]=d[10];for(var u=this.computedUp,y=this.computedRight,f=this.computedToward,R=0;R<3;++R)d[4*R]=u[R],d[4*R+1]=y[R],d[4*R+2]=f[R];n(d,d,b,_);for(var R=0;R<3;++R)u[R]=d[4*R],y[R]=d[4*R+1];this.up.set(A,u[0],u[1],u[2]),this.right.set(A,y[0],y[1],y[2])}},l.pan=function(A,M,g,b){M=M||0,g=g||0,b=b||0,this.recalcMatrix(A);var d=this.computedMatrix,u=Math.exp(this.computedRadius[0]),y=d[1],f=d[5],R=d[9],L=c(y,f,R);y/=L,f/=L,R/=L;var z=d[0],F=d[4],N=d[8],O=z*y+F*f+N*R;z-=y*O,F-=f*O,N-=R*O;var P=c(z,F,N);z/=P,F/=P,N/=P;var U=z*M+y*g,B=F*M+f*g,X=N*M+R*g;this.center.move(A,U,B,X);var $=Math.exp(this.computedRadius[0]);$=Math.max(1e-4,$+b),this.radius.set(A,Math.log($))},l.translate=function(A,M,g,b){this.center.move(A,M||0,g||0,b||0)},l.setMatrix=function(A,M,g,b){var d=1;typeof g=="number"&&(d=g|0),(d<0||d>3)&&(d=1);var u=(d+2)%3,y=(d+1)%3;M||(this.recalcMatrix(A),M=this.computedMatrix);var f=M[d],R=M[d+4],L=M[d+8];if(b){var F=Math.abs(f),N=Math.abs(R),O=Math.abs(L),P=Math.max(F,N,O);F===P?(f=f<0?-1:1,R=L=0):O===P?(L=L<0?-1:1,f=R=0):(R=R<0?-1:1,f=L=0)}else{var z=c(f,R,L);f/=z,R/=z,L/=z}var U=M[u],B=M[u+4],X=M[u+8],$=U*f+B*R+X*L;U-=f*$,B-=R*$,X-=L*$;var se=c(U,B,X);U/=se,B/=se,X/=se;var le=R*X-L*B,fe=L*U-f*X,V=f*B-R*U,Y=c(le,fe,V);le/=Y,fe/=Y,V/=Y,this.center.jump(A,ye,he,Oe),this.radius.idle(A),this.up.jump(A,f,R,L),this.right.jump(A,U,B,X);var ee,q;if(d===2){var oe=M[1],ae=M[5],j=M[9],Q=oe*U+ae*B+j*X,re=oe*le+ae*fe+j*V;De<0?ee=-Math.PI/2:ee=Math.PI/2,q=Math.atan2(re,Q)}else{var ce=M[2],be=M[6],Ae=M[10],De=ce*f+be*R+Ae*L,ze=ce*U+be*B+Ae*X,Ze=ce*le+be*fe+Ae*V;ee=Math.asin(m(De)),q=Math.atan2(Ze,ze)}this.angle.jump(A,q,ee),this.recalcMatrix(A);var at=M[2],nt=M[6],rt=M[10],st=this.computedMatrix;a(st,M);var Me=st[15],ye=st[12]/Me,he=st[13]/Me,Oe=st[14]/Me,tt=Math.exp(this.computedRadius[0]);this.center.jump(A,ye-at*tt,he-nt*tt,Oe-rt*tt)},l.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},l.idle=function(A){this.center.idle(A),this.up.idle(A),this.right.idle(A),this.radius.idle(A),this.angle.idle(A)},l.flush=function(A){this.center.flush(A),this.up.flush(A),this.right.flush(A),this.radius.flush(A),this.angle.flush(A)},l.setDistance=function(A,M){M>0&&this.radius.set(A,Math.log(M))},l.lookAt=function(A,M,g,b){this.recalcMatrix(A),M=M||this.computedEye,g=g||this.computedCenter,b=b||this.computedUp;var d=b[0],u=b[1],y=b[2],f=c(d,u,y);if(!(f<1e-6)){d/=f,u/=f,y/=f;var R=M[0]-g[0],L=M[1]-g[1],z=M[2]-g[2],F=c(R,L,z);if(!(F<1e-6)){R/=F,L/=F,z/=F;var N=this.computedRight,O=N[0],P=N[1],U=N[2],B=d*O+u*P+y*U;O-=B*d,P-=B*u,U-=B*y;var X=c(O,P,U);if(!(X<.01&&(O=u*z-y*L,P=y*R-d*z,U=d*L-u*R,X=c(O,P,U),X<1e-6))){O/=X,P/=X,U/=X,this.up.set(A,d,u,y),this.right.set(A,O,P,U),this.center.set(A,g[0],g[1],g[2]),this.radius.set(A,Math.log(F));var $=u*U-y*P,se=y*O-d*U,le=d*P-u*O,fe=c($,se,le);$/=fe,se/=fe,le/=fe;var V=d*R+u*L+y*z,Y=O*R+P*L+U*z,ee=$*R+se*L+le*z,q=Math.asin(m(V)),oe=Math.atan2(ee,Y),ae=this.angle._state,j=ae[ae.length-1],Q=ae[ae.length-2];j=j%(2*Math.PI);var re=Math.abs(j+2*Math.PI-oe),ce=Math.abs(j-oe),be=Math.abs(j-2*Math.PI-oe);re max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 clipBounds[2]; uniform sampler2D dashTexture; uniform float dashScale; uniform float opacity; varying vec3 worldPosition; varying float pixelArcLength; varying vec4 fragColor; void main() { if ( outOfRange(clipBounds[0], clipBounds[1], worldPosition) || fragColor.a * opacity == 0. ) discard; float dashWeight = texture2D(dashTexture, vec2(dashScale * pixelArcLength, 0)).r; if(dashWeight < 0.5) { discard; } gl_FragColor = fragColor * opacity; } `]),s=o([`precision highp float; #define GLSLIFY 1 #define FLOAT_MAX 1.70141184e38 #define FLOAT_MIN 1.17549435e-38 // https://github.com/mikolalysenko/glsl-read-float/blob/master/index.glsl vec4 packFloat(float v) { float av = abs(v); //Handle special cases if(av < FLOAT_MIN) { return vec4(0.0, 0.0, 0.0, 0.0); } else if(v > FLOAT_MAX) { return vec4(127.0, 128.0, 0.0, 0.0) / 255.0; } else if(v < -FLOAT_MAX) { return vec4(255.0, 128.0, 0.0, 0.0) / 255.0; } vec4 c = vec4(0,0,0,0); //Compute exponent and mantissa float e = floor(log2(av)); float m = av * pow(2.0, -e) - 1.0; //Unpack mantissa c[1] = floor(128.0 * m); m -= c[1] / 128.0; c[2] = floor(32768.0 * m); m -= c[2] / 32768.0; c[3] = floor(8388608.0 * m); //Unpack exponent float ebias = e + 127.0; c[0] = floor(ebias / 2.0); ebias -= c[0] * 2.0; c[1] += floor(ebias) * 128.0; //Unpack sign bit c[0] += 128.0 * step(0.0, -v); //Scale back to range return c / 255.0; } bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform float pickId; uniform vec3 clipBounds[2]; varying vec3 worldPosition; varying float pixelArcLength; varying vec4 fragColor; void main() { if (outOfRange(clipBounds[0], clipBounds[1], worldPosition)) discard; gl_FragColor = vec4(pickId/255.0, packFloat(pixelArcLength).xyz); }`]),h=[{name:"position",type:"vec3"},{name:"nextPosition",type:"vec3"},{name:"arcLength",type:"float"},{name:"lineWidth",type:"float"},{name:"color",type:"vec4"}];t.createShader=function(c){return a(c,n,i,null,h)},t.createPickShader=function(c){return a(c,n,s,null,h)}},7352:function(e,t,r){"use strict";var o=r(5721),a=r(4750),n=r(2690);e.exports=i;function i(s){var h=s.length;if(h===0)return[];if(h===1)return[[0]];var c=s[0].length;return c===0?[]:c===1?o(s):c===2?a(s):n(s,c)}},7399:function(e){e.exports=t;function t(r,o){var a=o[0],n=o[1],i=o[2],s=o[3],h=a+a,c=n+n,m=i+i,p=a*h,T=n*h,l=n*c,_=i*h,w=i*c,A=i*m,M=s*h,g=s*c,b=s*m;return r[0]=1-l-A,r[1]=T+b,r[2]=_-g,r[3]=0,r[4]=T-b,r[5]=1-p-A,r[6]=w+M,r[7]=0,r[8]=_+g,r[9]=w-M,r[10]=1-p-l,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r}},7417:function(e){e.exports=t;function t(r,o,a){return r[0]=Math.max(o[0],a[0]),r[1]=Math.max(o[1],a[1]),r[2]=Math.max(o[2],a[2]),r}},7442:function(e,t,r){var o=r(6658),a=r(7182),n=r(2652),i=r(9921),s=r(8648),h=T(),c=T(),m=T();e.exports=p;function p(w,A,M,g){if(i(A)===0||i(M)===0)return!1;var b=n(A,h.translate,h.scale,h.skew,h.perspective,h.quaternion),d=n(M,c.translate,c.scale,c.skew,c.perspective,c.quaternion);return!b||!d?!1:(o(m.translate,h.translate,c.translate,g),o(m.skew,h.skew,c.skew,g),o(m.scale,h.scale,c.scale,g),o(m.perspective,h.perspective,c.perspective,g),s(m.quaternion,h.quaternion,c.quaternion,g),a(w,m.translate,m.scale,m.skew,m.perspective,m.quaternion),!0)}function T(){return{translate:l(),scale:l(1),skew:l(),perspective:_(),quaternion:_()}}function l(w){return[w||0,w||0,w||0]}function _(){return[0,0,0,1]}},7507:function(e,t){"use strict";t.byteLength=c,t.toByteArray=p,t.fromByteArray=_;for(var r=[],o=[],a=typeof Uint8Array<"u"?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,s=n.length;i0)throw new Error("Invalid string. Length must be a multiple of 4");var M=w.indexOf("=");M===-1&&(M=A);var g=M===A?0:4-M%4;return[M,g]}function c(w){var A=h(w),M=A[0],g=A[1];return(M+g)*3/4-g}function m(w,A,M){return(A+M)*3/4-M}function p(w){var A,M=h(w),g=M[0],b=M[1],d=new a(m(w,g,b)),u=0,y=b>0?g-4:g,f;for(f=0;f>16&255,d[u++]=A>>8&255,d[u++]=A&255;return b===2&&(A=o[w.charCodeAt(f)]<<2|o[w.charCodeAt(f+1)]>>4,d[u++]=A&255),b===1&&(A=o[w.charCodeAt(f)]<<10|o[w.charCodeAt(f+1)]<<4|o[w.charCodeAt(f+2)]>>2,d[u++]=A>>8&255,d[u++]=A&255),d}function T(w){return r[w>>18&63]+r[w>>12&63]+r[w>>6&63]+r[w&63]}function l(w,A,M){for(var g,b=[],d=A;dy?y:u+d));return g===1?(A=w[M-1],b.push(r[A>>2]+r[A<<4&63]+"==")):g===2&&(A=(w[M-2]<<8)+w[M-1],b.push(r[A>>10]+r[A>>4&63]+r[A<<2&63]+"=")),b.join("")}},7518:function(e,t,r){"use strict";var o=r(1433);function a(s,h,c,m,p,T){this.location=s,this.dimension=h,this.a=c,this.b=m,this.c=p,this.d=T}a.prototype.bind=function(s){switch(this.dimension){case 1:s.vertexAttrib1f(this.location,this.a);break;case 2:s.vertexAttrib2f(this.location,this.a,this.b);break;case 3:s.vertexAttrib3f(this.location,this.a,this.b,this.c);break;case 4:s.vertexAttrib4f(this.location,this.a,this.b,this.c,this.d);break}};function n(s,h,c){this.gl=s,this._ext=h,this.handle=c,this._attribs=[],this._useElements=!1,this._elementsType=s.UNSIGNED_SHORT}n.prototype.bind=function(){this._ext.bindVertexArrayOES(this.handle);for(var s=0;s1.0001)return null;f+=y[M]}return Math.abs(f-1)>.001?null:[g,h(m,y),y]}},7636:function(e){e.exports=t;function t(r,o){o=o||1;var a=Math.random()*2*Math.PI,n=Math.random()*2-1,i=Math.sqrt(1-n*n)*o;return r[0]=Math.cos(a)*i,r[1]=Math.sin(a)*i,r[2]=n*o,r}},7640:function(e,t,r){"use strict";var o=r(1888);function a(p){switch(p){case"uint32":return[o.mallocUint32,o.freeUint32];default:return null}}var n={"uint32,1,0":function(p,T){return function(_,w,A,M,g,b,d,u,y,f,R){var L,z,F,N=_*g+M,O,P=p(u),U,B,X,$;for(L=_+1;L<=w;++L){for(z=L,N+=g,F=N,U=0,B=N,O=0;O_;){U=0,B=F-g;t:for(O=0;O$)break t;B+=f,U+=R}for(U=F,B=F-g,O=0;O>1,P=O-z,U=O+z,B=F,X=P,$=O,se=U,le=N,fe=w+1,V=A-1,Y=!0,ee,q,oe,ae,j,Q,re,ce,be,Ae=0,De=0,ze=0,Ze,at,nt,rt,st,Me,ye,he,Oe,tt,ot,Qe,Pt,It,qt,Wt,kr=y,mr=T(kr),qr=T(kr);at=b*B,nt=b*X,Wt=g;e:for(Ze=0;Ze0){q=B,B=X,X=q;break e}if(ze<0)break e;Wt+=R}at=b*se,nt=b*le,Wt=g;e:for(Ze=0;Ze0){q=se,se=le,le=q;break e}if(ze<0)break e;Wt+=R}at=b*B,nt=b*$,Wt=g;e:for(Ze=0;Ze0){q=B,B=$,$=q;break e}if(ze<0)break e;Wt+=R}at=b*X,nt=b*$,Wt=g;e:for(Ze=0;Ze0){q=X,X=$,$=q;break e}if(ze<0)break e;Wt+=R}at=b*B,nt=b*se,Wt=g;e:for(Ze=0;Ze0){q=B,B=se,se=q;break e}if(ze<0)break e;Wt+=R}at=b*$,nt=b*se,Wt=g;e:for(Ze=0;Ze0){q=$,$=se,se=q;break e}if(ze<0)break e;Wt+=R}at=b*X,nt=b*le,Wt=g;e:for(Ze=0;Ze0){q=X,X=le,le=q;break e}if(ze<0)break e;Wt+=R}at=b*X,nt=b*$,Wt=g;e:for(Ze=0;Ze0){q=X,X=$,$=q;break e}if(ze<0)break e;Wt+=R}at=b*se,nt=b*le,Wt=g;e:for(Ze=0;Ze0){q=se,se=le,le=q;break e}if(ze<0)break e;Wt+=R}for(at=b*B,nt=b*X,rt=b*$,st=b*se,Me=b*le,ye=b*F,he=b*O,Oe=b*N,qt=0,Wt=g,Ze=0;Ze0)V--;else if(ze<0){for(at=b*Q,nt=b*fe,rt=b*V,Wt=g,Ze=0;Ze0)for(;;){re=g+V*b,qt=0;e:for(Ze=0;Ze0){if(--VN){e:for(;;){for(re=g+fe*b,qt=0,Wt=g,Ze=0;Ze1&&_?A(l,_[0],_[1]):A(l)}var c={"uint32,1,0":function(p,T){return function(l){var _=l.data,w=l.offset|0,A=l.shape,M=l.stride,g=M[0]|0,b=A[0]|0,d=M[1]|0,u=A[1]|0,y=d,f=d,R=1;b<=32?p(0,b-1,_,w,g,d,b,u,y,f,R):T(0,b-1,_,w,g,d,b,u,y,f,R)}}};function m(p,T){var l=[T,p].join(","),_=c[l],w=i(p,T),A=h(p,T,w);return _(w,A)}e.exports=m},7642:function(e,t,r){"use strict";var o=r(8954),a=r(1682);e.exports=h;function n(c,m){this.point=c,this.index=m}function i(c,m){for(var p=c.point,T=m.point,l=p.length,_=0;_=2)return!1;F[O]=P}return!0}):z=z.filter(function(F){for(var N=0;N<=T;++N){var O=y[F[N]];if(O<0)return!1;F[N]=O}return!0}),T&1)for(var w=0;w",U="",B=P.length,X=U.length,$=F[0]===_||F[0]===M,se=0,le=-X;se>-1&&(se=N.indexOf(P,se),!(se===-1||(le=N.indexOf(U,se+B),le===-1)||le<=se));){for(var fe=se;fe=le)O[fe]=null,N=N.substr(0,fe)+" "+N.substr(fe+1);else if(O[fe]!==null){var V=O[fe].indexOf(F[0]);V===-1?O[fe]+=F:$&&(O[fe]=O[fe].substr(0,V+1)+(1+parseInt(O[fe][V+1]))+O[fe].substr(V+2))}var Y=se+B,ee=N.substr(Y,le-Y),q=ee.indexOf(P);q!==-1?se=q:se=le+X}return O}function d(z,F,N){for(var O=F.textAlign||"start",P=F.textBaseline||"alphabetic",U=[1<<30,1<<30],B=[0,0],X=z.length,$=0;$/g,` `):N=N.replace(/\/g," ");var B="",X=[];for(j=0;j-1?parseInt(he[1+ot]):0,It=Qe>-1?parseInt(Oe[1+Qe]):0;Pt!==It&&(tt=tt.replace(ze(),"?px "),ce*=Math.pow(.75,It-Pt),tt=tt.replace("?px ",ze())),re+=.25*V*(It-Pt)}if(U.superscripts===!0){var qt=he.indexOf(_),Wt=Oe.indexOf(_),kr=qt>-1?parseInt(he[1+qt]):0,mr=Wt>-1?parseInt(Oe[1+Wt]):0;kr!==mr&&(tt=tt.replace(ze(),"?px "),ce*=Math.pow(.75,mr-kr),tt=tt.replace("?px ",ze())),re-=.25*V*(mr-kr)}if(U.bolds===!0){var qr=he.indexOf(m)>-1,Sr=Oe.indexOf(m)>-1;!qr&&Sr&&(Rr?tt=tt.replace("italic ","italic bold "):tt="bold "+tt),qr&&!Sr&&(tt=tt.replace("bold ",""))}if(U.italics===!0){var Rr=he.indexOf(T)>-1,wt=Oe.indexOf(T)>-1;!Rr&&wt&&(tt="italic "+tt),Rr&&!wt&&(tt=tt.replace("italic ",""))}F.font=tt}for(ae=0;ae0&&(P=O.size),O.lineSpacing&&O.lineSpacing>0&&(U=O.lineSpacing),O.styletags&&O.styletags.breaklines&&(B.breaklines=!!O.styletags.breaklines),O.styletags&&O.styletags.bolds&&(B.bolds=!!O.styletags.bolds),O.styletags&&O.styletags.italics&&(B.italics=!!O.styletags.italics),O.styletags&&O.styletags.subscripts&&(B.subscripts=!!O.styletags.subscripts),O.styletags&&O.styletags.superscripts&&(B.superscripts=!!O.styletags.superscripts)),N.font=[O.fontStyle,O.fontVariant,O.fontWeight,P+"px",O.font].filter(function($){return $}).join(" "),N.textAlign="start",N.textBaseline="alphabetic",N.direction="ltr";var X=u(F,N,z,P,U,B);return R(X,O,P)}},7721:function(e,t,r){"use strict";var o=r(5716);e.exports=a;function a(n){return o(n[0])*o(n[1])}},7765:function(e,t,r){"use strict";e.exports=l;var o=r(9618),a=r(1888),n=r(446),i=r(1570);function s(_){for(var w=_.length,A=0,M=0;M"u"&&(M=s(_));var g=_.length;if(g===0||M<1)return{cells:[],vertexIds:[],vertexWeights:[]};var b=h(w,+A),d=c(_,M),u=m(d,w,b,+A),y=p(d,w.length|0),f=i(M)(_,d.data,y,b),R=T(d),L=[].slice.call(u.data,0,u.shape[0]);return a.free(b),a.free(d.data),a.free(u.data),a.free(y),{cells:f,vertexIds:R,vertexWeights:L}}},7766:function(e,t,r){"use strict";var o=r(9618),a=r(5298),n=r(1888);e.exports=u;var i=null,s=null,h=null;function c(y){i=[y.LINEAR,y.NEAREST_MIPMAP_LINEAR,y.LINEAR_MIPMAP_NEAREST,y.LINEAR_MIPMAP_NEAREST],s=[y.NEAREST,y.LINEAR,y.NEAREST_MIPMAP_NEAREST,y.NEAREST_MIPMAP_LINEAR,y.LINEAR_MIPMAP_NEAREST,y.LINEAR_MIPMAP_LINEAR],h=[y.REPEAT,y.CLAMP_TO_EDGE,y.MIRRORED_REPEAT]}function m(y){return typeof HTMLCanvasElement<"u"&&y instanceof HTMLCanvasElement||typeof HTMLImageElement<"u"&&y instanceof HTMLImageElement||typeof HTMLVideoElement<"u"&&y instanceof HTMLVideoElement||typeof ImageData<"u"&&y instanceof ImageData}var p=function(y,f){a.muls(y,f,255)};function T(y,f,R){var L=y.gl,z=L.getParameter(L.MAX_TEXTURE_SIZE);if(f<0||f>z||R<0||R>z)throw new Error("gl-texture2d: Invalid texture size");return y._shape=[f,R],y.bind(),L.texImage2D(L.TEXTURE_2D,0,y.format,f,R,0,y.format,y.type,null),y._mipLevels=[0],y}function l(y,f,R,L,z,F){this.gl=y,this.handle=f,this.format=z,this.type=F,this._shape=[R,L],this._mipLevels=[0],this._magFilter=y.NEAREST,this._minFilter=y.NEAREST,this._wrapS=y.CLAMP_TO_EDGE,this._wrapT=y.CLAMP_TO_EDGE,this._anisoSamples=1;var N=this,O=[this._wrapS,this._wrapT];Object.defineProperties(O,[{get:function(){return N._wrapS},set:function(U){return N.wrapS=U}},{get:function(){return N._wrapT},set:function(U){return N.wrapT=U}}]),this._wrapVector=O;var P=[this._shape[0],this._shape[1]];Object.defineProperties(P,[{get:function(){return N._shape[0]},set:function(U){return N.width=U}},{get:function(){return N._shape[1]},set:function(U){return N.height=U}}]),this._shapeVector=P}var _=l.prototype;Object.defineProperties(_,{minFilter:{get:function(){return this._minFilter},set:function(y){this.bind();var f=this.gl;if(this.type===f.FLOAT&&i.indexOf(y)>=0&&(f.getExtension("OES_texture_float_linear")||(y=f.NEAREST)),s.indexOf(y)<0)throw new Error("gl-texture2d: Unknown filter mode "+y);return f.texParameteri(f.TEXTURE_2D,f.TEXTURE_MIN_FILTER,y),this._minFilter=y}},magFilter:{get:function(){return this._magFilter},set:function(y){this.bind();var f=this.gl;if(this.type===f.FLOAT&&i.indexOf(y)>=0&&(f.getExtension("OES_texture_float_linear")||(y=f.NEAREST)),s.indexOf(y)<0)throw new Error("gl-texture2d: Unknown filter mode "+y);return f.texParameteri(f.TEXTURE_2D,f.TEXTURE_MAG_FILTER,y),this._magFilter=y}},mipSamples:{get:function(){return this._anisoSamples},set:function(y){var f=this._anisoSamples;if(this._anisoSamples=Math.max(y,1)|0,f!==this._anisoSamples){var R=this.gl.getExtension("EXT_texture_filter_anisotropic");R&&this.gl.texParameterf(this.gl.TEXTURE_2D,R.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(y){if(this.bind(),h.indexOf(y)<0)throw new Error("gl-texture2d: Unknown wrap mode "+y);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,y),this._wrapS=y}},wrapT:{get:function(){return this._wrapT},set:function(y){if(this.bind(),h.indexOf(y)<0)throw new Error("gl-texture2d: Unknown wrap mode "+y);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,y),this._wrapT=y}},wrap:{get:function(){return this._wrapVector},set:function(y){if(Array.isArray(y)||(y=[y,y]),y.length!==2)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var f=0;f<2;++f)if(h.indexOf(y[f])<0)throw new Error("gl-texture2d: Unknown wrap mode "+y);this._wrapS=y[0],this._wrapT=y[1];var R=this.gl;return this.bind(),R.texParameteri(R.TEXTURE_2D,R.TEXTURE_WRAP_S,this._wrapS),R.texParameteri(R.TEXTURE_2D,R.TEXTURE_WRAP_T,this._wrapT),y}},shape:{get:function(){return this._shapeVector},set:function(y){if(!Array.isArray(y))y=[y|0,y|0];else if(y.length!==2)throw new Error("gl-texture2d: Invalid texture shape");return T(this,y[0]|0,y[1]|0),[y[0]|0,y[1]|0]}},width:{get:function(){return this._shape[0]},set:function(y){return y=y|0,T(this,y,this._shape[1]),y}},height:{get:function(){return this._shape[1]},set:function(y){return y=y|0,T(this,this._shape[0],y),y}}}),_.bind=function(y){var f=this.gl;return y!==void 0&&f.activeTexture(f.TEXTURE0+(y|0)),f.bindTexture(f.TEXTURE_2D,this.handle),y!==void 0?y|0:f.getParameter(f.ACTIVE_TEXTURE)-f.TEXTURE0},_.dispose=function(){this.gl.deleteTexture(this.handle)},_.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var y=Math.min(this._shape[0],this._shape[1]),f=0;y>0;++f,y>>>=1)this._mipLevels.indexOf(f)<0&&this._mipLevels.push(f)},_.setPixels=function(y,f,R,L){var z=this.gl;this.bind(),Array.isArray(f)?(L=R,R=f[1]|0,f=f[0]|0):(f=f||0,R=R||0),L=L||0;var F=m(y)?y:y.raw;if(F){var N=this._mipLevels.indexOf(L)<0;N?(z.texImage2D(z.TEXTURE_2D,0,this.format,this.format,this.type,F),this._mipLevels.push(L)):z.texSubImage2D(z.TEXTURE_2D,L,f,R,this.format,this.type,F)}else if(y.shape&&y.stride&&y.data){if(y.shape.length<2||f+y.shape[1]>this._shape[1]>>>L||R+y.shape[0]>this._shape[0]>>>L||f<0||R<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");A(z,f,R,L,this.format,this.type,this._mipLevels,y)}else throw new Error("gl-texture2d: Unsupported data type")};function w(y,f){return y.length===3?f[2]===1&&f[1]===y[0]*y[2]&&f[0]===y[2]:f[0]===1&&f[1]===y[0]}function A(y,f,R,L,z,F,N,O){var P=O.dtype,U=O.shape.slice();if(U.length<2||U.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var B=0,X=0,$=w(U,O.stride.slice());P==="float32"?B=y.FLOAT:P==="float64"?(B=y.FLOAT,$=!1,P="float32"):P==="uint8"?B=y.UNSIGNED_BYTE:(B=y.UNSIGNED_BYTE,$=!1,P="uint8");var se=1;if(U.length===2)X=y.LUMINANCE,U=[U[0],U[1],1],O=o(O.data,U,[O.stride[0],O.stride[1],1],O.offset);else if(U.length===3){if(U[2]===1)X=y.ALPHA;else if(U[2]===2)X=y.LUMINANCE_ALPHA;else if(U[2]===3)X=y.RGB;else if(U[2]===4)X=y.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");se=U[2]}else throw new Error("gl-texture2d: Invalid shape for texture");if((X===y.LUMINANCE||X===y.ALPHA)&&(z===y.LUMINANCE||z===y.ALPHA)&&(X=z),X!==z)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var le=O.size,fe=N.indexOf(L)<0;if(fe&&N.push(L),B===F&&$)O.offset===0&&O.data.length===le?fe?y.texImage2D(y.TEXTURE_2D,L,z,U[0],U[1],0,z,F,O.data):y.texSubImage2D(y.TEXTURE_2D,L,f,R,U[0],U[1],z,F,O.data):fe?y.texImage2D(y.TEXTURE_2D,L,z,U[0],U[1],0,z,F,O.data.subarray(O.offset,O.offset+le)):y.texSubImage2D(y.TEXTURE_2D,L,f,R,U[0],U[1],z,F,O.data.subarray(O.offset,O.offset+le));else{var V;F===y.FLOAT?V=n.mallocFloat32(le):V=n.mallocUint8(le);var Y=o(V,U,[U[2],U[2]*U[0],1]);B===y.FLOAT&&F===y.UNSIGNED_BYTE?p(Y,O):a.assign(Y,O),fe?y.texImage2D(y.TEXTURE_2D,L,z,U[0],U[1],0,z,F,V.subarray(0,le)):y.texSubImage2D(y.TEXTURE_2D,L,f,R,U[0],U[1],z,F,V.subarray(0,le)),F===y.FLOAT?n.freeFloat32(V):n.freeUint8(V)}}function M(y){var f=y.createTexture();return y.bindTexture(y.TEXTURE_2D,f),y.texParameteri(y.TEXTURE_2D,y.TEXTURE_MIN_FILTER,y.NEAREST),y.texParameteri(y.TEXTURE_2D,y.TEXTURE_MAG_FILTER,y.NEAREST),y.texParameteri(y.TEXTURE_2D,y.TEXTURE_WRAP_S,y.CLAMP_TO_EDGE),y.texParameteri(y.TEXTURE_2D,y.TEXTURE_WRAP_T,y.CLAMP_TO_EDGE),f}function g(y,f,R,L,z){var F=y.getParameter(y.MAX_TEXTURE_SIZE);if(f<0||f>F||R<0||R>F)throw new Error("gl-texture2d: Invalid texture shape");if(z===y.FLOAT&&!y.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var N=M(y);return y.texImage2D(y.TEXTURE_2D,0,L,f,R,0,L,z,null),new l(y,N,f,R,L,z)}function b(y,f,R,L,z,F){var N=M(y);return y.texImage2D(y.TEXTURE_2D,0,z,z,F,f),new l(y,N,R,L,z,F)}function d(y,f){var R=f.dtype,L=f.shape.slice(),z=y.getParameter(y.MAX_TEXTURE_SIZE);if(L[0]<0||L[0]>z||L[1]<0||L[1]>z)throw new Error("gl-texture2d: Invalid texture size");var F=w(L,f.stride.slice()),N=0;R==="float32"?N=y.FLOAT:R==="float64"?(N=y.FLOAT,F=!1,R="float32"):R==="uint8"?N=y.UNSIGNED_BYTE:(N=y.UNSIGNED_BYTE,F=!1,R="uint8");var O=0;if(L.length===2)O=y.LUMINANCE,L=[L[0],L[1],1],f=o(f.data,L,[f.stride[0],f.stride[1],1],f.offset);else if(L.length===3)if(L[2]===1)O=y.ALPHA;else if(L[2]===2)O=y.LUMINANCE_ALPHA;else if(L[2]===3)O=y.RGB;else if(L[2]===4)O=y.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");else throw new Error("gl-texture2d: Invalid shape for texture");N===y.FLOAT&&!y.getExtension("OES_texture_float")&&(N=y.UNSIGNED_BYTE,F=!1);var P,U,B=f.size;if(F)f.offset===0&&f.data.length===B?P=f.data:P=f.data.subarray(f.offset,f.offset+B);else{var X=[L[2],L[2]*L[0],1];U=n.malloc(B,R);var $=o(U,L,X,0);(R==="float32"||R==="float64")&&N===y.UNSIGNED_BYTE?p($,f):a.assign($,f),P=U.subarray(0,B)}var se=M(y);return y.texImage2D(y.TEXTURE_2D,0,O,L[0],L[1],0,O,N,P),F||n.free(U),new l(y,se,L[0],L[1],O,N)}function u(y){if(arguments.length<=1)throw new Error("gl-texture2d: Missing arguments for texture2d constructor");if(i||c(y),typeof arguments[1]=="number")return g(y,arguments[1],arguments[2],arguments[3]||y.RGBA,arguments[4]||y.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return g(y,arguments[1][0]|0,arguments[1][1]|0,arguments[2]||y.RGBA,arguments[3]||y.UNSIGNED_BYTE);if(typeof arguments[1]=="object"){var f=arguments[1],R=m(f)?f:f.raw;if(R)return b(y,R,f.width|0,f.height|0,arguments[2]||y.RGBA,arguments[3]||y.UNSIGNED_BYTE);if(f.shape&&f.data&&f.stride)return d(y,f)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")}},7790:function(){},7815:function(e,t,r){"use strict";var o=r(2931),a=r(9970),n=["xyz","xzy","yxz","yzx","zxy","zyx"],i=function(A,M,g,b){for(var d=A.points,u=A.velocities,y=A.divergences,f=[],R=[],L=[],z=[],F=[],N=[],O=0,P=0,U=a.create(),B=a.create(),X=8,$=0;$0)for(var V=0;VM)return b-1}return b},c=function(A,M,g){return Ag?g:A},m=function(A,M,g){var b=M.vectors,d=M.meshgrid,u=A[0],y=A[1],f=A[2],R=d[0].length,L=d[1].length,z=d[2].length,F=h(d[0],u),N=h(d[1],y),O=h(d[2],f),P=F+1,U=N+1,B=O+1;if(F=c(F,0,R-1),P=c(P,0,R-1),N=c(N,0,L-1),U=c(U,0,L-1),O=c(O,0,z-1),B=c(B,0,z-1),F<0||N<0||O<0||P>R-1||U>L-1||B>z-1)return o.create();var X=d[0][F],$=d[0][P],se=d[1][N],le=d[1][U],fe=d[2][O],V=d[2][B],Y=(u-X)/($-X),ee=(y-se)/(le-se),q=(f-fe)/(V-fe);isFinite(Y)||(Y=.5),isFinite(ee)||(ee=.5),isFinite(q)||(q=.5);var oe,ae,j,Q,re,ce;switch(g.reversedX&&(F=R-1-F,P=R-1-P),g.reversedY&&(N=L-1-N,U=L-1-U),g.reversedZ&&(O=z-1-O,B=z-1-B),g.filled){case 5:re=O,ce=B,j=N*z,Q=U*z,oe=F*z*L,ae=P*z*L;break;case 4:re=O,ce=B,oe=F*z,ae=P*z,j=N*z*R,Q=U*z*R;break;case 3:j=N,Q=U,re=O*L,ce=B*L,oe=F*L*z,ae=P*L*z;break;case 2:j=N,Q=U,oe=F*L,ae=P*L,re=O*L*R,ce=B*L*R;break;case 1:oe=F,ae=P,re=O*R,ce=B*R,j=N*R*z,Q=U*R*z;break;default:oe=F,ae=P,j=N*R,Q=U*R,re=O*R*L,ce=B*R*L;break}var be=b[oe+j+re],Ae=b[oe+j+ce],De=b[oe+Q+re],ze=b[oe+Q+ce],Ze=b[ae+j+re],at=b[ae+j+ce],nt=b[ae+Q+re],rt=b[ae+Q+ce],st=o.create(),Me=o.create(),ye=o.create(),he=o.create();o.lerp(st,be,Ze,Y),o.lerp(Me,Ae,at,Y),o.lerp(ye,De,nt,Y),o.lerp(he,ze,rt,Y);var Oe=o.create(),tt=o.create();o.lerp(Oe,st,ye,ee),o.lerp(tt,Me,he,ee);var ot=o.create();return o.lerp(ot,Oe,tt,q),ot},p=function(A,M){var g=M[0],b=M[1],d=M[2];return A[0]=g<0?-g:g,A[1]=b<0?-b:b,A[2]=d<0?-d:d,A},T=function(A){var M=1/0;A.sort(function(u,y){return u-y});for(var g=A.length,b=1;bP||rtU||stB)},$=o.distance(M[0],M[1]),se=10*$/b,le=se*se,fe=1,V=0,Y=g.length;Y>1&&(fe=l(g));for(var ee=0;eeV&&(V=be),re.push(be),z.push({points:oe,velocities:ae,divergences:re});for(var Ae=0;Aele&&o.scale(De,De,se/Math.sqrt(ze)),o.add(De,De,q),j=R(De),o.squaredDistance(Q,De)-le>-1e-4*le){oe.push(De),Q=De,ae.push(j);var ce=L(De,j),be=o.length(ce);isFinite(be)&&be>V&&(V=be),re.push(be)}q=De}}var Ze=s(z,A.colormap,V,fe);return u?Ze.tubeScale=u:(V===0&&(V=1),Ze.tubeScale=d*.5*fe/V),Ze};var _=r(6740),w=r(6405).createMesh;e.exports.createTubeMesh=function(A,M){return w(A,M,{shaders:_,traceType:"streamtube"})}},7827:function(e){e.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},7842:function(e,t,r){"use strict";var o=r(6330),a=r(1533),n=r(2651),i=r(6768),s=r(869),h=r(8697);e.exports=c;function c(m,p){if(o(m))return p?h(m,c(p)):[m[0].clone(),m[1].clone()];var T=0,l,_;if(a(m))l=m.clone();else if(typeof m=="string")l=i(m);else{if(m===0)return[n(0),n(1)];if(m===Math.floor(m))l=n(m);else{for(;m!==Math.floor(m);)m=m*Math.pow(2,256),T-=256;l=n(m)}}if(o(p))l.mul(p[1]),_=p[0].clone();else if(a(p))_=p.clone();else if(typeof p=="string")_=i(p);else if(!p)_=n(1);else if(p===Math.floor(p))_=n(p);else{for(;p!==Math.floor(p);)p=p*Math.pow(2,256),T+=256;_=n(p)}return T>0?l=l.ushln(T):T<0&&(_=_.ushln(-T)),s(l,_)}},7894:function(e){e.exports=t;function t(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=1,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=1,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r}},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"])},7960:function(e){e.exports=t;function t(r,o){var a=o[0]-r[0],n=o[1]-r[1],i=o[2]-r[2],s=o[3]-r[3];return a*a+n*n+i*i+s*s}},8105:function(e){"use strict";e.exports=r;var t={"lo===p0":o,"lo=p0)&&!(p1>=hi)":c};function r(m){return t[m]}function o(m,p,T,l,_,w,A){for(var M=2*m,g=M*T,b=g,d=T,u=p,y=m+p,f=T;l>f;++f,g+=M){var R=_[g+u];if(R===A)if(d===f)d+=1,b+=M;else{for(var L=0;M>L;++L){var z=_[g+L];_[g+L]=_[b],_[b++]=z}var F=w[f];w[f]=w[d],w[d++]=F}}return d}function a(m,p,T,l,_,w,A){for(var M=2*m,g=M*T,b=g,d=T,u=p,y=m+p,f=T;l>f;++f,g+=M){var R=_[g+u];if(RL;++L){var z=_[g+L];_[g+L]=_[b],_[b++]=z}var F=w[f];w[f]=w[d],w[d++]=F}}return d}function n(m,p,T,l,_,w,A){for(var M=2*m,g=M*T,b=g,d=T,u=p,y=m+p,f=T;l>f;++f,g+=M){var R=_[g+y];if(R<=A)if(d===f)d+=1,b+=M;else{for(var L=0;M>L;++L){var z=_[g+L];_[g+L]=_[b],_[b++]=z}var F=w[f];w[f]=w[d],w[d++]=F}}return d}function i(m,p,T,l,_,w,A){for(var M=2*m,g=M*T,b=g,d=T,u=p,y=m+p,f=T;l>f;++f,g+=M){var R=_[g+y];if(R<=A)if(d===f)d+=1,b+=M;else{for(var L=0;M>L;++L){var z=_[g+L];_[g+L]=_[b],_[b++]=z}var F=w[f];w[f]=w[d],w[d++]=F}}return d}function s(m,p,T,l,_,w,A){for(var M=2*m,g=M*T,b=g,d=T,u=p,y=m+p,f=T;l>f;++f,g+=M){var R=_[g+u],L=_[g+y];if(R<=A&&A<=L)if(d===f)d+=1,b+=M;else{for(var z=0;M>z;++z){var F=_[g+z];_[g+z]=_[b],_[b++]=F}var N=w[f];w[f]=w[d],w[d++]=N}}return d}function h(m,p,T,l,_,w,A){for(var M=2*m,g=M*T,b=g,d=T,u=p,y=m+p,f=T;l>f;++f,g+=M){var R=_[g+u],L=_[g+y];if(Rz;++z){var F=_[g+z];_[g+z]=_[b],_[b++]=F}var N=w[f];w[f]=w[d],w[d++]=N}}return d}function c(m,p,T,l,_,w,A,M){for(var g=2*m,b=g*T,d=b,u=T,y=p,f=m+p,R=T;l>R;++R,b+=g){var L=_[b+y],z=_[b+f];if(!(L>=A)&&!(M>=z))if(u===R)u+=1,d+=g;else{for(var F=0;g>F;++F){var N=_[b+F];_[b+F]=_[d],_[d++]=N}var O=w[R];w[R]=w[u],w[u++]=O}}return u}},8107:function(e){e.exports=t;function t(r,o,a){return r[0]=Math.min(o[0],a[0]),r[1]=Math.min(o[1],a[1]),r[2]=Math.min(o[2],a[2]),r}},8116:function(e,t,r){"use strict";var o=r(7518),a=r(870);function n(s){this.bindVertexArrayOES=s.bindVertexArray.bind(s),this.createVertexArrayOES=s.createVertexArray.bind(s),this.deleteVertexArrayOES=s.deleteVertexArray.bind(s)}function i(s,h,c,m){var p=s.createVertexArray?new n(s):s.getExtension("OES_vertex_array_object"),T;return p?T=o(s,p):T=a(s),T.update(h,c,m),T}e.exports=i},8192:function(e,t,r){e.exports=i;var o=r(2825),a=r(3536),n=r(244);function i(s,h){var c=o(s[0],s[1],s[2]),m=o(h[0],h[1],h[2]);a(c,c),a(m,m);var p=n(c,m);return p>1?0:Math.acos(p)}},8210:function(e){"use strict";e.exports=r;function t(o,a){var n=o+a,i=n-o,s=n-i,h=a-i,c=o-s,m=c+h;return m?[m,n]:[n]}function r(o,a){var n=o.length|0,i=a.length|0;if(n===1&&i===1)return t(o[0],a[0]);var s=n+i,h=new Array(s),c=0,m=0,p=0,T=Math.abs,l=o[m],_=T(l),w=a[p],A=T(w),M,g;_=i?(M=l,m+=1,mc)for(var R=h[l],L=1/Math.sqrt(d*y),f=0;f<3;++f){var z=(f+1)%3,F=(f+2)%3;R[f]+=L*(u[z]*b[F]-u[F]*b[z])}}for(var m=0;mc)for(var L=1/Math.sqrt(N),f=0;f<3;++f)R[f]*=L;else for(var f=0;f<3;++f)R[f]=0}return h},t.faceNormals=function(a,n,i){for(var s=a.length,h=new Array(s),c=i===void 0?o:i,m=0;mc?M=1/Math.sqrt(M):M=0;for(var l=0;l<3;++l)A[l]*=M;h[m]=A}return h}},8418:function(e,t,r){"use strict";var o=r(5219),a=r(2762),n=r(8116),i=r(1888),s=r(6760),h=r(1283),c=r(9366),m=r(5964),p=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],T=ArrayBuffer,l=DataView;function _(q){return T.isView(q)&&!(q instanceof l)}function w(q){return Array.isArray(q)||_(q)}e.exports=ee;function A(q,oe){var ae=q[0],j=q[1],Q=q[2],re=q[3];return q[0]=oe[0]*ae+oe[4]*j+oe[8]*Q+oe[12]*re,q[1]=oe[1]*ae+oe[5]*j+oe[9]*Q+oe[13]*re,q[2]=oe[2]*ae+oe[6]*j+oe[10]*Q+oe[14]*re,q[3]=oe[3]*ae+oe[7]*j+oe[11]*Q+oe[15]*re,q}function M(q,oe,ae,j){return A(j,j,ae),A(j,j,oe),A(j,j,q)}function g(q,oe){this.index=q,this.dataCoordinate=this.position=oe}function b(q){return q===!0||q>1?1:q}function d(q,oe,ae,j,Q,re,ce,be,Ae,De,ze,Ze){this.gl=q,this.pixelRatio=1,this.shader=oe,this.orthoShader=ae,this.projectShader=j,this.pointBuffer=Q,this.colorBuffer=re,this.glyphBuffer=ce,this.idBuffer=be,this.vao=Ae,this.vertexCount=0,this.lineVertexCount=0,this.opacity=1,this.hasAlpha=!1,this.lineWidth=0,this.projectScale=[.6666666666666666,.6666666666666666,.6666666666666666],this.projectOpacity=[1,1,1],this.projectHasAlpha=!1,this.pickId=0,this.pickPerspectiveShader=De,this.pickOrthoShader=ze,this.pickProjectShader=Ze,this.points=[],this._selectResult=new g(0,[0,0,0]),this.useOrtho=!0,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.axesProject=[!0,!0,!0],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.highlightId=[1,1,1,1],this.highlightScale=2,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.dirty=!0}var u=d.prototype;u.pickSlots=1,u.setPickBase=function(q){this.pickId=q},u.isTransparent=function(){if(this.hasAlpha)return!0;for(var q=0;q<3;++q)if(this.axesProject[q]&&this.projectHasAlpha)return!0;return!1},u.isOpaque=function(){if(!this.hasAlpha)return!0;for(var q=0;q<3;++q)if(this.axesProject[q]&&!this.projectHasAlpha)return!0;return!1};var y=[0,0],f=[0,0,0],R=[0,0,0],L=[0,0,0,1],z=[0,0,0,1],F=p.slice(),N=[0,0,0],O=[[0,0,0],[0,0,0]];function P(q){return q[0]=q[1]=q[2]=0,q}function U(q,oe){return q[0]=oe[0],q[1]=oe[1],q[2]=oe[2],q[3]=1,q}function B(q,oe,ae,j){return q[0]=oe[0],q[1]=oe[1],q[2]=oe[2],q[ae]=j,q}function X(q){for(var oe=O,ae=0;ae<2;++ae)for(var j=0;j<3;++j)oe[ae][j]=Math.max(Math.min(q[ae][j],1e8),-1e8);return oe}function $(q,oe,ae,j){var Q=oe.axesProject,re=oe.gl,ce=q.uniforms,be=ae.model||p,Ae=ae.view||p,De=ae.projection||p,ze=oe.axesBounds,Ze=X(oe.clipBounds),at;oe.axes&&oe.axes.lastCubeProps?at=oe.axes.lastCubeProps.axis:at=[1,1,1],y[0]=2/re.drawingBufferWidth,y[1]=2/re.drawingBufferHeight,q.bind(),ce.view=Ae,ce.projection=De,ce.screenSize=y,ce.highlightId=oe.highlightId,ce.highlightScale=oe.highlightScale,ce.clipBounds=Ze,ce.pickGroup=oe.pickId/255,ce.pixelRatio=j;for(var nt=0;nt<3;++nt)if(Q[nt]){ce.scale=oe.projectScale[nt],ce.opacity=oe.projectOpacity[nt];for(var rt=F,st=0;st<16;++st)rt[st]=0;for(var st=0;st<4;++st)rt[5*st]=1;rt[5*nt]=0,at[nt]<0?rt[12+nt]=ze[0][nt]:rt[12+nt]=ze[1][nt],s(rt,be,rt),ce.model=rt;var Me=(nt+1)%3,ye=(nt+2)%3,he=P(f),Oe=P(R);he[Me]=1,Oe[ye]=1;var tt=M(De,Ae,be,U(L,he)),ot=M(De,Ae,be,U(z,Oe));if(Math.abs(tt[1])>Math.abs(ot[1])){var Qe=tt;tt=ot,ot=Qe,Qe=he,he=Oe,Oe=Qe;var Pt=Me;Me=ye,ye=Pt}tt[0]<0&&(he[Me]=-1),ot[1]>0&&(Oe[ye]=-1);for(var It=0,qt=0,st=0;st<4;++st)It+=Math.pow(be[4*Me+st],2),qt+=Math.pow(be[4*ye+st],2);he[Me]/=Math.sqrt(It),Oe[ye]/=Math.sqrt(qt),ce.axes[0]=he,ce.axes[1]=Oe,ce.fragClipBounds[0]=B(N,Ze[0],nt,-1e8),ce.fragClipBounds[1]=B(N,Ze[1],nt,1e8),oe.vao.bind(),oe.vao.draw(re.TRIANGLES,oe.vertexCount),oe.lineWidth>0&&(re.lineWidth(oe.lineWidth*j),oe.vao.draw(re.LINES,oe.lineVertexCount,oe.vertexCount)),oe.vao.unbind()}}var se=[-1e8,-1e8,-1e8],le=[1e8,1e8,1e8],fe=[se,le];function V(q,oe,ae,j,Q,re,ce){var be=ae.gl;if((re===ae.projectHasAlpha||ce)&&$(oe,ae,j,Q),re===ae.hasAlpha||ce){q.bind();var Ae=q.uniforms;Ae.model=j.model||p,Ae.view=j.view||p,Ae.projection=j.projection||p,y[0]=2/be.drawingBufferWidth,y[1]=2/be.drawingBufferHeight,Ae.screenSize=y,Ae.highlightId=ae.highlightId,Ae.highlightScale=ae.highlightScale,Ae.fragClipBounds=fe,Ae.clipBounds=ae.axes.bounds,Ae.opacity=ae.opacity,Ae.pickGroup=ae.pickId/255,Ae.pixelRatio=Q,ae.vao.bind(),ae.vao.draw(be.TRIANGLES,ae.vertexCount),ae.lineWidth>0&&(be.lineWidth(ae.lineWidth*Q),ae.vao.draw(be.LINES,ae.lineVertexCount,ae.vertexCount)),ae.vao.unbind()}}u.draw=function(q){var oe=this.useOrtho?this.orthoShader:this.shader;V(oe,this.projectShader,this,q,this.pixelRatio,!1,!1)},u.drawTransparent=function(q){var oe=this.useOrtho?this.orthoShader:this.shader;V(oe,this.projectShader,this,q,this.pixelRatio,!0,!1)},u.drawPick=function(q){var oe=this.useOrtho?this.pickOrthoShader:this.pickPerspectiveShader;V(oe,this.pickProjectShader,this,q,1,!0,!0)},u.pick=function(q){if(!q||q.id!==this.pickId)return null;var oe=q.value[2]+(q.value[1]<<8)+(q.value[0]<<16);if(oe>=this.pointCount||oe<0)return null;var ae=this.points[oe],j=this._selectResult;j.index=oe;for(var Q=0;Q<3;++Q)j.position[Q]=j.dataCoordinate[Q]=ae[Q];return j},u.highlight=function(q){if(!q)this.highlightId=[1,1,1,1];else{var oe=q.index,ae=oe&255,j=oe>>8&255,Q=oe>>16&255;this.highlightId=[ae/255,j/255,Q/255,0]}};function Y(q,oe,ae,j){var Q;w(q)?oe0){var Rr=0,wt=ye,Ne=[0,0,0,1],Ke=[0,0,0,1],Te=w(at)&&w(at[0]),Ie=w(st)&&w(st[0]);e:for(var j=0;j0?1-qt[0][0]:_t<0?1+qt[1][0]:1,Ct*=Ct>0?1-qt[0][1]:Ct<0?1+qt[1][1]:1;for(var ir=[_t,Ct],Da=Pt.cells||[],Ia=Pt.positions||[],ot=0;ot=i?(M=l,m+=1,m0?1:0}},8648:function(e,t,r){e.exports=r(783)},8692:function(e){e.exports=t;function t(r,o,a,n){var i=a[0],s=a[1],h=o[0]-i,c=o[1]-s,m=Math.sin(n),p=Math.cos(n);return r[0]=i+h*p-c*m,r[1]=s+h*m+c*p,r[2]=o[2],r}},8697:function(e,t,r){"use strict";var o=r(869);e.exports=a;function a(n,i){return o(n[0].mul(i[1]),n[1].mul(i[0]))}},8731:function(e,t,r){"use strict";e.exports=c;var o=r(8866);function a(m,p,T,l,_,w){this._gl=m,this._wrapper=p,this._index=T,this._locations=l,this._dimension=_,this._constFunc=w}var n=a.prototype;n.pointer=function(p,T,l,_){var w=this,A=w._gl,M=w._locations[w._index];A.vertexAttribPointer(M,w._dimension,p||A.FLOAT,!!T,l||0,_||0),A.enableVertexAttribArray(M)},n.set=function(m,p,T,l){return this._constFunc(this._locations[this._index],m,p,T,l)},Object.defineProperty(n,"location",{get:function(){return this._locations[this._index]},set:function(m){return m!==this._locations[this._index]&&(this._locations[this._index]=m|0,this._wrapper.program=null),m|0}});var i=[function(m,p,T){return T.length===void 0?m.vertexAttrib1f(p,T):m.vertexAttrib1fv(p,T)},function(m,p,T,l){return T.length===void 0?m.vertexAttrib2f(p,T,l):m.vertexAttrib2fv(p,T)},function(m,p,T,l,_){return T.length===void 0?m.vertexAttrib3f(p,T,l,_):m.vertexAttrib3fv(p,T)},function(m,p,T,l,_,w){return T.length===void 0?m.vertexAttrib4f(p,T,l,_,w):m.vertexAttrib4fv(p,T)}];function s(m,p,T,l,_,w,A){var M=i[_],g=new a(m,p,T,l,_,M);Object.defineProperty(w,A,{set:function(b){return m.disableVertexAttribArray(l[T]),M(m,l[T],b),b},get:function(){return g},enumerable:!0})}function h(m,p,T,l,_,w,A){for(var M=new Array(_),g=new Array(_),b=0;b<_;++b)s(m,p,T[b],l,_,M,b),g[b]=M[b];Object.defineProperty(M,"location",{set:function(y){if(Array.isArray(y))for(var f=0;f<_;++f)g[f].location=y[f];else for(var f=0;f<_;++f)g[f].location=y+f;return y},get:function(){for(var y=new Array(_),f=0;f<_;++f)y[f]=l[T[f]];return y},enumerable:!0}),M.pointer=function(y,f,R,L){y=y||m.FLOAT,f=!!f,R=R||_*_,L=L||0;for(var z=0;z<_;++z){var F=l[T[z]];m.vertexAttribPointer(F,_,y,f,R,L+z*_),m.enableVertexAttribArray(F)}};var d=new Array(_),u=m["vertexAttrib"+_+"fv"];Object.defineProperty(w,A,{set:function(y){for(var f=0;f<_;++f){var R=l[T[f]];if(m.disableVertexAttribArray(R),Array.isArray(y[0]))u.call(m,R,y[f]);else{for(var L=0;L<_;++L)d[L]=y[_*f+L];u.call(m,R,d)}}return y},get:function(){return M},enumerable:!0})}function c(m,p,T,l){for(var _={},w=0,A=T.length;w=0){var u=b.charCodeAt(b.length-1)-48;if(u<2||u>4)throw new o("","Invalid data type for attribute "+g+": "+b);s(m,p,d[0],l,u,_,g)}else if(b.indexOf("mat")>=0){var u=b.charCodeAt(b.length-1)-48;if(u<2||u>4)throw new o("","Invalid data type for attribute "+g+": "+b);h(m,p,d,l,u,_,g)}else throw new o("","Unknown data type for attribute "+g+": "+b);break}}return _}},8828:function(e,t){"use strict";"use restrict";var r=32;t.INT_BITS=r,t.INT_MAX=2147483647,t.INT_MIN=-1<0)-(n<0)},t.abs=function(n){var i=n>>r-1;return(n^i)-i},t.min=function(n,i){return i^(n^i)&-(n65535)<<4,n>>>=i,s=(n>255)<<3,n>>>=s,i|=s,s=(n>15)<<2,n>>>=s,i|=s,s=(n>3)<<1,n>>>=s,i|=s,i|n>>1},t.log10=function(n){return n>=1e9?9:n>=1e8?8:n>=1e7?7:n>=1e6?6:n>=1e5?5:n>=1e4?4:n>=1e3?3:n>=100?2:n>=10?1:0},t.popCount=function(n){return n=n-(n>>>1&1431655765),n=(n&858993459)+(n>>>2&858993459),(n+(n>>>4)&252645135)*16843009>>>24};function o(n){var i=32;return n&=-n,n&&i--,n&65535&&(i-=16),n&16711935&&(i-=8),n&252645135&&(i-=4),n&858993459&&(i-=2),n&1431655765&&(i-=1),i}t.countTrailingZeros=o,t.nextPow2=function(n){return n+=n===0,--n,n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n+1},t.prevPow2=function(n){return n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n-(n>>>1)},t.parity=function(n){return n^=n>>>16,n^=n>>>8,n^=n>>>4,n&=15,27030>>>n&1};var a=new Array(256);(function(n){for(var i=0;i<256;++i){var s=i,h=i,c=7;for(s>>>=1;s;s>>>=1)h<<=1,h|=s&1,--c;n[i]=h<>>8&255]<<16|a[n>>>16&255]<<8|a[n>>>24&255]},t.interleave2=function(n,i){return n&=65535,n=(n|n<<8)&16711935,n=(n|n<<4)&252645135,n=(n|n<<2)&858993459,n=(n|n<<1)&1431655765,i&=65535,i=(i|i<<8)&16711935,i=(i|i<<4)&252645135,i=(i|i<<2)&858993459,i=(i|i<<1)&1431655765,n|i<<1},t.deinterleave2=function(n,i){return n=n>>>i&1431655765,n=(n|n>>>1)&858993459,n=(n|n>>>2)&252645135,n=(n|n>>>4)&16711935,n=(n|n>>>16)&65535,n<<16>>16},t.interleave3=function(n,i,s){return n&=1023,n=(n|n<<16)&4278190335,n=(n|n<<8)&251719695,n=(n|n<<4)&3272356035,n=(n|n<<2)&1227133513,i&=1023,i=(i|i<<16)&4278190335,i=(i|i<<8)&251719695,i=(i|i<<4)&3272356035,i=(i|i<<2)&1227133513,n|=i<<1,s&=1023,s=(s|s<<16)&4278190335,s=(s|s<<8)&251719695,s=(s|s<<4)&3272356035,s=(s|s<<2)&1227133513,n|s<<2},t.deinterleave3=function(n,i){return n=n>>>i&1227133513,n=(n|n>>>2)&3272356035,n=(n|n>>>4)&251719695,n=(n|n>>>8)&4278190335,n=(n|n>>>16)&1023,n<<22>>22},t.nextCombination=function(n){var i=n|n-1;return i+1|(~i&-~i)-1>>>o(n)+1}},8866:function(e){function t(r,o,a){this.shortMessage=o||"",this.longMessage=a||"",this.rawError=r||"",this.message="gl-shader: "+(o||r||"")+(a?` `+a:""),this.stack=new Error().stack}t.prototype=new Error,t.prototype.name="GLError",t.prototype.constructor=t,e.exports=t},8902:function(e,t,r){"use strict";var o=r(2478),a=r(3250)[3],n=0,i=1,s=2;e.exports=A;function h(M,g,b,d,u){this.a=M,this.b=g,this.idx=b,this.lowerIds=d,this.upperIds=u}function c(M,g,b,d){this.a=M,this.b=g,this.type=b,this.idx=d}function m(M,g){var b=M.a[0]-g.a[0]||M.a[1]-g.a[1]||M.type-g.type;return b||M.type!==n&&(b=a(M.a,M.b,g.b),b)?b:M.idx-g.idx}function p(M,g){return a(M.a,M.b,g)}function T(M,g,b,d,u){for(var y=o.lt(g,d,p),f=o.gt(g,d,p),R=y;R1&&a(b[z[N-2]],b[z[N-1]],d)>0;)M.push([z[N-1],z[N-2],u]),N-=1;z.length=N,z.push(u);for(var F=L.upperIds,N=F.length;N>1&&a(b[F[N-2]],b[F[N-1]],d)<0;)M.push([F[N-2],F[N-1],u]),N-=1;F.length=N,F.push(u)}}function l(M,g){var b;return M.a[0]L[0]&&u.push(new c(L,R,s,y),new c(R,L,i,y))}u.sort(m);for(var z=u[0].a[0]-(1+Math.abs(u[0].a[0]))*Math.pow(2,-52),F=[new h([z,1],[z,0],-1,[],[],[],[])],N=[],y=0,O=u.length;y0;){_=d.pop();for(var u=_.adjacent,y=0;y<=A;++y){var f=u[y];if(!(!f.boundary||f.lastVisited<=-M)){for(var R=f.vertices,L=0;L<=A;++L){var z=R[L];z<0?g[L]=w:g[L]=b[z]}var F=this.orient();if(F>0)return f;f.lastVisited=-M,F===0&&d.push(f)}}}return null},T.walk=function(_,w){var A=this.vertices.length-1,M=this.dimension,g=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 y=u.vertices,f=u.adjacent,R=0;R<=M;++R)b[R]=g[y[R]];u.lastVisited=A;for(var R=0;R<=M;++R){var L=f[R];if(!(L.lastVisited>=A)){var z=b[R];b[R]=_;var F=this.orient();if(b[R]=z,F<0){u=L;continue e}else L.boundary?L.lastVisited=-A:L.lastVisited=A}}return}return u},T.addPeaks=function(_,w){var A=this.vertices.length-1,M=this.dimension,g=this.vertices,b=this.tuple,d=this.interior,u=this.simplices,y=[w];w.lastVisited=A,w.vertices[w.vertices.indexOf(-1)]=A,w.boundary=!1,d.push(w);for(var f=[];y.length>0;){var w=y.pop(),R=w.vertices,L=w.adjacent,z=R.indexOf(A);if(!(z<0)){for(var F=0;F<=M;++F)if(F!==z){var N=L[F];if(!(!N.boundary||N.lastVisited>=A)){var O=N.vertices;if(N.lastVisited!==-A){for(var P=0,U=0;U<=M;++U)O[U]<0?(P=U,b[U]=_):b[U]=g[O[U]];var B=this.orient();if(B>0){O[P]=A,N.boundary=!1,d.push(N),y.push(N),N.lastVisited=A;continue}else N.lastVisited=-A}var X=N.adjacent,$=R.slice(),se=L.slice(),le=new n($,se,!0);u.push(le);var fe=X.indexOf(w);if(!(fe<0)){X[fe]=le,se[z]=N,$[F]=-1,se[F]=w,L[F]=le,le.flip();for(var U=0;U<=M;++U){var V=$[U];if(!(V<0||V===A)){for(var Y=new Array(M-1),ee=0,q=0;q<=M;++q){var oe=$[q];oe<0||q===U||(Y[ee++]=oe)}f.push(new i(Y,le,U))}}}}}}}f.sort(s);for(var F=0;F+1=0?d[y++]=u[R]:f=R&1;if(f===(_&1)){var L=d[0];d[0]=d[1],d[1]=L}w.push(d)}}return w};function l(_,w){var A=_.length;if(A===0)throw new Error("Must have at least d+1 points");var M=_[0].length;if(A<=M)throw new Error("Must input at least d+1 points");var g=_.slice(0,M+1),b=o.apply(void 0,g);if(b===0)throw new Error("Input not in general position");for(var d=new Array(M+1),u=0;u<=M;++u)d[u]=u;b<0&&(d[0]=1,d[1]=0);for(var y=new n(d,new Array(M+1),!1),f=y.adjacent,R=new Array(M+2),u=0;u<=M;++u){for(var L=d.slice(),z=0;z<=M;++z)z===u&&(L[z]=-1);var F=L[0];L[0]=L[1],L[1]=F;var N=new n(L,new Array(M+1),!0);f[u]=N,R[u]=N}R[M+1]=y;for(var u=0;u<=M;++u)for(var L=f[u].vertices,O=f[u].adjacent,z=0;z<=M;++z){var P=L[z];if(P<0){O[z]=y;continue}for(var U=0;U<=M;++U)f[U].vertices.indexOf(P)<0&&(O[z]=f[U])}for(var B=new p(M,g,R),X=!!w,u=M+1;u=1},l.isTransparent=function(){return this.opacity<1},l.pickSlots=1,l.setPickBase=function(b){this.pickId=b};function _(b){for(var d=m({colormap:b,nshades:256,format:"rgba"}),u=new Uint8Array(256*4),y=0;y<256;++y){for(var f=d[y],R=0;R<3;++R)u[4*y+R]=f[R];u[4*y+3]=f[3]*255}return c(u,[256,256,4],[4,0,1])}function w(b){for(var d=b.length,u=new Array(d),y=0;y0){var U=this.triShader;U.bind(),U.uniforms=z,this.triangleVAO.bind(),d.drawArrays(d.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}},l.drawPick=function(b){b=b||{};for(var d=this.gl,u=b.model||p,y=b.view||p,f=b.projection||p,R=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],L=0;L<3;++L)R[0][L]=Math.max(R[0][L],this.clipBounds[0][L]),R[1][L]=Math.min(R[1][L],this.clipBounds[1][L]);this._model=[].slice.call(u),this._view=[].slice.call(y),this._projection=[].slice.call(f),this._resolution=[d.drawingBufferWidth,d.drawingBufferHeight];var z={model:u,view:y,projection:f,clipBounds:R,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},F=this.pickShader;F.bind(),F.uniforms=z,this.triangleCount>0&&(this.triangleVAO.bind(),d.drawArrays(d.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind())},l.pick=function(b){if(!b||b.id!==this.pickId)return null;var d=b.value[0]+256*b.value[1]+65536*b.value[2],u=this.cells[d],y=this.positions[u[1]].slice(0,3),f={position:y,dataCoordinate:y,index:Math.floor(u[1]/48)};return this.traceType==="cone"?f.index=Math.floor(u[1]/48):this.traceType==="streamtube"&&(f.intensity=this.intensity[u[1]],f.velocity=this.vectors[u[1]].slice(0,3),f.divergence=this.vectors[u[1]][3],f.index=d),f},l.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.pickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleVectors.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleIds.dispose()};function A(b,d){var u=o(b,d.meshShader.vertex,d.meshShader.fragment,null,d.meshShader.attributes);return u.attributes.position.location=0,u.attributes.color.location=2,u.attributes.uv.location=3,u.attributes.vector.location=4,u}function M(b,d){var u=o(b,d.pickShader.vertex,d.pickShader.fragment,null,d.pickShader.attributes);return u.attributes.position.location=0,u.attributes.id.location=1,u.attributes.vector.location=4,u}function g(b,d,u){var y=u.shaders;arguments.length===1&&(d=b,b=d.gl);var f=A(b,y),R=M(b,y),L=i(b,c(new Uint8Array([255,255,255,255]),[1,1,4]));L.generateMipmap(),L.minFilter=b.LINEAR_MIPMAP_LINEAR,L.magFilter=b.LINEAR;var z=a(b),F=a(b),N=a(b),O=a(b),P=a(b),U=n(b,[{buffer:z,type:b.FLOAT,size:4},{buffer:P,type:b.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:N,type:b.FLOAT,size:4},{buffer:O,type:b.FLOAT,size:2},{buffer:F,type:b.FLOAT,size:4}]),B=new T(b,L,f,R,z,F,P,N,O,U,u.traceType||"cone");return B.update(d),B}e.exports=g},9127:function(e,t,r){"use strict";e.exports=n;var o=r(6204),a=r(5771);function n(i){return a(o(i))}},9131:function(e,t,r){var o=r(5177),a=r(9288);e.exports=n;function n(i,s){return s=s||1,i[0]=Math.random(),i[1]=Math.random(),i[2]=Math.random(),i[3]=Math.random(),o(i,i),a(i,i,s),i}},9165:function(e,t,r){"use strict";e.exports=T;var o=r(2762),a=r(8116),n=r(3436),i=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function s(l,_,w,A){this.gl=l,this.shader=A,this.buffer=_,this.vao=w,this.pixelRatio=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lineWidth=[1,1,1],this.capSize=[10,10,10],this.lineCount=[0,0,0],this.lineOffset=[0,0,0],this.opacity=1,this.hasAlpha=!1}var h=s.prototype;h.isOpaque=function(){return!this.hasAlpha},h.isTransparent=function(){return this.hasAlpha},h.drawTransparent=h.draw=function(l){var _=this.gl,w=this.shader.uniforms;this.shader.bind();var A=w.view=l.view||i,M=w.projection=l.projection||i;w.model=l.model||i,w.clipBounds=this.clipBounds,w.opacity=this.opacity;var g=A[12],b=A[13],d=A[14],u=A[15],y=l._ortho||!1,f=y?2:1,R=f*this.pixelRatio*(M[3]*g+M[7]*b+M[11]*d+M[15]*u)/_.drawingBufferHeight;this.vao.bind();for(var L=0;L<3;++L)_.lineWidth(this.lineWidth[L]*this.pixelRatio),w.capSize=this.capSize[L]*R,this.lineCount[L]&&_.drawArrays(_.LINES,this.lineOffset[L],this.lineCount[L]);this.vao.unbind()};function c(l,_){for(var w=0;w<3;++w)l[0][w]=Math.min(l[0][w],_[w]),l[1][w]=Math.max(l[1][w],_[w])}var m=function(){for(var l=new Array(3),_=0;_<3;++_){for(var w=[],A=1;A<=2;++A)for(var M=-1;M<=1;M+=2){var g=(A+_)%3,b=[0,0,0];b[g]=M,w.push(b)}l[_]=w}return l}();function p(l,_,w,A){for(var M=m[A],g=0;g0){var z=y.slice();z[d]+=R[1][d],M.push(y[0],y[1],y[2],L[0],L[1],L[2],L[3],0,0,0,z[0],z[1],z[2],L[0],L[1],L[2],L[3],0,0,0),c(this.bounds,z),b+=2+p(M,z,L,d)}}}this.lineCount[d]=b-this.lineOffset[d]}this.buffer.update(M)}},h.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()};function T(l){var _=l.gl,w=o(_),A=a(_,[{buffer:w,type:_.FLOAT,size:3,offset:0,stride:40},{buffer:w,type:_.FLOAT,size:4,offset:12,stride:40},{buffer:w,type:_.FLOAT,size:3,offset:28,stride:40}]),M=n(_);M.attributes.position.location=0,M.attributes.color.location=1,M.attributes.offset.location=2;var g=new s(_,w,A,M);return g.update(l),g}},9215:function(e,t,r){"use strict";e.exports=c;var o=r(4769),a=r(2478);function n(m,p,T){return Math.min(p,Math.max(m,T))}function i(m,p,T){this.dimension=m.length,this.bounds=[new Array(this.dimension),new Array(this.dimension)];for(var l=0;l=T-1)for(var b=w.length-1,u=m-p[T-1],d=0;d=T-1)for(var g=w.length-1,b=m-p[T-1],d=0;d=0;--T)if(m[--p])return!1;return!0},s.jump=function(m){var p=this.lastT(),T=this.dimension;if(!(m0;--d)l.push(n(M[d-1],g[d-1],arguments[d])),_.push(0)}},s.push=function(m){var p=this.lastT(),T=this.dimension;if(!(m1e-6?1/A:0;this._time.push(m);for(var u=T;u>0;--u){var y=n(g[u-1],b[u-1],arguments[u]);l.push(y),_.push((y-l[w++])*d)}}},s.set=function(m){var p=this.dimension;if(!(m0;--M)T.push(n(w[M-1],A[M-1],arguments[M])),l.push(0)}},s.move=function(m){var p=this.lastT(),T=this.dimension;if(!(m<=p||arguments.length!==T+1)){var l=this._state,_=this._velocity,w=l.length-this.dimension,A=this.bounds,M=A[0],g=A[1],b=m-p,d=b>1e-6?1/b:0;this._time.push(m);for(var u=T;u>0;--u){var y=arguments[u];l.push(n(M[u-1],g[u-1],l[w++]+y)),_.push(y*d)}}},s.idle=function(m){var p=this.lastT();if(!(m=0;--d)l.push(n(M[d],g[d],l[w]+b*_[w])),_.push(0),w+=1}};function h(m){for(var p=new Array(m),T=0;T1&&i.indexOf("Macintosh")!==-1&&i.indexOf("Safari")!==-1&&(s=!0),s}},9226:function(e){e.exports=t;function t(r,o){return r[0]=Math.ceil(o[0]),r[1]=Math.ceil(o[1]),r[2]=Math.ceil(o[2]),r}},9265:function(e){e.exports=t;function t(r,o){return r[0]===o[0]&&r[1]===o[1]&&r[2]===o[2]}},9288:function(e){e.exports=t;function t(r,o,a){return r[0]=o[0]*a,r[1]=o[1]*a,r[2]=o[2]*a,r[3]=o[3]*a,r}},9346:function(e){"use strict";var t=new Float64Array(4),r=new Float64Array(4),o=new Float64Array(4);function a(n,i,s,h,c){t.length=p?(u=1,f=p+2*_+A):(u=-_/p,f=_*u+A)):(u=0,w>=0?(y=0,f=A):-w>=l?(y=1,f=l+2*w+A):(y=-w/l,f=w*y+A));else if(y<0)y=0,_>=0?(u=0,f=A):-_>=p?(u=1,f=p+2*_+A):(u=-_/p,f=_*u+A);else{var R=1/d;u*=R,y*=R,f=u*(p*u+T*y+2*_)+y*(T*u+l*y+2*w)+A}else{var L,z,F,N;u<0?(L=T+_,z=l+w,z>L?(F=z-L,N=p-2*T+l,F>=N?(u=1,y=0,f=p+2*_+A):(u=F/N,y=1-u,f=u*(p*u+T*y+2*_)+y*(T*u+l*y+2*w)+A)):(u=0,z<=0?(y=1,f=l+2*w+A):w>=0?(y=0,f=A):(y=-w/l,f=w*y+A))):y<0?(L=T+w,z=p+_,z>L?(F=z-L,N=p-2*T+l,F>=N?(y=1,u=0,f=l+2*w+A):(y=F/N,u=1-y,f=u*(p*u+T*y+2*_)+y*(T*u+l*y+2*w)+A)):(y=0,z<=0?(u=1,f=p+2*_+A):_>=0?(u=0,f=A):(u=-_/p,f=_*u+A))):(F=l+w-T-_,F<=0?(u=0,y=1,f=l+2*w+A):(N=p-2*T+l,F>=N?(u=1,y=0,f=p+2*_+A):(u=F/N,y=1-u,f=u*(p*u+T*y+2*_)+y*(T*u+l*y+2*w)+A)))}for(var O=1-u-y,m=0;mw)for(l=w;l<_;l++)this.gl.enableVertexAttribArray(l);else if(w>_)for(l=_;l=0){for(var O=N.type.charAt(N.type.length-1)|0,P=new Array(O),U=0;U=0;)B+=1;z[F]=B}var X=new Array(w.length);function $(){g.program=i.program(b,g._vref,g._fref,L,z);for(var se=0;seae&&Q>0){var re=(j[Q][0]-ae)/(j[Q][0]-j[Q-1][0]);return j[Q][1]*(1-re)+re*j[Q-1][1]}}return 1}var U=[0,0,0],B={showSurface:!1,showContour:!1,projections:[f.slice(),f.slice(),f.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function X(ae,j){var Q,re,ce,be=j.axes&&j.axes.lastCubeProps.axis||U,Ae=j.showSurface,De=j.showContour;for(Q=0;Q<3;++Q)for(Ae=Ae||j.surfaceProject[Q],re=0;re<3;++re)De=De||j.contourProject[Q][re];for(Q=0;Q<3;++Q){var ze=B.projections[Q];for(re=0;re<16;++re)ze[re]=0;for(re=0;re<4;++re)ze[5*re]=1;ze[5*Q]=0,ze[12+Q]=j.axesBounds[+(be[Q]>0)][Q],l(ze,ae.model,ze);var Ze=B.clipBounds[Q];for(ce=0;ce<2;++ce)for(re=0;re<3;++re)Ze[ce][re]=ae.clipBounds[ce][re];Ze[0][Q]=-1e8,Ze[1][Q]=1e8}return B.showSurface=Ae,B.showContour=De,B}var $={model:f,view:f,projection:f,inverseModel:f.slice(),lowerBound:[0,0,0],upperBound:[0,0,0],colorMap:0,clipBounds:[[0,0,0],[0,0,0]],height:0,contourTint:0,contourColor:[0,0,0,1],permutation:[1,0,0,0,1,0,0,0,1],zOffset:-1e-4,objectOffset:[0,0,0],kambient:1,kdiffuse:1,kspecular:1,lightPosition:[1e3,1e3,1e3],eyePosition:[0,0,0],roughness:1,fresnel:1,opacity:1,vertexColor:0},se=f.slice(),le=[1,0,0,0,1,0,0,0,1];function fe(ae,j){ae=ae||{};var Q=this.gl;Q.disable(Q.CULL_FACE),this._colorMap.bind(0);var re=$;re.model=ae.model||f,re.view=ae.view||f,re.projection=ae.projection||f,re.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],re.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],re.objectOffset=this.objectOffset,re.contourColor=this.contourColor[0],re.inverseModel=_(re.inverseModel,re.model);for(var ce=0;ce<2;++ce)for(var be=re.clipBounds[ce],Ae=0;Ae<3;++Ae)be[Ae]=Math.min(Math.max(this.clipBounds[ce][Ae],-1e8),1e8);re.kambient=this.ambientLight,re.kdiffuse=this.diffuseLight,re.kspecular=this.specularLight,re.roughness=this.roughness,re.fresnel=this.fresnel,re.opacity=this.opacity,re.height=0,re.permutation=le,re.vertexColor=this.vertexColor;var De=se;for(l(De,re.view,re.model),l(De,re.projection,De),_(De,De),ce=0;ce<3;++ce)re.eyePosition[ce]=De[12+ce]/De[15];var ze=De[15];for(ce=0;ce<3;++ce)ze+=this.lightPosition[ce]*De[4*ce+3];for(ce=0;ce<3;++ce){var Ze=De[12+ce];for(Ae=0;Ae<3;++Ae)Ze+=De[4*Ae+ce]*this.lightPosition[Ae];re.lightPosition[ce]=Ze/ze}var at=X(re,this);if(at.showSurface){for(this._shader.bind(),this._shader.uniforms=re,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(Q.TRIANGLES,this._vertexCount),ce=0;ce<3;++ce)!this.surfaceProject[ce]||!this.vertexCount||(this._shader.uniforms.model=at.projections[ce],this._shader.uniforms.clipBounds=at.clipBounds[ce],this._vao.draw(Q.TRIANGLES,this._vertexCount));this._vao.unbind()}if(at.showContour){var nt=this._contourShader;re.kambient=1,re.kdiffuse=0,re.kspecular=0,re.opacity=1,nt.bind(),nt.uniforms=re;var rt=this._contourVAO;for(rt.bind(),ce=0;ce<3;++ce)for(nt.uniforms.permutation=L[ce],Q.lineWidth(this.contourWidth[ce]*this.pixelRatio),Ae=0;Ae>4)/16)/255,ce=Math.floor(re),be=re-ce,Ae=j[1]*(ae.value[1]+(ae.value[2]&15)/16)/255,De=Math.floor(Ae),ze=Ae-De;ce+=1,De+=1;var Ze=Q.position;Ze[0]=Ze[1]=Ze[2]=0;for(var at=0;at<2;++at)for(var nt=at?be:1-be,rt=0;rt<2;++rt)for(var st=rt?ze:1-ze,Me=ce+at,ye=De+rt,he=nt*st,Oe=0;Oe<3;++Oe)Ze[Oe]+=this._field[Oe].get(Me,ye)*he;for(var tt=this._pickResult.level,ot=0;ot<3;++ot)if(tt[ot]=w.le(this.contourLevels[ot],Ze[ot]),tt[ot]<0)this.contourLevels[ot].length>0&&(tt[ot]=0);else if(tt[ot]Math.abs(Pt-Ze[ot])&&(tt[ot]+=1)}for(Q.index[0]=be<.5?ce:ce+1,Q.index[1]=ze<.5?De:De+1,Q.uv[0]=re/j[0],Q.uv[1]=Ae/j[1],Oe=0;Oe<3;++Oe)Q.dataCoordinate[Oe]=this._field[Oe].get(Q.index[0],Q.index[1]);return Q},O.padField=function(ae,j){var Q=j.shape.slice(),re=ae.shape.slice();c.assign(ae.lo(1,1).hi(Q[0],Q[1]),j),c.assign(ae.lo(1).hi(Q[0],1),j.hi(Q[0],1)),c.assign(ae.lo(1,re[1]-1).hi(Q[0],1),j.lo(0,Q[1]-1).hi(Q[0],1)),c.assign(ae.lo(0,1).hi(1,Q[1]),j.hi(1)),c.assign(ae.lo(re[0]-1,1).hi(1,Q[1]),j.lo(Q[0]-1)),ae.set(0,0,j.get(0,0)),ae.set(0,re[1]-1,j.get(0,Q[1]-1)),ae.set(re[0]-1,0,j.get(Q[0]-1,0)),ae.set(re[0]-1,re[1]-1,j.get(Q[0]-1,Q[1]-1))};function Y(ae,j){return Array.isArray(ae)?[j(ae[0]),j(ae[1]),j(ae[2])]:[j(ae),j(ae),j(ae)]}function ee(ae){return Array.isArray(ae)?ae.length===3?[ae[0],ae[1],ae[2],1]:[ae[0],ae[1],ae[2],ae[3]]:[0,0,0,1]}function q(ae){if(Array.isArray(ae)){if(Array.isArray(ae))return[ee(ae[0]),ee(ae[1]),ee(ae[2])];var j=ee(ae);return[j.slice(),j.slice(),j.slice()]}}O.update=function(ae){ae=ae||{},this.objectOffset=ae.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in ae&&(this.contourWidth=Y(ae.contourWidth,Number)),"showContour"in ae&&(this.showContour=Y(ae.showContour,Boolean)),"showSurface"in ae&&(this.showSurface=!!ae.showSurface),"contourTint"in ae&&(this.contourTint=Y(ae.contourTint,Boolean)),"contourColor"in ae&&(this.contourColor=q(ae.contourColor)),"contourProject"in ae&&(this.contourProject=Y(ae.contourProject,function(pi){return Y(pi,Boolean)})),"surfaceProject"in ae&&(this.surfaceProject=ae.surfaceProject),"dynamicColor"in ae&&(this.dynamicColor=q(ae.dynamicColor)),"dynamicTint"in ae&&(this.dynamicTint=Y(ae.dynamicTint,Number)),"dynamicWidth"in ae&&(this.dynamicWidth=Y(ae.dynamicWidth,Number)),"opacity"in ae&&(this.opacity=ae.opacity),"opacityscale"in ae&&(this.opacityscale=ae.opacityscale),"colorBounds"in ae&&(this.colorBounds=ae.colorBounds),"vertexColor"in ae&&(this.vertexColor=ae.vertexColor?1:0),"colormap"in ae&&this._colorMap.setPixels(this.genColormap(ae.colormap,this.opacityscale));var j=ae.field||ae.coords&&ae.coords[2]||null,Q=!1;if(j||(this._field[2].shape[0]||this._field[2].shape[2]?j=this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):j=this._field[2].hi(0,0)),"field"in ae||"coords"in ae){var re=(j.shape[0]+2)*(j.shape[1]+2);re>this._field[2].data.length&&(s.freeFloat(this._field[2].data),this._field[2].data=s.mallocFloat(o.nextPow2(re))),this._field[2]=p(this._field[2].data,[j.shape[0]+2,j.shape[1]+2]),this.padField(this._field[2],j),this.shape=j.shape.slice();for(var ce=this.shape,be=0;be<2;++be)this._field[2].size>this._field[be].data.length&&(s.freeFloat(this._field[be].data),this._field[be].data=s.mallocFloat(this._field[2].size)),this._field[be]=p(this._field[be].data,[ce[0]+2,ce[1]+2]);if(ae.coords){var Ae=ae.coords;if(!Array.isArray(Ae)||Ae.length!==3)throw new Error("gl-surface: invalid coordinates for x/y");for(be=0;be<2;++be){var De=Ae[be];for(rt=0;rt<2;++rt)if(De.shape[rt]!==ce[rt])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[be],De)}}else if(ae.ticks){var ze=ae.ticks;if(!Array.isArray(ze)||ze.length!==2)throw new Error("gl-surface: invalid ticks");for(be=0;be<2;++be){var Ze=ze[be];if((Array.isArray(Ze)||Ze.length)&&(Ze=p(Ze)),Ze.shape[0]!==ce[be])throw new Error("gl-surface: invalid tick length");var at=p(Ze.data,ce);at.stride[be]=Ze.stride[0],at.stride[be^1]=0,this.padField(this._field[be],at)}}else{for(be=0;be<2;++be){var nt=[0,0];nt[be]=1,this._field[be]=p(this._field[be].data,[ce[0]+2,ce[1]+2],nt,0)}this._field[0].set(0,0,0);for(var rt=0;rt0){for(var Za=0;Za<5;++Za)rr.pop();Te-=1}continue e}}}Da.push(Te)}this._contourOffsets[er]=fa,this._contourCounts[er]=Da}var ri=s.mallocFloat(rr.length);for(be=0;be=0&&(d=g|0,b+=y*d,u-=d),new w(this.data,u,y,b)},A.step=function(g){var b=this.shape[0],d=this.stride[0],u=this.offset,y=0,f=Math.ceil;return typeof g=="number"&&(y=g|0,y<0?(u+=d*(b-1),b=f(-b/y)):b=f(b/y),d*=y),new w(this.data,b,d,u)},A.transpose=function(g){g=g===void 0?0:g|0;var b=this.shape,d=this.stride;return new w(this.data,b[g],d[g],this.offset)},A.pick=function(g){var b=[],d=[],u=this.offset;typeof g=="number"&&g>=0?u=u+this.stride[0]*g|0:(b.push(this.shape[0]),d.push(this.stride[0]));var y=l[b.length+1];return y(this.data,b,d,u)},function(g,b,d,u){return new w(g,b[0],d[0],u)}},2:function(T,l,_){function w(M,g,b,d,u,y){this.data=M,this.shape=[g,b],this.stride=[d,u],this.offset=y|0}var A=w.prototype;return A.dtype=T,A.dimension=2,Object.defineProperty(A,"size",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(A,"order",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),A.set=function(g,b,d){return T==="generic"?this.data.set(this.offset+this.stride[0]*g+this.stride[1]*b,d):this.data[this.offset+this.stride[0]*g+this.stride[1]*b]=d},A.get=function(g,b){return T==="generic"?this.data.get(this.offset+this.stride[0]*g+this.stride[1]*b):this.data[this.offset+this.stride[0]*g+this.stride[1]*b]},A.index=function(g,b){return this.offset+this.stride[0]*g+this.stride[1]*b},A.hi=function(g,b){return new w(this.data,typeof g!="number"||g<0?this.shape[0]:g|0,typeof b!="number"||b<0?this.shape[1]:b|0,this.stride[0],this.stride[1],this.offset)},A.lo=function(g,b){var d=this.offset,u=0,y=this.shape[0],f=this.shape[1],R=this.stride[0],L=this.stride[1];return typeof g=="number"&&g>=0&&(u=g|0,d+=R*u,y-=u),typeof b=="number"&&b>=0&&(u=b|0,d+=L*u,f-=u),new w(this.data,y,f,R,L,d)},A.step=function(g,b){var d=this.shape[0],u=this.shape[1],y=this.stride[0],f=this.stride[1],R=this.offset,L=0,z=Math.ceil;return typeof g=="number"&&(L=g|0,L<0?(R+=y*(d-1),d=z(-d/L)):d=z(d/L),y*=L),typeof b=="number"&&(L=b|0,L<0?(R+=f*(u-1),u=z(-u/L)):u=z(u/L),f*=L),new w(this.data,d,u,y,f,R)},A.transpose=function(g,b){g=g===void 0?0:g|0,b=b===void 0?1:b|0;var d=this.shape,u=this.stride;return new w(this.data,d[g],d[b],u[g],u[b],this.offset)},A.pick=function(g,b){var d=[],u=[],y=this.offset;typeof g=="number"&&g>=0?y=y+this.stride[0]*g|0:(d.push(this.shape[0]),u.push(this.stride[0])),typeof b=="number"&&b>=0?y=y+this.stride[1]*b|0:(d.push(this.shape[1]),u.push(this.stride[1]));var f=l[d.length+1];return f(this.data,d,u,y)},function(g,b,d,u){return new w(g,b[0],b[1],d[0],d[1],u)}},3:function(T,l,_){function w(M,g,b,d,u,y,f,R){this.data=M,this.shape=[g,b,d],this.stride=[u,y,f],this.offset=R|0}var A=w.prototype;return A.dtype=T,A.dimension=3,Object.defineProperty(A,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(A,"order",{get:function(){var g=Math.abs(this.stride[0]),b=Math.abs(this.stride[1]),d=Math.abs(this.stride[2]);return g>b?b>d?[2,1,0]:g>d?[1,2,0]:[1,0,2]:g>d?[2,0,1]:d>b?[0,1,2]:[0,2,1]}}),A.set=function(g,b,d,u){return T==="generic"?this.data.set(this.offset+this.stride[0]*g+this.stride[1]*b+this.stride[2]*d,u):this.data[this.offset+this.stride[0]*g+this.stride[1]*b+this.stride[2]*d]=u},A.get=function(g,b,d){return T==="generic"?this.data.get(this.offset+this.stride[0]*g+this.stride[1]*b+this.stride[2]*d):this.data[this.offset+this.stride[0]*g+this.stride[1]*b+this.stride[2]*d]},A.index=function(g,b,d){return this.offset+this.stride[0]*g+this.stride[1]*b+this.stride[2]*d},A.hi=function(g,b,d){return new w(this.data,typeof g!="number"||g<0?this.shape[0]:g|0,typeof b!="number"||b<0?this.shape[1]:b|0,typeof d!="number"||d<0?this.shape[2]:d|0,this.stride[0],this.stride[1],this.stride[2],this.offset)},A.lo=function(g,b,d){var u=this.offset,y=0,f=this.shape[0],R=this.shape[1],L=this.shape[2],z=this.stride[0],F=this.stride[1],N=this.stride[2];return typeof g=="number"&&g>=0&&(y=g|0,u+=z*y,f-=y),typeof b=="number"&&b>=0&&(y=b|0,u+=F*y,R-=y),typeof d=="number"&&d>=0&&(y=d|0,u+=N*y,L-=y),new w(this.data,f,R,L,z,F,N,u)},A.step=function(g,b,d){var u=this.shape[0],y=this.shape[1],f=this.shape[2],R=this.stride[0],L=this.stride[1],z=this.stride[2],F=this.offset,N=0,O=Math.ceil;return typeof g=="number"&&(N=g|0,N<0?(F+=R*(u-1),u=O(-u/N)):u=O(u/N),R*=N),typeof b=="number"&&(N=b|0,N<0?(F+=L*(y-1),y=O(-y/N)):y=O(y/N),L*=N),typeof d=="number"&&(N=d|0,N<0?(F+=z*(f-1),f=O(-f/N)):f=O(f/N),z*=N),new w(this.data,u,y,f,R,L,z,F)},A.transpose=function(g,b,d){g=g===void 0?0:g|0,b=b===void 0?1:b|0,d=d===void 0?2:d|0;var u=this.shape,y=this.stride;return new w(this.data,u[g],u[b],u[d],y[g],y[b],y[d],this.offset)},A.pick=function(g,b,d){var u=[],y=[],f=this.offset;typeof g=="number"&&g>=0?f=f+this.stride[0]*g|0:(u.push(this.shape[0]),y.push(this.stride[0])),typeof b=="number"&&b>=0?f=f+this.stride[1]*b|0:(u.push(this.shape[1]),y.push(this.stride[1])),typeof d=="number"&&d>=0?f=f+this.stride[2]*d|0:(u.push(this.shape[2]),y.push(this.stride[2]));var R=l[u.length+1];return R(this.data,u,y,f)},function(g,b,d,u){return new w(g,b[0],b[1],b[2],d[0],d[1],d[2],u)}},4:function(T,l,_){function w(M,g,b,d,u,y,f,R,L,z){this.data=M,this.shape=[g,b,d,u],this.stride=[y,f,R,L],this.offset=z|0}var A=w.prototype;return A.dtype=T,A.dimension=4,Object.defineProperty(A,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(A,"order",{get:_}),A.set=function(g,b,d,u,y){return T==="generic"?this.data.set(this.offset+this.stride[0]*g+this.stride[1]*b+this.stride[2]*d+this.stride[3]*u,y):this.data[this.offset+this.stride[0]*g+this.stride[1]*b+this.stride[2]*d+this.stride[3]*u]=y},A.get=function(g,b,d,u){return T==="generic"?this.data.get(this.offset+this.stride[0]*g+this.stride[1]*b+this.stride[2]*d+this.stride[3]*u):this.data[this.offset+this.stride[0]*g+this.stride[1]*b+this.stride[2]*d+this.stride[3]*u]},A.index=function(g,b,d,u){return this.offset+this.stride[0]*g+this.stride[1]*b+this.stride[2]*d+this.stride[3]*u},A.hi=function(g,b,d,u){return new w(this.data,typeof g!="number"||g<0?this.shape[0]:g|0,typeof b!="number"||b<0?this.shape[1]:b|0,typeof 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(g,b,d,u){var y=this.offset,f=0,R=this.shape[0],L=this.shape[1],z=this.shape[2],F=this.shape[3],N=this.stride[0],O=this.stride[1],P=this.stride[2],U=this.stride[3];return typeof g=="number"&&g>=0&&(f=g|0,y+=N*f,R-=f),typeof b=="number"&&b>=0&&(f=b|0,y+=O*f,L-=f),typeof d=="number"&&d>=0&&(f=d|0,y+=P*f,z-=f),typeof u=="number"&&u>=0&&(f=u|0,y+=U*f,F-=f),new w(this.data,R,L,z,F,N,O,P,U,y)},A.step=function(g,b,d,u){var y=this.shape[0],f=this.shape[1],R=this.shape[2],L=this.shape[3],z=this.stride[0],F=this.stride[1],N=this.stride[2],O=this.stride[3],P=this.offset,U=0,B=Math.ceil;return typeof g=="number"&&(U=g|0,U<0?(P+=z*(y-1),y=B(-y/U)):y=B(y/U),z*=U),typeof b=="number"&&(U=b|0,U<0?(P+=F*(f-1),f=B(-f/U)):f=B(f/U),F*=U),typeof d=="number"&&(U=d|0,U<0?(P+=N*(R-1),R=B(-R/U)):R=B(R/U),N*=U),typeof u=="number"&&(U=u|0,U<0?(P+=O*(L-1),L=B(-L/U)):L=B(L/U),O*=U),new w(this.data,y,f,R,L,z,F,N,O,P)},A.transpose=function(g,b,d,u){g=g===void 0?0:g|0,b=b===void 0?1:b|0,d=d===void 0?2:d|0,u=u===void 0?3:u|0;var y=this.shape,f=this.stride;return new w(this.data,y[g],y[b],y[d],y[u],f[g],f[b],f[d],f[u],this.offset)},A.pick=function(g,b,d,u){var y=[],f=[],R=this.offset;typeof g=="number"&&g>=0?R=R+this.stride[0]*g|0:(y.push(this.shape[0]),f.push(this.stride[0])),typeof b=="number"&&b>=0?R=R+this.stride[1]*b|0:(y.push(this.shape[1]),f.push(this.stride[1])),typeof d=="number"&&d>=0?R=R+this.stride[2]*d|0:(y.push(this.shape[2]),f.push(this.stride[2])),typeof u=="number"&&u>=0?R=R+this.stride[3]*u|0:(y.push(this.shape[3]),f.push(this.stride[3]));var L=l[y.length+1];return L(this.data,y,f,R)},function(g,b,d,u){return new w(g,b[0],b[1],b[2],b[3],d[0],d[1],d[2],d[3],u)}},5:function(l,_,w){function A(g,b,d,u,y,f,R,L,z,F,N,O){this.data=g,this.shape=[b,d,u,y,f],this.stride=[R,L,z,F,N],this.offset=O|0}var M=A.prototype;return M.dtype=l,M.dimension=5,Object.defineProperty(M,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(M,"order",{get:w}),M.set=function(b,d,u,y,f,R){return l==="generic"?this.data.set(this.offset+this.stride[0]*b+this.stride[1]*d+this.stride[2]*u+this.stride[3]*y+this.stride[4]*f,R):this.data[this.offset+this.stride[0]*b+this.stride[1]*d+this.stride[2]*u+this.stride[3]*y+this.stride[4]*f]=R},M.get=function(b,d,u,y,f){return l==="generic"?this.data.get(this.offset+this.stride[0]*b+this.stride[1]*d+this.stride[2]*u+this.stride[3]*y+this.stride[4]*f):this.data[this.offset+this.stride[0]*b+this.stride[1]*d+this.stride[2]*u+this.stride[3]*y+this.stride[4]*f]},M.index=function(b,d,u,y,f){return this.offset+this.stride[0]*b+this.stride[1]*d+this.stride[2]*u+this.stride[3]*y+this.stride[4]*f},M.hi=function(b,d,u,y,f){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 y!="number"||y<0?this.shape[3]:y|0,typeof f!="number"||f<0?this.shape[4]:f|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},M.lo=function(b,d,u,y,f){var R=this.offset,L=0,z=this.shape[0],F=this.shape[1],N=this.shape[2],O=this.shape[3],P=this.shape[4],U=this.stride[0],B=this.stride[1],X=this.stride[2],$=this.stride[3],se=this.stride[4];return typeof b=="number"&&b>=0&&(L=b|0,R+=U*L,z-=L),typeof d=="number"&&d>=0&&(L=d|0,R+=B*L,F-=L),typeof u=="number"&&u>=0&&(L=u|0,R+=X*L,N-=L),typeof y=="number"&&y>=0&&(L=y|0,R+=$*L,O-=L),typeof f=="number"&&f>=0&&(L=f|0,R+=se*L,P-=L),new A(this.data,z,F,N,O,P,U,B,X,$,se,R)},M.step=function(b,d,u,y,f){var R=this.shape[0],L=this.shape[1],z=this.shape[2],F=this.shape[3],N=this.shape[4],O=this.stride[0],P=this.stride[1],U=this.stride[2],B=this.stride[3],X=this.stride[4],$=this.offset,se=0,le=Math.ceil;return typeof b=="number"&&(se=b|0,se<0?($+=O*(R-1),R=le(-R/se)):R=le(R/se),O*=se),typeof d=="number"&&(se=d|0,se<0?($+=P*(L-1),L=le(-L/se)):L=le(L/se),P*=se),typeof u=="number"&&(se=u|0,se<0?($+=U*(z-1),z=le(-z/se)):z=le(z/se),U*=se),typeof y=="number"&&(se=y|0,se<0?($+=B*(F-1),F=le(-F/se)):F=le(F/se),B*=se),typeof f=="number"&&(se=f|0,se<0?($+=X*(N-1),N=le(-N/se)):N=le(N/se),X*=se),new A(this.data,R,L,z,F,N,O,P,U,B,X,$)},M.transpose=function(b,d,u,y,f){b=b===void 0?0:b|0,d=d===void 0?1:d|0,u=u===void 0?2:u|0,y=y===void 0?3:y|0,f=f===void 0?4:f|0;var R=this.shape,L=this.stride;return new A(this.data,R[b],R[d],R[u],R[y],R[f],L[b],L[d],L[u],L[y],L[f],this.offset)},M.pick=function(b,d,u,y,f){var R=[],L=[],z=this.offset;typeof b=="number"&&b>=0?z=z+this.stride[0]*b|0:(R.push(this.shape[0]),L.push(this.stride[0])),typeof d=="number"&&d>=0?z=z+this.stride[1]*d|0:(R.push(this.shape[1]),L.push(this.stride[1])),typeof u=="number"&&u>=0?z=z+this.stride[2]*u|0:(R.push(this.shape[2]),L.push(this.stride[2])),typeof y=="number"&&y>=0?z=z+this.stride[3]*y|0:(R.push(this.shape[3]),L.push(this.stride[3])),typeof f=="number"&&f>=0?z=z+this.stride[4]*f|0:(R.push(this.shape[4]),L.push(this.stride[4]));var F=_[R.length+1];return F(this.data,R,L,z)},function(b,d,u,y){return new A(b,d[0],d[1],d[2],d[3],d[4],u[0],u[1],u[2],u[3],u[4],y)}}};function h(T,l){var _=l===-1?"T":String(l),w=s[_];return l===-1?w(T):l===0?w(T,m[T][0]):w(T,m[T],i)}function c(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 p(T,l,_,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(_===void 0){_=new Array(A);for(var M=A-1,g=1;M>=0;--M)_[M]=g,g*=l[M]}if(w===void 0){w=0;for(var M=0;M1e-6?(_[0]=A/d,_[1]=M/d,_[2]=g/d,_[3]=b/d):(_[0]=_[1]=_[2]=0,_[3]=1)}function p(_,w,A){this.radius=o([A]),this.center=o(w),this.rotation=o(_),this.computedRadius=this.radius.curve(0),this.computedCenter=this.center.curve(0),this.computedRotation=this.rotation.curve(0),this.computedUp=[.1,0,0],this.computedEye=[.1,0,0],this.computedMatrix=[.1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.recalcMatrix(0)}var T=p.prototype;T.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},T.recalcMatrix=function(_){this.radius.curve(_),this.center.curve(_),this.rotation.curve(_);var w=this.computedRotation;m(w,w);var A=this.computedMatrix;n(A,w);var M=this.computedCenter,g=this.computedEye,b=this.computedUp,d=Math.exp(this.computedRadius[0]);g[0]=M[0]+d*A[2],g[1]=M[1]+d*A[6],g[2]=M[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 y=0,f=0;f<3;++f)y+=A[u+4*f]*g[f];A[12+u]=-y}},T.getMatrix=function(_,w){this.recalcMatrix(_);var A=this.computedMatrix;if(w){for(var M=0;M<16;++M)w[M]=A[M];return w}return A},T.idle=function(_){this.center.idle(_),this.radius.idle(_),this.rotation.idle(_)},T.flush=function(_){this.center.flush(_),this.radius.flush(_),this.rotation.flush(_)},T.pan=function(_,w,A,M){w=w||0,A=A||0,M=M||0,this.recalcMatrix(_);var g=this.computedMatrix,b=g[1],d=g[5],u=g[9],y=h(b,d,u);b/=y,d/=y,u/=y;var f=g[0],R=g[4],L=g[8],z=f*b+R*d+L*u;f-=b*z,R-=d*z,L-=u*z;var F=h(f,R,L);f/=F,R/=F,L/=F;var N=g[2],O=g[6],P=g[10],U=N*b+O*d+P*u,B=N*f+O*R+P*L;N-=U*b+B*f,O-=U*d+B*R,P-=U*u+B*L;var X=h(N,O,P);N/=X,O/=X,P/=X;var $=f*w+b*A,se=R*w+d*A,le=L*w+u*A;this.center.move(_,$,se,le);var fe=Math.exp(this.computedRadius[0]);fe=Math.max(1e-4,fe+M),this.radius.set(_,Math.log(fe))},T.rotate=function(_,w,A,M){this.recalcMatrix(_),w=w||0,A=A||0;var g=this.computedMatrix,b=g[0],d=g[4],u=g[8],y=g[1],f=g[5],R=g[9],L=g[2],z=g[6],F=g[10],N=w*b+A*y,O=w*d+A*f,P=w*u+A*R,U=-(z*P-F*O),B=-(F*N-L*P),X=-(L*O-z*N),$=Math.sqrt(Math.max(0,1-Math.pow(U,2)-Math.pow(B,2)-Math.pow(X,2))),se=c(U,B,X,$);se>1e-6?(U/=se,B/=se,X/=se,$/=se):(U=B=X=0,$=1);var le=this.computedRotation,fe=le[0],V=le[1],Y=le[2],ee=le[3],q=fe*$+ee*U+V*X-Y*B,oe=V*$+ee*B+Y*U-fe*X,ae=Y*$+ee*X+fe*B-V*U,j=ee*$-fe*U-V*B-Y*X;if(M){U=L,B=z,X=F;var Q=Math.sin(M)/h(U,B,X);U*=Q,B*=Q,X*=Q,$=Math.cos(w),q=q*$+j*U+oe*X-ae*B,oe=oe*$+j*B+ae*U-q*X,ae=ae*$+j*X+q*B-oe*U,j=j*$-q*U-oe*B-ae*X}var re=c(q,oe,ae,j);re>1e-6?(q/=re,oe/=re,ae/=re,j/=re):(q=oe=ae=0,j=1),this.rotation.set(_,q,oe,ae,j)},T.lookAt=function(_,w,A,M){this.recalcMatrix(_),A=A||this.computedCenter,w=w||this.computedEye,M=M||this.computedUp;var g=this.computedMatrix;a(g,w,A,M);var b=this.computedRotation;s(b,g[0],g[1],g[2],g[4],g[5],g[6],g[8],g[9],g[10]),m(b,b),this.rotation.set(_,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(_,.5*Math.log(Math.max(d,1e-6))),this.center.set(_,A[0],A[1],A[2])},T.translate=function(_,w,A,M){this.center.move(_,w||0,A||0,M||0)},T.setMatrix=function(_,w){var A=this.computedRotation;s(A,w[0],w[1],w[2],w[4],w[5],w[6],w[8],w[9],w[10]),m(A,A),this.rotation.set(_,A[0],A[1],A[2],A[3]);var M=this.computedMatrix;i(M,w);var g=M[15];if(Math.abs(g)>1e-6){var b=M[12]/g,d=M[13]/g,u=M[14]/g;this.recalcMatrix(_);var y=Math.exp(this.computedRadius[0]);this.center.set(_,b-M[2]*y,d-M[6]*y,u-M[10]*y),this.radius.idle(_)}else this.center.idle(_),this.radius.idle(_)},T.setDistance=function(_,w){w>0&&this.radius.set(_,Math.log(w))},T.setDistanceLimits=function(_,w){_>0?_=Math.log(_):_=-1/0,w>0?w=Math.log(w):w=1/0,w=Math.max(w,_),this.radius.bounds[0][0]=_,this.radius.bounds[1][0]=w},T.getDistanceLimits=function(_){var w=this.radius.bounds;return _?(_[0]=Math.exp(w[0][0]),_[1]=Math.exp(w[1][0]),_):[Math.exp(w[0][0]),Math.exp(w[1][0])]},T.toJSON=function(){return this.recalcMatrix(this.lastT()),{center:this.computedCenter.slice(),rotation:this.computedRotation.slice(),distance:Math.log(this.computedRadius[0]),zoomMin:this.radius.bounds[0][0],zoomMax:this.radius.bounds[1][0]}},T.fromJSON=function(_){var w=this.lastT(),A=_.center;A&&this.center.set(w,A[0],A[1],A[2]);var M=_.rotation;M&&this.rotation.set(w,M[0],M[1],M[2],M[3]);var g=_.distance;g&&g>0&&this.radius.set(w,Math.log(g)),this.setDistanceLimits(_.zoomMin,_.zoomMax)};function l(_){_=_||{};var w=_.center||[0,0,0],A=_.rotation||[0,0,0,1],M=_.radius||1;w=[].slice.call(w,0,3),A=[].slice.call(A,0,4),m(A,A);var g=new p(A,w,Math.log(M));return g.setDistanceLimits(_.zoomMin,_.zoomMax),("eye"in _||"up"in _)&&g.lookAt(0,_.eye,_.center,_.up),g}},9994:function(e,t,r){"use strict";var o=r(9618),a=r(8277);e.exports=function(i,s){for(var h=[],c=i,m=1;Array.isArray(c);)h.push(c.length),m*=c.length,c=c[0];return h.length===0?o():(s||(s=o(new Float64Array(m),h)),a(s,i),s)}}},x={};function S(e){var t=x[e];if(t!==void 0)return t.exports;var r=x[e]={id:e,loaded:!1,exports:{}};return 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 E=S(1964);G.exports=E})()}}),xE=Xe({"node_modules/color-name/index.js"(Z,G){"use strict";G.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}}}),GN=Xe({"node_modules/color-normalize/node_modules/color-parse/index.js"(Z,G){"use strict";var v=xE();G.exports=S;var x={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function S(E){var e,t=[],r=1,o;if(typeof E=="string")if(E=E.toLowerCase(),v[E])t=v[E].slice(),o="rgb";else if(E==="transparent")r=0,o="rgb",t=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(E)){var a=E.slice(1),n=a.length,i=n<=4;r=1,i?(t=[parseInt(a[0]+a[0],16),parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16)],n===4&&(r=parseInt(a[3]+a[3],16)/255)):(t=[parseInt(a[0]+a[1],16),parseInt(a[2]+a[3],16),parseInt(a[4]+a[5],16)],n===8&&(r=parseInt(a[6]+a[7],16)/255)),t[0]||(t[0]=0),t[1]||(t[1]=0),t[2]||(t[2]=0),o="rgb"}else if(e=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(E)){var s=e[1],h=s==="rgb",a=s.replace(/a$/,"");o=a;var n=a==="cmyk"?4:a==="gray"?1:3;t=e[2].trim().split(/\s*[,\/]\s*|\s+/).map(function(p,T){if(/%$/.test(p))return T===n?parseFloat(p)/100:a==="rgb"?parseFloat(p)*255/100:parseFloat(p);if(a[T]==="h"){if(/deg$/.test(p))return parseFloat(p);if(x[p]!==void 0)return x[p]}return parseFloat(p)}),s===a&&t.push(1),r=h||t[n]===void 0?1:t[n],t=t.slice(0,n)}else E.length>10&&/[0-9](?:\s|\/)/.test(E)&&(t=E.match(/([0-9]+)/g).map(function(c){return parseFloat(c)}),o=E.match(/([a-z])/ig).join("").toLowerCase());else isNaN(E)?Array.isArray(E)||E.length?(t=[E[0],E[1],E[2]],o="rgb",r=E.length===4?E[3]:1):E instanceof Object&&(E.r!=null||E.red!=null||E.R!=null?(o="rgb",t=[E.r||E.red||E.R||0,E.g||E.green||E.G||0,E.b||E.blue||E.B||0]):(o="hsl",t=[E.h||E.hue||E.H||0,E.s||E.saturation||E.S||0,E.l||E.lightness||E.L||E.b||E.brightness]),r=E.a||E.alpha||E.opacity||1,E.opacity!=null&&(r/=100)):(o="rgb",t=[E>>>16,(E&65280)>>>8,E&255]);return{space:o,values:t,alpha:r}}}}),HN=Xe({"node_modules/color-normalize/node_modules/color-rgba/index.js"(Z,G){"use strict";var v=GN();G.exports=function(E){Array.isArray(E)&&E.raw&&(E=String.raw.apply(null,arguments));var e,t,r,o=v(E);if(!o.space)return[];var a=[0,0,0],n=o.space[0]==="h"?[360,100,100]:[255,255,255];return e=Array(3),e[0]=Math.min(Math.max(o.values[0],a[0]),n[0]),e[1]=Math.min(Math.max(o.values[1],a[1]),n[1]),e[2]=Math.min(Math.max(o.values[2],a[2]),n[2]),o.space[0]==="h"&&(e=x(e)),e.push(Math.min(Math.max(o.alpha,0),1)),e};function x(S){var E=S[0]/360,e=S[1]/100,t=S[2]/100,r,o,a,n,i,s=0;if(e===0)return i=t*255,[i,i,i];for(o=t<.5?t*(1+e):t+e-t*e,r=2*t-o,n=[0,0,0];s<3;)a=E+1/3*-(s-1),a<0?a++:a>1&&a--,i=6*a<1?r+(o-r)*6*a:2*a<1?o:3*a<2?r+(o-r)*(2/3-a)*6:r,n[s++]=i*255;return n}}}),mx=Xe({"node_modules/clamp/index.js"(Z,G){G.exports=v;function v(x,S,E){return SE?E:x:xS?S:x}}}),Q3=Xe({"node_modules/dtype/index.js"(Z,G){G.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}}}}),d0=Xe({"node_modules/color-normalize/index.js"(Z,G){"use strict";var v=HN(),x=mx(),S=Q3();G.exports=function(t,r){(r==="float"||!r)&&(r="array"),r==="uint"&&(r="uint8"),r==="uint_clamped"&&(r="uint8_clamped");var o=S(r),a=new o(4),n=r!=="uint8"&&r!=="uint8_clamped";return(!t.length||typeof t=="string")&&(t=v(t),t[0]/=255,t[1]/=255,t[2]/=255),E(t)?(a[0]=t[0],a[1]=t[1],a[2]=t[2],a[3]=t[3]!=null?t[3]:255,n&&(a[0]/=255,a[1]/=255,a[2]/=255,a[3]/=255),a):(n?(a[0]=t[0],a[1]=t[1],a[2]=t[2],a[3]=t[3]!=null?t[3]:1):(a[0]=x(Math.floor(t[0]*255),0,255),a[1]=x(Math.floor(t[1]*255),0,255),a[2]=x(Math.floor(t[2]*255),0,255),a[3]=t[3]==null?255:x(Math.floor(t[3]*255),0,255)),a)};function E(e){return!!(e instanceof Uint8Array||e instanceof Uint8ClampedArray||Array.isArray(e)&&(e[0]>1||e[0]===0)&&(e[1]>1||e[1]===0)&&(e[2]>1||e[2]===0)&&(!e[3]||e[3]>1))}}}),em=Xe({"src/lib/str2rgbarray.js"(Z,G){"use strict";var v=d0();function x(S){return S?v(S):[0,0,0,1]}G.exports=x}}),tm=Xe({"src/lib/gl_format_color.js"(Z,G){"use strict";var v=rs(),x=Ch(),S=d0(),E=rc(),e=sh().defaultLine,t=bp().isArrayOrTypedArray,r=S(e),o=1;function a(c,m){var p=c;return p[3]*=m,p}function n(c){if(v(c))return r;var m=S(c);return m.length?m:r}function i(c){return v(c)?c:o}function s(c,m,p){var T=c.color;T&&T._inputArray&&(T=T._inputArray);var l=t(T),_=t(m),w=E.extractOpts(c),A=[],M,g,b,d,u;if(w.colorscale!==void 0?M=E.makeColorScaleFuncFromTrace(c):M=n,l?g=function(f,R){return f[R]===void 0?r:S(M(f[R]))}:g=n,_?b=function(f,R){return f[R]===void 0?o:i(f[R])}:b=i,l||_)for(var y=0;y0){var p=o.c2l(c);o._lowerLogErrorBound||(o._lowerLogErrorBound=p),o._lowerErrorBound=Math.min(o._lowerLogErrorBound,p)}}else n[i]=[-s[0]*r,s[1]*r]}return n}function S(e){for(var t=0;t-1?-1:R.indexOf("right")>-1?1:0}function w(R){return R==null?0:R.indexOf("top")>-1?-1:R.indexOf("bottom")>-1?1:0}function A(R){var L=0,z=0,F=[L,z];if(Array.isArray(R))for(var N=0;N=0){var X=T(U.position,U.delaunayColor,U.delaunayAxis);X.opacity=R.opacity,this.delaunayMesh?this.delaunayMesh.update(X):(X.gl=L,this.delaunayMesh=E(X),this.delaunayMesh._trace=this,this.scene.glplot.add(this.delaunayMesh))}else this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose(),this.delaunayMesh=null)},p.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 f(R,L){var z=new m(R,L.uid);return z.update(L),z}G.exports=f}}),wE=Xe({"src/traces/scatter3d/attributes.js"(Z,G){"use strict";var v=af(),x=tc(),S=ku(),E=tf().axisHoverFormat,{hovertemplateAttrs:e,texttemplateAttrs:t,templatefallbackAttrs:r}=Jl(),o=ru(),a=bE(),n=eT(),i=Qo().extendFlat,s=pc().overrideAll,h=Jm(),c=v.line,m=v.marker,p=m.line,T=i({width:c.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 _=G.exports=s({x:v.x,y:v.y,z:{valType:"data_array"},text:i({},v.text,{}),texttemplate:t(),texttemplatefallback:r({editType:"calc"}),hovertext:i({},v.hovertext,{}),hovertemplate:e(),hovertemplatefallback:r(),xhoverformat:E("x"),yhoverformat:E("y"),zhoverformat:E("z"),mode:i({},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:i({symbol:{valType:"enumerated",values:h(n),dflt:"circle",arrayOk:!0},size:i({},m.size,{dflt:8}),sizeref:m.sizeref,sizemin:m.sizemin,sizemode:m.sizemode,opacity:i({},m.opacity,{arrayOk:!1}),colorbar:m.colorbar,line:i({width:i({},p.width,{arrayOk:!1})},S("marker.line"))},S("marker")),textposition:i({},v.textposition,{dflt:"top center"}),textfont:x({noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,editType:"calc",colorEditType:"style",arrayOk:!0,variantValues:["normal","small-caps"]}),opacity:o.opacity,hoverinfo:i({},o.hoverinfo)},"calc","nested");_.x.editType=_.y.editType=_.z.editType="calc+clearAxisTypes"}}),ZN=Xe({"src/traces/scatter3d/defaults.js"(Z,G){"use strict";var v=so(),x=sa(),S=Fu(),E=md(),e=Dd(),t=zd(),r=wE();G.exports=function(n,i,s,h){function c(M,g){return x.coerce(n,i,r,M,g)}var m=o(n,i,c,h);if(!m){i.visible=!1;return}c("text"),c("hovertext"),c("hovertemplate"),c("hovertemplatefallback"),c("xhoverformat"),c("yhoverformat"),c("zhoverformat"),c("mode"),S.hasMarkers(i)&&E(n,i,s,h,c,{noAngle:!0,noLineDash:!0,noSelect:!0}),S.hasLines(i)&&(c("connectgaps"),e(n,i,s,h,c)),S.hasText(i)&&(c("texttemplate"),c("texttemplatefallback"),t(n,i,h,c,{noSelect:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}));var p=(i.line||{}).color,T=(i.marker||{}).color;c("surfaceaxis")>=0&&c("surfacecolor",p||T);for(var l=["x","y","z"],_=0;_<3;++_){var w="projection."+l[_];c(w+".show")&&(c(w+".opacity"),c(w+".scale"))}var A=v.getComponentMethod("errorbars","supplyDefaults");A(n,i,p||T||s,{axis:"z"}),A(n,i,p||T||s,{axis:"y",inherit:"z"}),A(n,i,p||T||s,{axis:"x",inherit:"z"})};function o(a,n,i,s){var h=0,c=i("x"),m=i("y"),p=i("z"),T=v.getComponentMethod("calendars","handleTraceDefaults");return T(a,n,["x","y","z"],s),c&&m&&p&&(h=Math.min(c.length,m.length,p.length),n._length=n._xlength=n._ylength=n._zlength=h),h}}}),YN=Xe({"src/traces/scatter3d/calc.js"(Z,G){"use strict";var v=Av(),x=Fd();G.exports=function(E,e){var t=[{x:!1,y:!1,trace:e,t:{}}];return v(t,e),x(E,e),t}}}),KN=Xe({"node_modules/get-canvas-context/index.js"(Z,G){G.exports=v;function v(x,S){if(typeof x!="string")throw new TypeError("must specify type string");if(S=S||{},typeof document>"u"&&!S.canvas)return null;var E=S.canvas||document.createElement("canvas");typeof S.width=="number"&&(E.width=S.width),typeof S.height=="number"&&(E.height=S.height);var e=S,t;try{var r=[x];x.indexOf("webgl")===0&&r.push("experimental-"+x);for(var o=0;o/g," "));i[s]=p,h.tickmode=c}}o.ticks=i;for(var s=0;s<3;++s){E[s]=.5*(r.glplot.bounds[0][s]+r.glplot.bounds[1][s]);for(var T=0;T<2;++T)o.bounds[T][s]=r.glplot.bounds[T][s]}r.contourLevels=e(i)}}}),tU=Xe({"src/plots/gl3d/scene.js"(Z,G){"use strict";var v=Yh().gl_plot3d,x=v.createCamera,S=v.createScene,E=JN(),e=b2(),t=so(),r=sa(),o=r.preserveDrawingBuffer(),a=Go(),n=rf(),i=em(),s=TE(),h=U5(),c=$N(),m=QN(),p=eU(),T=Yd().applyAutorangeOptions,l,_,w=!1;function A(z,F){var N=document.createElement("div"),O=z.container;this.graphDiv=z.graphDiv;var P=document.createElementNS("http://www.w3.org/2000/svg","svg");P.style.position="absolute",P.style.top=P.style.left="0px",P.style.width=P.style.height="100%",P.style["z-index"]=20,P.style["pointer-events"]="none",N.appendChild(P),this.svgContainer=P,N.id=z.id,N.style.position="absolute",N.style.top=N.style.left="0px",N.style.width=N.style.height="100%",O.appendChild(N),this.fullLayout=F,this.id=z.id||"scene",this.fullSceneLayout=F[this.id],this.plotArgs=[[],{},{}],this.axesOptions=c(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 M=A.prototype;M.prepareOptions=function(){var z=this,F={canvas:z.canvas,gl:z.gl,glOptions:{preserveDrawingBuffer:o,premultipliedAlpha:!0,antialias:!0},container:z.container,axes:z.axesOptions,spikes:z.spikeOptions,pickRadius:10,snapToData:!0,autoScale:!0,autoBounds:!1,cameraObject:z.camera,pixelRatio:z.pixelRatio};if(z.staticMode){if(!_&&(l=document.createElement("canvas"),_=E({canvas:l,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}),!_))throw new Error("error creating static canvas/context for image server");F.gl=_,F.canvas=l}return F};var g=!0;M.tryCreatePlot=function(){var z=this,F=z.prepareOptions(),N=!0;try{z.glplot=S(F)}catch{if(z.staticMode||!g||o)N=!1;else{r.warn(["webgl setup failed possibly due to","false preserveDrawingBuffer config.","The mobile/tablet device may not be detected by is-mobile module.","Enabling preserveDrawingBuffer in second attempt to create webgl scene..."].join(" "));try{o=F.glOptions.preserveDrawingBuffer=!0,z.glplot=S(F)}catch{o=F.glOptions.preserveDrawingBuffer=!1,N=!1}}}return g=!1,N},M.initializeGLCamera=function(){var z=this,F=z.fullSceneLayout.camera,N=F.projection.type==="orthographic";z.camera=x(z.container,{center:[F.center.x,F.center.y,F.center.z],eye:[F.eye.x,F.eye.y,F.eye.z],up:[F.up.x,F.up.y,F.up.z],_ortho:N,zoomMin:.01,zoomMax:100,mode:"orbit"})},M.initializeGLPlot=function(){var z=this;z.initializeGLCamera();var F=z.tryCreatePlot();if(!F)return s(z);z.traces={},z.make4thDimension();var N=z.graphDiv,O=N.layout,P=function(){var B={};return z.isCameraChanged(O)&&(B[z.id+".camera"]=z.getCamera()),z.isAspectChanged(O)&&(B[z.id+".aspectratio"]=z.glplot.getAspectratio(),O[z.id].aspectmode!=="manual"&&(z.fullSceneLayout.aspectmode=O[z.id].aspectmode=B[z.id+".aspectmode"]="manual")),B},U=function(B){if(B.fullSceneLayout.dragmode!==!1){var X=P();B.saveLayout(O),B.graphDiv.emit("plotly_relayout",X)}};return z.glplot.canvas&&(z.glplot.canvas.addEventListener("mouseup",function(){U(z)}),z.glplot.canvas.addEventListener("touchstart",function(){w=!0}),z.glplot.canvas.addEventListener("wheel",function(B){if(N._context._scrollZoom.gl3d){if(z.camera._ortho){var X=B.deltaX>B.deltaY?1.1:.9090909090909091,$=z.glplot.getAspectratio();z.glplot.setAspectratio({x:X*$.x,y:X*$.y,z:X*$.z})}U(z)}},e?{passive:!1}:!1),z.glplot.canvas.addEventListener("mousemove",function(){if(z.fullSceneLayout.dragmode!==!1&&z.camera.mouseListener.buttons!==0){var B=P();z.graphDiv.emit("plotly_relayouting",B)}}),z.staticMode||z.glplot.canvas.addEventListener("webglcontextlost",function(B){N&&N.emit&&N.emit("plotly_webglcontextlost",{event:B,layer:z.id})},!1)),z.glplot.oncontextloss=function(){z.recoverContext()},z.glplot.onrender=function(){z.render()},!0},M.render=function(){var z=this,F=z.graphDiv,N,O=z.svgContainer,P=z.container.getBoundingClientRect();F._fullLayout._calcInverseTransform(F);var U=F._fullLayout._invScaleX,B=F._fullLayout._invScaleY,X=P.width*U,$=P.height*B;O.setAttributeNS(null,"viewBox","0 0 "+X+" "+$),O.setAttributeNS(null,"width",X),O.setAttributeNS(null,"height",$),p(z),z.glplot.axes.update(z.axesOptions);for(var se=Object.keys(z.traces),le=null,fe=z.glplot.selection,V=0;V")):N.type==="isosurface"||N.type==="volume"?(ae.valueLabel=a.hoverLabelText(z._mockAxis,z._mockAxis.d2l(fe.traceCoordinate[3]),N.valuehoverformat),be.push("value: "+ae.valueLabel),fe.textLabel&&be.push(fe.textLabel),ce=be.join("
")):ce=fe.textLabel;var Ae={x:fe.traceCoordinate[0],y:fe.traceCoordinate[1],z:fe.traceCoordinate[2],data:q._input,fullData:q,curveNumber:q.index,pointNumber:oe};n.appendArrayPointValue(Ae,q,oe),N._module.eventData&&(Ae=q._module.eventData(Ae,fe,q,{},oe));var De={points:[Ae]};if(z.fullSceneLayout.hovermode){var ze=[];n.loneHover({trace:q,x:(.5+.5*ee[0]/ee[3])*X,y:(.5-.5*ee[1]/ee[3])*$,xLabel:ae.xLabel,yLabel:ae.yLabel,zLabel:ae.zLabel,text:ce,name:le.name,color:n.castHoverOption(q,oe,"bgcolor")||le.color,borderColor:n.castHoverOption(q,oe,"bordercolor"),fontFamily:n.castHoverOption(q,oe,"font.family"),fontSize:n.castHoverOption(q,oe,"font.size"),fontColor:n.castHoverOption(q,oe,"font.color"),nameLength:n.castHoverOption(q,oe,"namelength"),textAlign:n.castHoverOption(q,oe,"align"),hovertemplate:r.castOption(q,oe,"hovertemplate"),hovertemplateLabels:r.extendFlat({},Ae,ae),eventData:[Ae]},{container:O,gd:F,inOut_bbox:ze}),Ae.bbox=ze[0]}fe.distance<5&&(fe.buttons||w)?F.emit("plotly_click",De):F.emit("plotly_hover",De),this.oldEventData=De}else n.loneUnhover(O),this.oldEventData&&F.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;z.drawAnnotations(z)},M.recoverContext=function(){var z=this;z.glplot.dispose();var F=function(){if(z.glplot.gl.isContextLost()){requestAnimationFrame(F);return}if(!z.initializeGLPlot()){r.error("Catastrophic and unrecoverable WebGL error. Context lost.");return}z.plot.apply(z,z.plotArgs)};requestAnimationFrame(F)};var b=["xaxis","yaxis","zaxis"];function d(z,F,N){for(var O=z.fullSceneLayout,P=0;P<3;P++){var U=b[P],B=U.charAt(0),X=O[U],$=F[B],se=F[B+"calendar"],le=F["_"+B+"length"];if(!r.isArrayOrTypedArray($))N[0][P]=Math.min(N[0][P],0),N[1][P]=Math.max(N[1][P],le-1);else for(var fe,V=0;V<(le||$.length);V++)if(r.isArrayOrTypedArray($[V]))for(var Y=0;Y<$[V].length;++Y)fe=X.d2l($[V][Y],0,se),!isNaN(fe)&&isFinite(fe)&&(N[0][P]=Math.min(N[0][P],fe),N[1][P]=Math.max(N[1][P],fe));else fe=X.d2l($[V],0,se),!isNaN(fe)&&isFinite(fe)&&(N[0][P]=Math.min(N[0][P],fe),N[1][P]=Math.max(N[1][P],fe))}}function u(z,F){for(var N=z.fullSceneLayout,O=N.annotations||[],P=0;P<3;P++)for(var U=b[P],B=U.charAt(0),X=N[U],$=0;$q[1][B])q[0][B]=-1,q[1][B]=1;else{var at=q[1][B]-q[0][B];q[0][B]-=at/32,q[1][B]+=at/32}if(j=[q[0][B],q[1][B]],j=T(j,$),q[0][B]=j[0],q[1][B]=j[1],$.isReversed()){var nt=q[0][B];q[0][B]=q[1][B],q[1][B]=nt}}else j=$.range,q[0][B]=$.r2l(j[0]),q[1][B]=$.r2l(j[1]);q[0][B]===q[1][B]&&(q[0][B]-=1,q[1][B]+=1),oe[B]=q[1][B]-q[0][B],$.range=[q[0][B],q[1][B]],$.limitRange(),O.glplot.setBounds(B,{min:$.range[0]*Y[B],max:$.range[1]*Y[B]})}var rt,st=le.aspectmode;if(st==="cube")rt=[1,1,1];else if(st==="manual"){var Me=le.aspectratio;rt=[Me.x,Me.y,Me.z]}else if(st==="auto"||st==="data"){var ye=[1,1,1];for(B=0;B<3;++B){$=le[b[B]],se=$.type;var he=ae[se];ye[B]=Math.pow(he.acc,1/he.count)/Y[B]}st==="data"||Math.max.apply(null,ye)/Math.min.apply(null,ye)<=4?rt=ye:rt=[1,1,1]}else throw new Error("scene.js aspectRatio was not one of the enumerated types");le.aspectratio.x=fe.aspectratio.x=rt[0],le.aspectratio.y=fe.aspectratio.y=rt[1],le.aspectratio.z=fe.aspectratio.z=rt[2],O.glplot.setAspectratio(le.aspectratio),O.viewInitial.aspectratio||(O.viewInitial.aspectratio={x:le.aspectratio.x,y:le.aspectratio.y,z:le.aspectratio.z}),O.viewInitial.aspectmode||(O.viewInitial.aspectmode=le.aspectmode);var Oe=le.domain||null,tt=F._size||null;if(Oe&&tt){var ot=O.container.style;ot.position="absolute",ot.left=tt.l+Oe.x[0]*tt.w+"px",ot.top=tt.t+(1-Oe.y[1])*tt.h+"px",ot.width=tt.w*(Oe.x[1]-Oe.x[0])+"px",ot.height=tt.h*(Oe.y[1]-Oe.y[0])+"px"}O.glplot.redraw()}},M.destroy=function(){var z=this;z.glplot&&(z.camera.mouseListener.enabled=!1,z.container.removeEventListener("wheel",z.camera.wheelListener),z.camera=null,z.glplot.dispose(),z.container.parentNode.removeChild(z.container),z.glplot=null)};function y(z){return[[z.eye.x,z.eye.y,z.eye.z],[z.center.x,z.center.y,z.center.z],[z.up.x,z.up.y,z.up.z]]}function f(z){return{up:{x:z.up[0],y:z.up[1],z:z.up[2]},center:{x:z.center[0],y:z.center[1],z:z.center[2]},eye:{x:z.eye[0],y:z.eye[1],z:z.eye[2]},projection:{type:z._ortho===!0?"orthographic":"perspective"}}}M.getCamera=function(){var z=this;return z.camera.view.recalcMatrix(z.camera.view.lastT()),f(z.camera)},M.setViewport=function(z){var F=this,N=z.camera;F.camera.lookAt.apply(this,y(N)),F.glplot.setAspectratio(z.aspectratio);var O=N.projection.type==="orthographic",P=F.camera._ortho;O!==P&&(F.glplot.redraw(),F.glplot.clearRGBA(),F.glplot.dispose(),F.initializeGLPlot())},M.isCameraChanged=function(z){var F=this,N=F.getCamera(),O=r.nestedProperty(z,F.id+".camera"),P=O.get();function U(se,le,fe,V){var Y=["up","center","eye"],ee=["x","y","z"];return le[Y[fe]]&&se[Y[fe]][ee[V]]===le[Y[fe]][ee[V]]}var B=!1;if(P===void 0)B=!0;else{for(var X=0;X<3;X++)for(var $=0;$<3;$++)if(!U(N,P,X,$)){B=!0;break}(!P.projection||N.projection&&N.projection.type!==P.projection.type)&&(B=!0)}return B},M.isAspectChanged=function(z){var F=this,N=F.glplot.getAspectratio(),O=r.nestedProperty(z,F.id+".aspectratio"),P=O.get();return P===void 0||P.x!==N.x||P.y!==N.y||P.z!==N.z},M.saveLayout=function(z){var F=this,N=F.fullLayout,O,P,U,B,X,$,se=F.isCameraChanged(z),le=F.isAspectChanged(z),fe=se||le;if(fe){var V={};if(se&&(O=F.getCamera(),P=r.nestedProperty(z,F.id+".camera"),U=P.get(),V[F.id+".camera"]=U),le&&(B=F.glplot.getAspectratio(),X=r.nestedProperty(z,F.id+".aspectratio"),$=X.get(),V[F.id+".aspectratio"]=$),t.call("_storeDirectGUIEdit",z,N._preGUI,V),se){P.set(O);var Y=r.nestedProperty(N,F.id+".camera");Y.set(O)}if(le){X.set(B);var ee=r.nestedProperty(N,F.id+".aspectratio");ee.set(B),F.glplot.redraw()}}return fe},M.updateFx=function(z,F){var N=this,O=N.camera;if(O)if(z==="orbit")O.mode="orbit",O.keyBindingMode="rotate";else if(z==="turntable"){O.up=[0,0,1],O.mode="turntable",O.keyBindingMode="rotate";var P=N.graphDiv,U=P._fullLayout,B=N.fullSceneLayout.camera,X=B.up.x,$=B.up.y,se=B.up.z;if(se/Math.sqrt(X*X+$*$+se*se)<.999){var le=N.id+".camera.up",fe={x:0,y:0,z:1},V={};V[le]=fe;var Y=P.layout;t.call("_storeDirectGUIEdit",Y,U._preGUI,V),B.up=fe,r.nestedProperty(Y,le).set(fe)}}else O.keyBindingMode=z;N.fullSceneLayout.hovermode=F};function R(z,F,N){for(var O=0,P=N-1;O0)for(var X=255/B,$=0;$<3;++$)z[U+$]=Math.min(X*z[U+$],255)}}M.toImage=function(z){var F=this;z||(z="png"),F.staticMode&&F.container.appendChild(l),F.glplot.redraw();var N=F.glplot.gl,O=N.drawingBufferWidth,P=N.drawingBufferHeight;N.bindFramebuffer(N.FRAMEBUFFER,null);var U=new Uint8Array(O*P*4);N.readPixels(0,0,O,P,N.RGBA,N.UNSIGNED_BYTE,U),R(U,O,P),L(U,O,P);var B=document.createElement("canvas");B.width=O,B.height=P;var X=B.getContext("2d",{willReadFrequently:!0}),$=X.createImageData(O,P);$.data.set(U),X.putImageData($,0,0);var se;switch(z){case"jpeg":se=B.toDataURL("image/jpeg");break;case"webp":se=B.toDataURL("image/webp");break;default:se=B.toDataURL("image/png")}return F.staticMode&&F.container.removeChild(l),se},M.setConvert=function(){for(var z=this,F=0;F<3;F++){var N=z.fullSceneLayout[b[F]];a.setConvert(N,z.fullLayout),N.setScale=r.noop}},M.make4thDimension=function(){var z=this,F=z.graphDiv,N=F._fullLayout;z._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},a.setConvert(z._mockAxis,N)},G.exports=A}}),rU=Xe({"src/plots/gl3d/layout/attributes.js"(Z,G){"use strict";G.exports={scene:{valType:"subplotid",dflt:"scene",editType:"calc+clearAxisTypes"}}}}),AE=Xe({"src/plots/gl3d/layout/axis_attributes.js"(Z,G){"use strict";var v=$n(),x=Wh(),S=Qo().extendFlat,E=pc().overrideAll;G.exports=E({visible:x.visible,showspikes:{valType:"boolean",dflt:!0},spikesides:{valType:"boolean",dflt:!0},spikethickness:{valType:"number",min:0,dflt:2},spikecolor:{valType:"color",dflt:v.defaultLine},showbackground:{valType:"boolean",dflt:!1},backgroundcolor:{valType:"color",dflt:"rgba(204, 204, 204, 0.5)"},showaxeslabels:{valType:"boolean",dflt:!0},color:x.color,categoryorder:x.categoryorder,categoryarray:x.categoryarray,title:{text:x.title.text,font:x.title.font},type:S({},x.type,{values:["-","linear","log","date","category"]}),autotypenumbers:x.autotypenumbers,autorange:x.autorange,autorangeoptions:{minallowed:x.autorangeoptions.minallowed,maxallowed:x.autorangeoptions.maxallowed,clipmin:x.autorangeoptions.clipmin,clipmax:x.autorangeoptions.clipmax,include:x.autorangeoptions.include,editType:"plot"},rangemode:x.rangemode,minallowed:x.minallowed,maxallowed:x.maxallowed,range:S({},x.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],anim:!1}),tickmode:x.minor.tickmode,nticks:x.nticks,tick0:x.tick0,dtick:x.dtick,tickvals:x.tickvals,ticktext:x.ticktext,ticks:x.ticks,mirror:x.mirror,ticklen:x.ticklen,tickwidth:x.tickwidth,tickcolor:x.tickcolor,showticklabels:x.showticklabels,labelalias:x.labelalias,tickfont:x.tickfont,tickangle:x.tickangle,tickprefix:x.tickprefix,showtickprefix:x.showtickprefix,ticksuffix:x.ticksuffix,showticksuffix:x.showticksuffix,showexponent:x.showexponent,exponentformat:x.exponentformat,minexponent:x.minexponent,separatethousands:x.separatethousands,tickformat:x.tickformat,tickformatstops:x.tickformatstops,hoverformat:x.hoverformat,showline:x.showline,linecolor:x.linecolor,linewidth:x.linewidth,showgrid:x.showgrid,gridcolor:S({},x.gridcolor,{dflt:"rgb(204, 204, 204)"}),gridwidth:x.gridwidth,zeroline:x.zeroline,zerolinecolor:x.zerolinecolor,zerolinewidth:x.zerolinewidth},"plot","from-root")}}),SE=Xe({"src/plots/gl3d/layout/layout_attributes.js"(Z,G){"use strict";var v=AE(),x=wc().attributes,S=Qo().extendFlat,E=sa().counterRegex;function e(t,r,o){return{x:{valType:"number",dflt:t,editType:"camera"},y:{valType:"number",dflt:r,editType:"camera"},z:{valType:"number",dflt:o,editType:"camera"},editType:"camera"}}G.exports={_arrayAttrRegexps:[E("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:S(e(0,0,1),{}),center:S(e(0,0,0),{}),eye:S(e(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:x({name:"scene",editType:"plot"}),aspectmode:{valType:"enumerated",values:["auto","cube","data","manual"],dflt:"auto",editType:"plot",impliedEdits:{"aspectratio.x":void 0,"aspectratio.y":void 0,"aspectratio.z":void 0}},aspectratio:{x:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},y:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},z:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},editType:"plot",impliedEdits:{aspectmode:"manual"}},xaxis: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"}}}),aU=Xe({"src/plots/gl3d/layout/axis_defaults.js"(Z,G){"use strict";var v=Ch().mix,x=sa(),S=zl(),E=AE(),e=B5(),t=F_(),r=["xaxis","yaxis","zaxis"],o=100*136/187;G.exports=function(n,i,s){var h,c;function m(l,_){return x.coerce(h,c,E,l,_)}for(var p=0;p1;function m(p){if(!c){var T=v.validate(i[p],t[p]);if(T)return i[p]}}E(i,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(n,i,s,h){for(var c=s("bgcolor"),m=x.combine(c,h.paper_bgcolor),p=["up","center","eye"],T=0;T.999)&&(M="turntable")}else M="turntable";s("dragmode",M),s("hovermode",h.getDfltFromLayout("hovermode"))}}}),v0=Xe({"src/plots/gl3d/index.js"(Z){"use strict";var G=pc().overrideAll,v=Zm(),x=tU(),S=Hh().getSubplotData,E=sa(),e=vd(),t="gl3d",r="scene";Z.name=t,Z.attr=r,Z.idRoot=r,Z.idRegex=Z.attrRegex=E.counterRegex("scene"),Z.attributes=rU(),Z.layoutAttributes=SE(),Z.baseLayoutAttrOverrides=G({hoverlabel:v.hoverlabel},"plot","nested"),Z.supplyLayoutDefaults=iU(),Z.plot=function(a){for(var n=a._fullLayout,i=a._fullData,s=n._subplots[t],h=0;h0){R=h[L];break}return R}function T(y,f){if(!(y<1||f<1)){for(var R=m(y),L=m(f),z=1,F=0;FA;)L--,L/=p(L),L++,L1?z:1};function M(y,f,R){var L=R[8]+R[2]*f[0]+R[5]*f[1];return y[0]=(R[6]+R[0]*f[0]+R[3]*f[1])/L,y[1]=(R[7]+R[1]*f[0]+R[4]*f[1])/L,y}function g(y,f,R){return b(y,f,M,R),y}function b(y,f,R,L){for(var z=[0,0],F=y.shape[0],N=y.shape[1],O=0;O0&&this.contourStart[L]!==null&&this.contourEnd[L]!==null&&this.contourEnd[L]>this.contourStart[L]))for(f[L]=!0,z=this.contourStart[L];z$&&(this.minValues[U]=$),this.maxValues[U]<$&&(this.maxValues[U]=$));for(U=0;U<3;U++)this.objectOffset[U]=.5*(this.minValues[U]+this.maxValues[U]);for(U=0;U<3;U++)for(B=0;Bh&&(o.isomin=null,o.isomax=null);var c=i("x"),m=i("y"),p=i("z"),T=i("value");if(!c||!c.length||!m||!m.length||!p||!p.length||!T||!T.length){o.visible=!1;return}var l=x.getComponentMethod("calendars","handleTraceDefaults");l(r,o,["x","y","z"],n),i("valuehoverformat"),["x","y","z"].forEach(function(M){i(M+"hoverformat");var g="caps."+M,b=i(g+".show");b&&i(g+".fill");var d="slices."+M,u=i(d+".show");u&&(i(d+".fill"),i(d+".locations"))});var _=i("spaceframe.show");_&&i("spaceframe.fill");var w=i("surface.show");w&&(i("surface.count"),i("surface.fill"),i("surface.pattern"));var A=i("contour.show");A&&(i("contour.color"),i("contour.width")),["text","hovertext","hovertemplate","lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","opacity"].forEach(function(M){i(M)}),E(r,o,n,i,{prefix:"",cLetter:"c"}),o._length=null}G.exports={supplyDefaults:e,supplyIsoDefaults:t}}}),rT=Xe({"src/traces/streamtube/calc.js"(Z,G){"use strict";var v=sa(),x=Tp();function S(r,o){o._len=Math.min(o.u.length,o.v.length,o.w.length,o.x.length,o.y.length,o.z.length),o._u=t(o.u,o._len),o._v=t(o.v,o._len),o._w=t(o.w,o._len),o._x=t(o.x,o._len),o._y=t(o.y,o._len),o._z=t(o.z,o._len);var a=E(o);o._gridFill=a.fill,o._Xs=a.Xs,o._Ys=a.Ys,o._Zs=a.Zs,o._len=a.len;var n=0,i,s,h;o.starts&&(i=t(o.starts.x||[]),s=t(o.starts.y||[]),h=t(o.starts.z||[]),n=Math.min(i.length,s.length,h.length)),o._startsX=i||[],o._startsY=s||[],o._startsZ=h||[];var c=0,m=1/0,p;for(p=0;p1&&(u=o[i-1],f=a[i-1],L=n[i-1]),s=0;su?"-":"+")+"x"),A=A.replace("y",(y>f?"-":"+")+"y"),A=A.replace("z",(R>L?"-":"+")+"z");var O=function(){i=0,z=[],F=[],N=[]};(!i||i0;m--){var p=Math.min(c[m],c[m-1]),T=Math.max(c[m],c[m-1]);if(T>p&&p-1}function Q(wt,Ne){return wt===null?Ne:wt}function re(wt,Ne,Ke){se();var Te=[Ne],Ie=[Ke];if(q>=1)Te=[Ne],Ie=[Ke];else if(q>0){var Ve=ae(Ne,Ke);Te=Ve.xyzv,Ie=Ve.abc}for(var Ce=0;Ce-1?Ke[Pe]:$(ft,ct,_t);ir>-1?Ee[Pe]=ir:Ee[Pe]=fe(ft,ct,_t,Q(wt,Ct))}V(Ee[0],Ee[1],Ee[2])}}function ce(wt,Ne,Ke){var Te=function(Ie,Ve,Ce){re(wt,[Ne[Ie],Ne[Ve],Ne[Ce]],[Ke[Ie],Ke[Ve],Ke[Ce]])};Te(0,1,2),Te(2,3,0)}function be(wt,Ne,Ke){var Te=function(Ie,Ve,Ce){re(wt,[Ne[Ie],Ne[Ve],Ne[Ce]],[Ke[Ie],Ke[Ve],Ke[Ce]])};Te(0,1,2),Te(3,0,1),Te(2,3,0),Te(1,2,3)}function Ae(wt,Ne,Ke,Te){var Ie=wt[3];IeTe&&(Ie=Te);for(var Ve=(wt[3]-Ie)/(wt[3]-Ne[3]+1e-9),Ce=[],Ee=0;Ee<4;Ee++)Ce[Ee]=(1-Ve)*wt[Ee]+Ve*Ne[Ee];return Ce}function De(wt,Ne,Ke){return wt>=Ne&&wt<=Ke}function ze(wt){var Ne=.001*(O-N);return wt>=N-Ne&&wt<=O+Ne}function Ze(wt){for(var Ne=[],Ke=0;Ke<4;Ke++){var Te=wt[Ke];Ne.push([h._x[Te],h._y[Te],h._z[Te],h._value[Te]])}return Ne}var at=3;function nt(wt,Ne,Ke,Te,Ie,Ve){Ve||(Ve=1),Ke=[-1,-1,-1];var Ce=!1,Ee=[De(Ne[0][3],Te,Ie),De(Ne[1][3],Te,Ie),De(Ne[2][3],Te,Ie)];if(!Ee[0]&&!Ee[1]&&!Ee[2])return!1;var Pe=function(ct,_t,Ct){return ze(_t[0][3])&&ze(_t[1][3])&&ze(_t[2][3])?(re(ct,_t,Ct),!0):VeEe?[z,Ve]:[Ve,F];qt(Ne,Pe[0],Pe[1])}}var ft=[[Math.min(N,F),Math.max(N,F)],[Math.min(z,O),Math.max(z,O)]];["x","y","z"].forEach(function(ct){for(var _t=[],Ct=0;Ct0&&(Da.push(Wa.id),ct==="x"?Ia.push([Wa.distRatio,0,0]):ct==="y"?Ia.push([0,Wa.distRatio,0]):Ia.push([0,0,Wa.distRatio]))}else ct==="x"?fa=qr(1,u-1):ct==="y"?fa=qr(1,y-1):fa=qr(1,f-1);Da.length>0&&(ct==="x"?_t[ir]=Wt(wt,Da,rr,er,Ia,_t[ir]):ct==="y"?_t[ir]=kr(wt,Da,rr,er,Ia,_t[ir]):_t[ir]=mr(wt,Da,rr,er,Ia,_t[ir]),ir++),fa.length>0&&(ct==="x"?_t[ir]=tt(wt,fa,rr,er,_t[ir]):ct==="y"?_t[ir]=ot(wt,fa,rr,er,_t[ir]):_t[ir]=Qe(wt,fa,rr,er,_t[ir]),ir++)}var Ca=h.caps[ct];Ca.show&&Ca.fill&&(oe(Ca.fill),ct==="x"?_t[ir]=tt(wt,[0,u-1],rr,er,_t[ir]):ct==="y"?_t[ir]=ot(wt,[0,y-1],rr,er,_t[ir]):_t[ir]=Qe(wt,[0,f-1],rr,er,_t[ir]),ir++)}}),w===0&&le(),h._meshX=P,h._meshY=U,h._meshZ=B,h._meshIntensity=X,h._Xs=g,h._Ys=b,h._Zs=d}return Rr(),h}function s(h,c){var m=h.glplot.gl,p=v({gl:m}),T=new o(h,p,c.uid);return p._trace=T,T.update(c),h.glplot.add(p),T}G.exports={findNearestOnAxis:r,generateIsoMeshes:i,createIsosurfaceTrace:s}}}),fU=Xe({"src/traces/isosurface/index.js"(Z,G){"use strict";G.exports={attributes:tT(),supplyDefaults:EE().supplyDefaults,calc:kE(),colorbar:{min:"cmin",max:"cmax"},plot:aT().createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:v0(),categories:["gl3d","showLegend"],meta:{}}}}),hU=Xe({"lib/isosurface.js"(Z,G){"use strict";G.exports=fU()}}),CE=Xe({"src/traces/volume/attributes.js"(Z,G){"use strict";var v=ku(),x=tT(),S=gx(),E=ru(),e=Qo().extendFlat,t=pc().overrideAll,r=G.exports=t(e({x:x.x,y:x.y,z:x.z,value:x.value,isomin:x.isomin,isomax:x.isomax,surface:x.surface,spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:1}},slices:x.slices,caps:x.caps,text:x.text,hovertext:x.hovertext,xhoverformat:x.xhoverformat,yhoverformat:x.yhoverformat,zhoverformat:x.zhoverformat,valuehoverformat:x.valuehoverformat,hovertemplate:x.hovertemplate,hovertemplatefallback:x.hovertemplatefallback},v("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{colorbar:x.colorbar,opacity:x.opacity,opacityscale:S.opacityscale,lightposition:x.lightposition,lighting:x.lighting,flatshading:x.flatshading,contour:x.contour,hoverinfo:e({},E.hoverinfo),showlegend:e({},E.showlegend,{dflt:!1})}),"calc","nested");r.x.editType=r.y.editType=r.z.editType=r.value.editType="calc+clearAxisTypes"}}),pU=Xe({"src/traces/volume/defaults.js"(Z,G){"use strict";var v=sa(),x=CE(),S=EE().supplyIsoDefaults,E=ME().opacityscaleDefaults;G.exports=function(t,r,o,a){function n(i,s){return v.coerce(t,r,x,i,s)}S(t,r,o,a,n),E(t,r,a,n)}}}),dU=Xe({"src/traces/volume/convert.js"(Z,G){"use strict";var v=Yh().gl_mesh3d,x=tm().parseColorScale,S=sa().isArrayOrTypedArray,E=em(),e=rc().extractOpts,t=E1(),r=aT().findNearestOnAxis,o=aT().generateIsoMeshes;function a(s,h,c){this.scene=s,this.uid=c,this.mesh=h,this.name="",this.data=null,this.showContour=!1}var n=a.prototype;n.handlePick=function(s){if(s.object===this.mesh){var h=s.data.index,c=this.data._meshX[h],m=this.data._meshY[h],p=this.data._meshZ[h],T=this.data._Ys.length,l=this.data._Zs.length,_=r(c,this.data._Xs).id,w=r(m,this.data._Ys).id,A=r(p,this.data._Zs).id,M=s.index=A+l*w+l*T*_;s.traceCoordinate=[this.data._meshX[M],this.data._meshY[M],this.data._meshZ[M],this.data._value[M]];var g=this.data.hovertext||this.data.text;return S(g)&&g[M]!==void 0?s.textLabel=g[M]:g&&(s.textLabel=g),!0}},n.update=function(s){var h=this.scene,c=h.fullSceneLayout;this.data=o(s);function m(w,A,M,g){return A.map(function(b){return w.d2l(b,0,g)*M})}var p=t(m(c.xaxis,s._meshX,h.dataScale[0],s.xcalendar),m(c.yaxis,s._meshY,h.dataScale[1],s.ycalendar),m(c.zaxis,s._meshZ,h.dataScale[2],s.zcalendar)),T=t(s._meshI,s._meshJ,s._meshK),l={positions:p,cells:T,lightPosition:[s.lightposition.x,s.lightposition.y,s.lightposition.z],ambient:s.lighting.ambient,diffuse:s.lighting.diffuse,specular:s.lighting.specular,roughness:s.lighting.roughness,fresnel:s.lighting.fresnel,vertexNormalsEpsilon:s.lighting.vertexnormalsepsilon,faceNormalsEpsilon:s.lighting.facenormalsepsilon,opacity:s.opacity,opacityscale:s.opacityscale,contourEnable:s.contour.show,contourColor:E(s.contour.color).slice(0,3),contourWidth:s.contour.width,useFacetNormals:s.flatshading},_=e(s);l.vertexIntensity=s._meshIntensity,l.vertexIntensityBounds=[_.min,_.max],l.colormap=x(s),this.mesh.update(l)},n.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function i(s,h){var c=s.glplot.gl,m=v({gl:c}),p=new a(s,m,h.uid);return m._trace=p,p.update(h),s.glplot.add(m),p}G.exports=i}}),vU=Xe({"src/traces/volume/index.js"(Z,G){"use strict";G.exports={attributes:CE(),supplyDefaults:pU(),calc:kE(),colorbar:{min:"cmin",max:"cmax"},plot:dU(),moduleType:"trace",name:"volume",basePlotModule:v0(),categories:["gl3d","showLegend"],meta:{}}}}),mU=Xe({"lib/volume.js"(Z,G){"use strict";G.exports=vU()}}),gU=Xe({"src/traces/mesh3d/defaults.js"(Z,G){"use strict";var v=so(),x=sa(),S=_h(),E=M1();G.exports=function(t,r,o,a){function n(m,p){return x.coerce(t,r,E,m,p)}function i(m){var p=m.map(function(T){var l=n(T);return l&&x.isArrayOrTypedArray(l)?l:null});return p.every(function(T){return T&&T.length===p[0].length})&&p}var s=i(["x","y","z"]);if(!s){r.visible=!1;return}if(i(["i","j","k"]),r.i&&(!r.j||!r.k)||r.j&&(!r.k||!r.i)||r.k&&(!r.i||!r.j)){r.visible=!1;return}var h=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){n(m)});var c=n("contour.show");c&&(n("contour.color"),n("contour.width")),"intensity"in t?(n("intensity"),n("intensitymode"),S(t,r,a,n,{prefix:"",cLetter:"c"})):(r.showscale=!1,"facecolor"in t?n("facecolor"):"vertexcolor"in t?n("vertexcolor"):n("color",o)),n("text"),n("hovertext"),n("hovertemplate"),n("hovertemplatefallback"),n("xhoverformat"),n("yhoverformat"),n("zhoverformat"),r._length=null}}}),yU=Xe({"src/traces/mesh3d/calc.js"(Z,G){"use strict";var v=Tp();G.exports=function(S,E){E.intensity&&v(S,E,{vals:E.intensity,containerStr:"",cLetter:"c"})}}}),_U=Xe({"src/traces/mesh3d/convert.js"(Z,G){"use strict";var v=Yh().gl_mesh3d,x=Yh().delaunay_triangulate,S=Yh().alpha_shape,E=Yh().convex_hull,e=tm().parseColorScale,t=sa().isArrayOrTypedArray,r=em(),o=rc().extractOpts,a=E1();function n(l,_,w){this.scene=l,this.uid=w,this.mesh=_,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var i=n.prototype;i.handlePick=function(l){if(l.object===this.mesh){var _=l.index=l.data.index;l.data._cellCenter?l.traceCoordinate=l.data.dataCoordinate:l.traceCoordinate=[this.data.x[_],this.data.y[_],this.data.z[_]];var w=this.data.hovertext||this.data.text;return t(w)&&w[_]!==void 0?l.textLabel=w[_]:w&&(l.textLabel=w),!0}};function s(l){for(var _=[],w=l.length,A=0;A=_-.5)return!1;return!0}i.update=function(l){var _=this.scene,w=_.fullSceneLayout;this.data=l;var A=l.x.length,M=a(h(w.xaxis,l.x,_.dataScale[0],l.xcalendar),h(w.yaxis,l.y,_.dataScale[1],l.ycalendar),h(w.zaxis,l.z,_.dataScale[2],l.zcalendar)),g;if(l.i&&l.j&&l.k){if(l.i.length!==l.j.length||l.j.length!==l.k.length||!p(l.i,A)||!p(l.j,A)||!p(l.k,A))return;g=a(c(l.i),c(l.j),c(l.k))}else l.alphahull===0?g=E(M):l.alphahull>0?g=S(l.alphahull,M):g=m(l.delaunayaxis,M);var b={positions:M,cells:g,lightPosition:[l.lightposition.x,l.lightposition.y,l.lightposition.z],ambient:l.lighting.ambient,diffuse:l.lighting.diffuse,specular:l.lighting.specular,roughness:l.lighting.roughness,fresnel:l.lighting.fresnel,vertexNormalsEpsilon:l.lighting.vertexnormalsepsilon,faceNormalsEpsilon:l.lighting.facenormalsepsilon,opacity:l.opacity,contourEnable:l.contour.show,contourColor:r(l.contour.color).slice(0,3),contourWidth:l.contour.width,useFacetNormals:l.flatshading};if(l.intensity){var 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)},i.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function T(l,_){var w=l.glplot.gl,A=v({gl:w}),M=new n(l,A,_.uid);return A._trace=M,M.update(_),l.glplot.add(A),M}G.exports=T}}),xU=Xe({"src/traces/mesh3d/index.js"(Z,G){"use strict";G.exports={attributes:M1(),supplyDefaults:gU(),calc:yU(),colorbar:{min:"cmin",max:"cmax"},plot:_U(),moduleType:"trace",name:"mesh3d",basePlotModule:v0(),categories:["gl3d","showLegend"],meta:{}}}}),bU=Xe({"lib/mesh3d.js"(Z,G){"use strict";G.exports=xU()}}),LE=Xe({"src/traces/cone/attributes.js"(Z,G){"use strict";var v=ku(),x=tf().axisHoverFormat,{hovertemplateAttrs:S,templatefallbackAttrs:E}=Jl(),e=M1(),t=ru(),r=Qo().extendFlat,o={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},u:{valType:"data_array",editType:"calc"},v:{valType:"data_array",editType:"calc"},w:{valType:"data_array",editType:"calc"},sizemode:{valType:"enumerated",values:["scaled","absolute","raw"],editType:"calc",dflt:"scaled"},sizeref:{valType:"number",editType:"calc",min:0},anchor:{valType:"enumerated",editType:"calc",values:["tip","tail","cm","center"],dflt:"cm"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:S({editType:"calc"},{keys:["norm"]}),hovertemplatefallback:E({editType:"calc"}),uhoverformat:x("u",1),vhoverformat:x("v",1),whoverformat:x("w",1),xhoverformat:x("x"),yhoverformat:x("y"),zhoverformat:x("z"),showlegend:r({},t.showlegend,{dflt:!1})};r(o,v("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var a=["opacity","lightposition","lighting"];a.forEach(function(n){o[n]=e[n]}),o.hoverinfo=r({},t.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"}),G.exports=o}}),wU=Xe({"src/traces/cone/defaults.js"(Z,G){"use strict";var v=sa(),x=_h(),S=LE();G.exports=function(e,t,r,o){function a(T,l){return v.coerce(e,t,S,T,l)}var n=a("u"),i=a("v"),s=a("w"),h=a("x"),c=a("y"),m=a("z");if(!n||!n.length||!i||!i.length||!s||!s.length||!h||!h.length||!c||!c.length||!m||!m.length){t.visible=!1;return}var p=a("sizemode");a("sizeref",p==="raw"?1:.5),a("anchor"),a("lighting.ambient"),a("lighting.diffuse"),a("lighting.specular"),a("lighting.roughness"),a("lighting.fresnel"),a("lightposition.x"),a("lightposition.y"),a("lightposition.z"),x(e,t,o,a,{prefix:"",cLetter:"c"}),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("uhoverformat"),a("vhoverformat"),a("whoverformat"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),t._length=null}}}),TU=Xe({"src/traces/cone/calc.js"(Z,G){"use strict";var v=Tp();G.exports=function(S,E){for(var e=E.u,t=E.v,r=E.w,o=Math.min(E.x.length,E.y.length,E.z.length,e.length,t.length,r.length),a=-1/0,n=1/0,i=0;i2?p=c.slice(1,m-1):m===2?p=[(c[0]+c[1])/2]:p=c,p}function i(c){var m=c.length;return m===1?[.5,.5]:[c[1]-c[0],c[m-1]-c[m-2]]}function s(c,m){var p=c.fullSceneLayout,T=c.dataScale,l=m._len,_={};function w(fe,V){var Y=p[V],ee=T[r[V]];return S.simpleMap(fe,function(q){return Y.d2l(q)*ee})}if(_.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"),M=w(m._Ys,"yaxis"),g=w(m._Zs,"zaxis");_.meshgrid=[A,M,g],_.gridFill=m._gridFill;var b=m._slen;if(b)_.startingPositions=t(w(m._startsX,"xaxis"),w(m._startsY,"yaxis"),w(m._startsZ,"zaxis"));else{for(var d=M[0],u=n(A),y=n(g),f=new Array(u.length*y.length),R=0,L=0;Ld&&(d=R[0]),R[1]u&&(u=R[1])}function f(R){switch(R.type){case"GeometryCollection":R.geometries.forEach(f);break;case"Point":y(R.coordinates);break;case"MultiPoint":R.coordinates.forEach(y);break}}w.arcs.forEach(function(R){for(var L=-1,z=R.length,F;++Ld&&(d=F[0]),F[1]u&&(u=F[1])});for(M in w.objects)f(w.objects[M]);return[g,b,d,u]}function e(w,A){for(var M,g=w.length,b=g-A;b<--g;)M=w[b],w[b++]=w[g],w[g]=M}function t(w,A){return typeof A=="string"&&(A=w.objects[A]),A.type==="GeometryCollection"?{type:"FeatureCollection",features:A.geometries.map(function(M){return r(w,M)})}:r(w,A)}function r(w,A){var M=A.id,g=A.bbox,b=A.properties==null?{}:A.properties,d=o(w,A);return M==null&&g==null?{type:"Feature",properties:b,geometry:d}:g==null?{type:"Feature",id:M,properties:b,geometry:d}:{type:"Feature",id:M,bbox:g,properties:b,geometry:d}}function o(w,A){var M=S(w.transform),g=w.arcs;function b(L,z){z.length&&z.pop();for(var F=g[L<0?~L:L],N=0,O=F.length;N1)g=s(w,A,M);else for(b=0,g=new Array(d=w.arcs.length);b1)for(var z=1,F=y(R[0]),N,O;zF&&(O=R[0],R[0]=R[z],R[z]=O,F=N);return R}).filter(function(f){return f.length>0})}}function p(w,A){for(var M=0,g=w.length;M>>1;w[b]=2))throw new Error("n must be \u22652");f=w.bbox||E(w);var M=f[0],g=f[1],b=f[2],d=f[3],u;A={scale:[b-M?(b-M)/(u-1):1,d-g?(d-g)/(u-1):1],translate:[M,g]}}else f=w.bbox;var y=l(A),f,R,L=w.objects,z={};function F(P){return y(P)}function N(P){var U;switch(P.type){case"GeometryCollection":U={type:"GeometryCollection",geometries:P.geometries.map(N)};break;case"Point":U={type:"Point",coordinates:F(P.coordinates)};break;case"MultiPoint":U={type:"MultiPoint",coordinates:P.coordinates.map(F)};break;default:return P}return P.id!=null&&(U.id=P.id),P.bbox!=null&&(U.bbox=P.bbox),P.properties!=null&&(U.properties=P.properties),U}function O(P){var U=0,B=1,X=P.length,$,se=new Array(X);for(se[0]=y(P[0],0);++U0&&(E.push(e),e=[])}return e.length>0&&E.push(e),E},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 x=new Array(v.length),S=0;Se(N,z)),F)}function r(L,z,F={}){for(let O of L){if(O.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(O[O.length-1].length!==O[0].length)throw new Error("First and last Position are not equivalent.");for(let P=0;Pr(N,z)),F)}function a(L,z,F={}){if(L.length<2)throw new Error("coordinates must be an array of two or more positions");return S({type:"LineString",coordinates:L},z,F)}function n(L,z,F={}){return i(L.map(N=>a(N,z)),F)}function i(L,z={}){let F={type:"FeatureCollection"};return z.id&&(F.id=z.id),z.bbox&&(F.bbox=z.bbox),F.features=L,F}function s(L,z,F={}){return S({type:"MultiLineString",coordinates:L},z,F)}function h(L,z,F={}){return S({type:"MultiPoint",coordinates:L},z,F)}function c(L,z,F={}){return S({type:"MultiPolygon",coordinates:L},z,F)}function m(L,z,F={}){return S({type:"GeometryCollection",geometries:L},z,F)}function p(L,z=0){if(z&&!(z>=0))throw new Error("precision must be a positive number");let F=Math.pow(10,z||0);return Math.round(L*F)/F}function T(L,z="kilometers"){let F=v[z];if(!F)throw new Error(z+" units is invalid");return L*F}function l(L,z="kilometers"){let F=v[z];if(!F)throw new Error(z+" units is invalid");return L/F}function _(L,z){return M(l(L,z))}function w(L){let z=L%360;return z<0&&(z+=360),z}function A(L){return L=L%360,L>180?L-360:L<-180?L+360:L}function M(L){return L%(2*Math.PI)*180/Math.PI}function g(L){return L%360*Math.PI/180}function b(L,z="kilometers",F="kilometers"){if(!(L>=0))throw new Error("length must be a positive number");return T(l(L,z),F)}function d(L,z="meters",F="kilometers"){if(!(L>=0))throw new Error("area must be a positive number");let N=x[z];if(!N)throw new Error("invalid original units");let O=x[F];if(!O)throw new Error("invalid final units");return L/N*O}function u(L){return!isNaN(L)&&L!==null&&!Array.isArray(L)}function y(L){return L!==null&&typeof L=="object"&&!Array.isArray(L)}function f(L){if(!L)throw new Error("bbox is required");if(!Array.isArray(L))throw new Error("bbox must be an Array");if(L.length!==4&&L.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");L.forEach(z=>{if(!u(z))throw new Error("bbox must only contain numbers")})}function R(L){if(!L)throw new Error("id is required");if(["string","number"].indexOf(typeof L)===-1)throw new Error("id must be a number or a string")}Z.areaFactors=x,Z.azimuthToBearing=A,Z.bearingToAzimuth=w,Z.convertArea=d,Z.convertLength=b,Z.degreesToRadians=g,Z.earthRadius=G,Z.factors=v,Z.feature=S,Z.featureCollection=i,Z.geometry=E,Z.geometryCollection=m,Z.isNumber=u,Z.isObject=y,Z.lengthToDegrees=_,Z.lengthToRadians=l,Z.lineString=a,Z.lineStrings=n,Z.multiLineString=s,Z.multiPoint=h,Z.multiPolygon=c,Z.point=e,Z.points=t,Z.polygon=r,Z.polygons=o,Z.radiansToDegrees=M,Z.radiansToLength=T,Z.round=p,Z.validateBBox=f,Z.validateId=R}}),sT=Xe({"node_modules/@turf/meta/dist/cjs/index.cjs"(Z){"use strict";Object.defineProperty(Z,"__esModule",{value:!0});var G=oT();function v(l,_,w){if(l!==null)for(var A,M,g,b,d,u,y,f=0,R=0,L,z=l.type,F=z==="FeatureCollection",N=z==="Feature",O=F?l.features.length:1,P=0;Pu||F>y||N>f){d=R,u=A,y=F,f=N,g=0;return}var O=G.lineString.call(void 0,[d,R],w.properties);if(_(O,A,M,N,g)===!1)return!1;g++,d=R})===!1)return!1}}})}function h(l,_,w){var A=w,M=!1;return s(l,function(g,b,d,u,y){M===!1&&w===void 0?A=g:A=_(A,g,b,d,u,y),M=!0}),A}function c(l,_){if(!l)throw new Error("geojson is required");n(l,function(w,A,M){if(w.geometry!==null){var g=w.geometry.type,b=w.geometry.coordinates;switch(g){case"LineString":if(_(w,A,M,0,0)===!1)return!1;break;case"Polygon":for(var d=0;dn+S(i),0)}function S(a){let n=0,i;switch(a.type){case"Polygon":return E(a.coordinates);case"MultiPolygon":for(i=0;i0){n+=Math.abs(r(a[0]));for(let i=1;i=n?(s+2)%n:s+2],p=h[0]*t,T=c[1]*t,l=m[0]*t;i+=(l-p)*Math.sin(T),s++}return i*e}var o=x;Z.area=x,Z.default=o}}),zU=Xe({"node_modules/@turf/centroid/dist/cjs/index.cjs"(Z){"use strict";Object.defineProperty(Z,"__esModule",{value:!0});var G=oT(),v=sT();function x(E,e={}){let t=0,r=0,o=0;return v.coordEach.call(void 0,E,function(a){t+=a[0],r+=a[1],o++},!0),G.point.call(void 0,[t/o,r/o],e.properties)}var S=x;Z.centroid=x,Z.default=S}}),FU=Xe({"node_modules/@turf/bbox/dist/cjs/index.cjs"(Z){"use strict";Object.defineProperty(Z,"__esModule",{value:!0});var G=sT();function v(S,E={}){if(S.bbox!=null&&E.recompute!==!0)return S.bbox;let e=[1/0,1/0,-1/0,-1/0];return G.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&&z[F+1][0]<0)return F;return null}switch(b==="RUS"||b==="FJI"?u=function(z){var F;if(L(z)===null)F=z;else for(F=new Array(z.length),R=0;RF?N[O++]=[z[R][0]+360,z[R][1]]:R===F?(N[O++]=z[R],N[O++]=[z[R][0],-90]):N[O++]=z[R];var P=n.tester(N);P.pts.pop(),d.push(P)}:u=function(z){d.push(n.tester(z))},M.type){case"MultiPolygon":for(y=0;y0?P.properties.ct=l(P):P.properties.ct=[NaN,NaN],N.fIn=z,N.fOut=P,d.push(P)}else r.log(["Location",N.loc,"does not have a valid GeoJSON geometry.","Traces with locationmode *geojson-id* only support","*Polygon* and *MultiPolygon* geometries."].join(" "))}delete b[F]}switch(g.type){case"FeatureCollection":var R=g.features;for(u=0;ud&&(d=f,g=y)}else g=M;return E(g).geometry.coordinates}function _(A){var M=window.PlotlyGeoAssets||{},g=[];function b(R){return new Promise(function(L,z){v.json(R,function(F,N){if(F){delete M[R];var O=F.status===404?'GeoJSON at URL "'+R+'" does not exist.':"Unexpected error while fetching from "+R;return z(new Error(O))}return M[R]=N,L(N)})})}function d(R){return new Promise(function(L,z){var F=0,N=setInterval(function(){if(M[R]&&M[R]!=="pending")return clearInterval(N),L(M[R]);if(F>100)return clearInterval(N),z("Unexpected error while fetching from "+R);F++},50)})}for(var u=0;u")}}}),BU=Xe({"src/traces/scattergeo/event_data.js"(Z,G){"use strict";G.exports=function(x,S,E,e,t){x.lon=S.lon,x.lat=S.lat,x.location=S.loc?S.loc:null;var r=e[t];return r.fIn&&r.fIn.properties&&(x.properties=r.fIn.properties),x}}}),NU=Xe({"src/traces/scattergeo/select.js"(Z,G){"use strict";var v=Fu(),x=Hs().BADNUM;G.exports=function(E,e){var t=E.cd,r=E.xaxis,o=E.yaxis,a=[],n=t[0].trace,i,s,h,c,m,p=!v.hasMarkers(n)&&!v.hasText(n);if(p)return[];if(e===!1)for(m=0;mq?1:ee>=q?0:NaN}function S(ee){return ee.length===1&&(ee=E(ee)),{left:function(q,oe,ae,j){for(ae==null&&(ae=0),j==null&&(j=q.length);ae>>1;ee(q[Q],oe)<0?ae=Q+1:j=Q}return ae},right:function(q,oe,ae,j){for(ae==null&&(ae=0),j==null&&(j=q.length);ae>>1;ee(q[Q],oe)>0?j=Q:ae=Q+1}return ae}}}function E(ee){return function(q,oe){return x(ee(q),oe)}}var e=S(x),t=e.right,r=e.left;function o(ee,q){q==null&&(q=a);for(var oe=0,ae=ee.length-1,j=ee[0],Q=new Array(ae<0?0:ae);oeee?1:q>=ee?0:NaN}function s(ee){return ee===null?NaN:+ee}function h(ee,q){var oe=ee.length,ae=0,j=-1,Q=0,re,ce,be=0;if(q==null)for(;++j1)return be/(ae-1)}function c(ee,q){var oe=h(ee,q);return oe&&Math.sqrt(oe)}function m(ee,q){var oe=ee.length,ae=-1,j,Q,re;if(q==null){for(;++ae=j)for(Q=re=j;++aej&&(Q=j),re=j)for(Q=re=j;++aej&&(Q=j),re0)return[ee];if((ae=q0)for(ee=Math.ceil(ee/ce),q=Math.floor(q/ce),re=new Array(Q=Math.ceil(q-ee+1));++j=0?(Q>=M?10:Q>=g?5:Q>=b?2:1)*Math.pow(10,j):-Math.pow(10,-j)/(Q>=M?10:Q>=g?5:Q>=b?2:1)}function y(ee,q,oe){var ae=Math.abs(q-ee)/Math.max(0,oe),j=Math.pow(10,Math.floor(Math.log(ae)/Math.LN10)),Q=ae/j;return Q>=M?j*=10:Q>=g?j*=5:Q>=b&&(j*=2),qze;)Ze.pop(),--at;var nt=new Array(at+1),rt;for(Q=0;Q<=at;++Q)rt=nt[Q]=[],rt.x0=Q>0?Ze[Q-1]:De,rt.x1=Q=1)return+oe(ee[ae-1],ae-1,ee);var ae,j=(ae-1)*q,Q=Math.floor(j),re=+oe(ee[Q],Q,ee),ce=+oe(ee[Q+1],Q+1,ee);return re+(ce-re)*(j-Q)}}function z(ee,q,oe){return ee=l.call(ee,s).sort(x),Math.ceil((oe-q)/(2*(L(ee,.75)-L(ee,.25))*Math.pow(ee.length,-1/3)))}function F(ee,q,oe){return Math.ceil((oe-q)/(3.5*c(ee)*Math.pow(ee.length,-1/3)))}function N(ee,q){var oe=ee.length,ae=-1,j,Q;if(q==null){for(;++ae=j)for(Q=j;++aeQ&&(Q=j)}else for(;++ae=j)for(Q=j;++aeQ&&(Q=j);return Q}function O(ee,q){var oe=ee.length,ae=oe,j=-1,Q,re=0;if(q==null)for(;++j=0;)for(re=ee[q],oe=re.length;--oe>=0;)Q[--j]=re[oe];return Q}function B(ee,q){var oe=ee.length,ae=-1,j,Q;if(q==null){for(;++ae=j)for(Q=j;++aej&&(Q=j)}else for(;++ae=j)for(Q=j;++aej&&(Q=j);return Q}function X(ee,q){for(var oe=q.length,ae=new Array(oe);oe--;)ae[oe]=ee[q[oe]];return ae}function $(ee,q){if(oe=ee.length){var oe,ae=0,j=0,Q,re=ee[j];for(q==null&&(q=x);++ae0?1:Qt<0?-1:0},d=Math.sqrt,u=Math.tan;function y(Qt){return Qt>1?0:Qt<-1?a:Math.acos(Qt)}function f(Qt){return Qt>1?n:Qt<-1?-n:Math.asin(Qt)}function R(Qt){return(Qt=g(Qt/2))*Qt}function L(){}function z(Qt,br){Qt&&N.hasOwnProperty(Qt.type)&&N[Qt.type](Qt,br)}var F={Feature:function(Qt,br){z(Qt.geometry,br)},FeatureCollection:function(Qt,br){for(var aa=Qt.features,$r=-1,ka=aa.length;++$r=0?1:-1,ka=$r*aa,li=l(br),Ci=g(br),Hi=V*Ci,Qi=fe*li+Hi*l(ka),dn=Hi*$r*g(ka);B.add(T(dn,Qi)),le=Qt,fe=li,V=Ci}function j(Qt){return X.reset(),U(Qt,Y),X*2}function Q(Qt){return[T(Qt[1],Qt[0]),f(Qt[2])]}function re(Qt){var br=Qt[0],aa=Qt[1],$r=l(aa);return[$r*l(br),$r*g(br),g(aa)]}function ce(Qt,br){return Qt[0]*br[0]+Qt[1]*br[1]+Qt[2]*br[2]}function be(Qt,br){return[Qt[1]*br[2]-Qt[2]*br[1],Qt[2]*br[0]-Qt[0]*br[2],Qt[0]*br[1]-Qt[1]*br[0]]}function Ae(Qt,br){Qt[0]+=br[0],Qt[1]+=br[1],Qt[2]+=br[2]}function De(Qt,br){return[Qt[0]*br,Qt[1]*br,Qt[2]*br]}function ze(Qt){var br=d(Qt[0]*Qt[0]+Qt[1]*Qt[1]+Qt[2]*Qt[2]);Qt[0]/=br,Qt[1]/=br,Qt[2]/=br}var Ze,at,nt,rt,st,Me,ye,he,Oe=S(),tt,ot,Qe={point:Pt,lineStart:qt,lineEnd:Wt,polygonStart:function(){Qe.point=kr,Qe.lineStart=mr,Qe.lineEnd=qr,Oe.reset(),Y.polygonStart()},polygonEnd:function(){Y.polygonEnd(),Qe.point=Pt,Qe.lineStart=qt,Qe.lineEnd=Wt,B<0?(Ze=-(nt=180),at=-(rt=90)):Oe>r?rt=90:Oe<-r&&(at=-90),ot[0]=Ze,ot[1]=nt},sphere:function(){Ze=-(nt=180),at=-(rt=90)}};function Pt(Qt,br){tt.push(ot=[Ze=Qt,nt=Qt]),brrt&&(rt=br)}function It(Qt,br){var aa=re([Qt*c,br*c]);if(he){var $r=be(he,aa),ka=[$r[1],-$r[0],0],li=be(ka,$r);ze(li),li=Q(li);var Ci=Qt-st,Hi=Ci>0?1:-1,Qi=li[0]*h*Hi,dn,Pi=m(Ci)>180;Pi^(Hi*strt&&(rt=dn)):(Qi=(Qi+360)%360-180,Pi^(Hi*strt&&(rt=br))),Pi?QtSr(Ze,nt)&&(nt=Qt):Sr(Qt,nt)>Sr(Ze,nt)&&(Ze=Qt):nt>=Ze?(Qtnt&&(nt=Qt)):Qt>st?Sr(Ze,Qt)>Sr(Ze,nt)&&(nt=Qt):Sr(Qt,nt)>Sr(Ze,nt)&&(Ze=Qt)}else tt.push(ot=[Ze=Qt,nt=Qt]);brrt&&(rt=br),he=aa,st=Qt}function qt(){Qe.point=It}function Wt(){ot[0]=Ze,ot[1]=nt,Qe.point=Pt,he=null}function kr(Qt,br){if(he){var aa=Qt-st;Oe.add(m(aa)>180?aa+(aa>0?360:-360):aa)}else Me=Qt,ye=br;Y.point(Qt,br),It(Qt,br)}function mr(){Y.lineStart()}function qr(){kr(Me,ye),Y.lineEnd(),m(Oe)>r&&(Ze=-(nt=180)),ot[0]=Ze,ot[1]=nt,he=null}function Sr(Qt,br){return(br-=Qt)<0?br+360:br}function Rr(Qt,br){return Qt[0]-br[0]}function wt(Qt,br){return Qt[0]<=Qt[1]?Qt[0]<=br&&br<=Qt[1]:brSr($r[0],$r[1])&&($r[1]=ka[1]),Sr(ka[0],$r[1])>Sr($r[0],$r[1])&&($r[0]=ka[0])):li.push($r=ka);for(Ci=-1/0,aa=li.length-1,br=0,$r=li[aa];br<=aa;$r=ka,++br)ka=li[br],(Hi=Sr($r[1],ka[0]))>Ci&&(Ci=Hi,Ze=ka[0],nt=$r[1])}return tt=ot=null,Ze===1/0||at===1/0?[[NaN,NaN],[NaN,NaN]]:[[Ze,at],[nt,rt]]}var Ke,Te,Ie,Ve,Ce,Ee,Pe,ft,ct,_t,Ct,ir,rr,er,Lr,fa,Da={sphere:L,point:Ia,lineStart:Wa,lineEnd:wi,polygonStart:function(){Da.lineStart=Kt,Da.lineEnd=Ft},polygonEnd:function(){Da.lineStart=Wa,Da.lineEnd=wi}};function Ia(Qt,br){Qt*=c,br*=c;var aa=l(br);qa(aa*l(Qt),aa*g(Qt),g(br))}function qa(Qt,br,aa){++Ke,Ie+=(Qt-Ie)/Ke,Ve+=(br-Ve)/Ke,Ce+=(aa-Ce)/Ke}function Wa(){Da.point=Ca}function Ca(Qt,br){Qt*=c,br*=c;var aa=l(br);er=aa*l(Qt),Lr=aa*g(Qt),fa=g(br),Da.point=hi,qa(er,Lr,fa)}function hi(Qt,br){Qt*=c,br*=c;var aa=l(br),$r=aa*l(Qt),ka=aa*g(Qt),li=g(br),Ci=T(d((Ci=Lr*li-fa*ka)*Ci+(Ci=fa*$r-er*li)*Ci+(Ci=er*ka-Lr*$r)*Ci),er*$r+Lr*ka+fa*li);Te+=Ci,Ee+=Ci*(er+(er=$r)),Pe+=Ci*(Lr+(Lr=ka)),ft+=Ci*(fa+(fa=li)),qa(er,Lr,fa)}function wi(){Da.point=Ia}function Kt(){Da.point=Yt}function Ft(){Jt(ir,rr),Da.point=Ia}function Yt(Qt,br){ir=Qt,rr=br,Qt*=c,br*=c,Da.point=Jt;var aa=l(br);er=aa*l(Qt),Lr=aa*g(Qt),fa=g(br),qa(er,Lr,fa)}function Jt(Qt,br){Qt*=c,br*=c;var aa=l(br),$r=aa*l(Qt),ka=aa*g(Qt),li=g(br),Ci=Lr*li-fa*ka,Hi=fa*$r-er*li,Qi=er*ka-Lr*$r,dn=d(Ci*Ci+Hi*Hi+Qi*Qi),Pi=f(dn),Di=dn&&-Pi/dn;ct+=Di*Ci,_t+=Di*Hi,Ct+=Di*Qi,Te+=Pi,Ee+=Pi*(er+(er=$r)),Pe+=Pi*(Lr+(Lr=ka)),ft+=Pi*(fa+(fa=li)),qa(er,Lr,fa)}function Fr(Qt){Ke=Te=Ie=Ve=Ce=Ee=Pe=ft=ct=_t=Ct=0,U(Qt,Da);var br=ct,aa=_t,$r=Ct,ka=br*br+aa*aa+$r*$r;return kaa?Qt+Math.round(-Qt/s)*s:Qt,br]}ca.invert=ca;function Ba(Qt,br,aa){return(Qt%=s)?br||aa?ra(Za(Qt),ri(br,aa)):Za(Qt):br||aa?ri(br,aa):ca}function $a(Qt){return function(br,aa){return br+=Qt,[br>a?br-s:br<-a?br+s:br,aa]}}function Za(Qt){var br=$a(Qt);return br.invert=$a(-Qt),br}function ri(Qt,br){var aa=l(Qt),$r=g(Qt),ka=l(br),li=g(br);function Ci(Hi,Qi){var dn=l(Qi),Pi=l(Hi)*dn,Di=g(Hi)*dn,Ni=g(Qi),mi=Ni*aa+Pi*$r;return[T(Di*ka-mi*li,Pi*aa-Ni*$r),f(mi*ka+Di*li)]}return Ci.invert=function(Hi,Qi){var dn=l(Qi),Pi=l(Hi)*dn,Di=g(Hi)*dn,Ni=g(Qi),mi=Ni*ka-Di*li;return[T(Di*ka+Ni*li,Pi*aa+mi*$r),f(mi*aa-Pi*$r)]},Ci}function pi(Qt){Qt=Ba(Qt[0]*c,Qt[1]*c,Qt.length>2?Qt[2]*c:0);function br(aa){return aa=Qt(aa[0]*c,aa[1]*c),aa[0]*=h,aa[1]*=h,aa}return br.invert=function(aa){return aa=Qt.invert(aa[0]*c,aa[1]*c),aa[0]*=h,aa[1]*=h,aa},br}function Ra(Qt,br,aa,$r,ka,li){if(aa){var Ci=l(br),Hi=g(br),Qi=$r*aa;ka==null?(ka=br+$r*s,li=br-Qi/2):(ka=tn(Ci,ka),li=tn(Ci,li),($r>0?kali)&&(ka+=$r*s));for(var dn,Pi=ka;$r>0?Pi>li:Pi1&&Qt.push(Qt.pop().concat(Qt.shift()))},result:function(){var aa=Qt;return Qt=[],br=null,aa}}}function Tt(Qt,br){return m(Qt[0]-br[0])=0;--Hi)ka.point((Di=Pi[Hi])[0],Di[1]);else $r(Ni.x,Ni.p.x,-1,ka);Ni=Ni.p}Ni=Ni.o,Pi=Ni.z,mi=!mi}while(!Ni.v);ka.lineEnd()}}}function Cr(Qt){if(br=Qt.length){for(var br,aa=0,$r=Qt[0],ka;++aa=0?1:-1,Os=rl*Ss,el=Os>a,bs=Qn*yo;if(xr.add(T(bs*rl*g(Os),ao*Ko+bs*l(Os))),Ci+=el?Ss+rl*s:Ss,el^mi>=aa^An>=aa){var Fl=be(re(Ni),re(fo));ze(Fl);var _l=be(li,Fl);ze(_l);var ll=(el^Ss>=0?-1:1)*f(_l[2]);($r>ll||$r===ll&&(Fl[0]||Fl[1]))&&(Hi+=el^Ss>=0?1:-1)}}return(Ci<-r||Ci0){for(Qi||(ka.polygonStart(),Qi=!0),ka.lineStart(),Ko=0;Ko1&&un&2&&yo.push(yo.pop().concat(yo.shift())),Pi.push(yo.filter(xt))}}return Ni}}function xt(Qt){return Qt.length>1}function Xt(Qt,br){return((Qt=Qt.x)[0]<0?Qt[1]-n-r:n-Qt[1])-((br=br.x)[0]<0?br[1]-n-r:n-br[1])}var vr=Hr(function(){return!0},Or,Pa,[-a,-n]);function Or(Qt){var br=NaN,aa=NaN,$r=NaN,ka;return{lineStart:function(){Qt.lineStart(),ka=1},point:function(li,Ci){var Hi=li>0?a:-a,Qi=m(li-br);m(Qi-a)0?n:-n),Qt.point($r,aa),Qt.lineEnd(),Qt.lineStart(),Qt.point(Hi,aa),Qt.point(li,aa),ka=0):$r!==Hi&&Qi>=a&&(m(br-$r)r?p((g(br)*(li=l($r))*g(aa)-g($r)*(ka=l(br))*g(Qt))/(ka*li*Ci)):(br+$r)/2}function Pa(Qt,br,aa,$r){var ka;if(Qt==null)ka=aa*n,$r.point(-a,ka),$r.point(0,ka),$r.point(a,ka),$r.point(a,0),$r.point(a,-ka),$r.point(0,-ka),$r.point(-a,-ka),$r.point(-a,0),$r.point(-a,ka);else if(m(Qt[0]-br[0])>r){var li=Qt[0]0,ka=m(br)>r;function li(Pi,Di,Ni,mi){Ra(mi,Qt,aa,Ni,Pi,Di)}function Ci(Pi,Di){return l(Pi)*l(Di)>br}function Hi(Pi){var Di,Ni,mi,Mn,Qn;return{lineStart:function(){Mn=mi=!1,Qn=1},point:function(ao,eo){var fo=[ao,eo],An,un=Ci(ao,eo),yo=$r?un?0:dn(ao,eo):un?dn(ao+(ao<0?a:-a),eo):0;if(!Di&&(Mn=mi=un)&&Pi.lineStart(),un!==mi&&(An=Qi(Di,fo),(!An||Tt(Di,An)||Tt(fo,An))&&(fo[2]=1)),un!==mi)Qn=0,un?(Pi.lineStart(),An=Qi(fo,Di),Pi.point(An[0],An[1])):(An=Qi(Di,fo),Pi.point(An[0],An[1],2),Pi.lineEnd()),Di=An;else if(ka&&Di&&$r^un){var Ko;!(yo&Ni)&&(Ko=Qi(fo,Di,!0))&&(Qn=0,$r?(Pi.lineStart(),Pi.point(Ko[0][0],Ko[0][1]),Pi.point(Ko[1][0],Ko[1][1]),Pi.lineEnd()):(Pi.point(Ko[1][0],Ko[1][1]),Pi.lineEnd(),Pi.lineStart(),Pi.point(Ko[0][0],Ko[0][1],3)))}un&&(!Di||!Tt(Di,fo))&&Pi.point(fo[0],fo[1]),Di=fo,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=re(Pi),Mn=re(Di),Qn=[1,0,0],ao=be(mi,Mn),eo=ce(ao,ao),fo=ao[0],An=eo-fo*fo;if(!An)return!Ni&Πvar un=br*eo/An,yo=-br*fo/An,Ko=be(Qn,ao),Ss=De(Qn,un),rl=De(ao,yo);Ae(Ss,rl);var Os=Ko,el=ce(Ss,Os),bs=ce(Os,Os),Fl=el*el-bs*(ce(Ss,Ss)-1);if(!(Fl<0)){var _l=d(Fl),ll=De(Os,(-el-_l)/bs);if(Ae(ll,Ss),ll=Q(ll),!Ni)return ll;var Un=Pi[0],Lo=Di[0],Js=Pi[1],Rs=Di[1],uu;Lo0^ll[1]<(m(ll[0]-Un)a^(Un<=ll[0]&&ll[0]<=Lo)){var bu=De(Os,(-el+_l)/bs);return Ae(bu,Ss),[ll,Q(bu)]}}}function dn(Pi,Di){var Ni=$r?Qt:a-Qt,mi=0;return Pi<-Ni?mi|=1:Pi>Ni&&(mi|=2),Di<-Ni?mi|=4:Di>Ni&&(mi|=8),mi}return Hr(Ci,Hi,li,$r?[0,-Qt]:[-a,Qt-a])}function la(Qt,br,aa,$r,ka,li){var Ci=Qt[0],Hi=Qt[1],Qi=br[0],dn=br[1],Pi=0,Di=1,Ni=Qi-Ci,mi=dn-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&&(br[0]=Ci+Di*Ni,br[1]=Hi+Di*mi),!0}}}}}var Ta=1e9,Ai=-Ta;function ki(Qt,br,aa,$r){function ka(dn,Pi){return Qt<=dn&&dn<=aa&&br<=Pi&&Pi<=$r}function li(dn,Pi,Di,Ni){var mi=0,Mn=0;if(dn==null||(mi=Ci(dn,Di))!==(Mn=Ci(Pi,Di))||Qi(dn,Pi)<0^Di>0)do Ni.point(mi===0||mi===3?Qt:aa,mi>1?$r:br);while((mi=(mi+Di+4)%4)!==Mn);else Ni.point(Pi[0],Pi[1])}function Ci(dn,Pi){return m(dn[0]-Qt)0?0:3:m(dn[0]-aa)0?2:1:m(dn[1]-br)0?1:0:Pi>0?3:2}function Hi(dn,Pi){return Qi(dn.x,Pi.x)}function Qi(dn,Pi){var Di=Ci(dn,1),Ni=Ci(Pi,1);return Di!==Ni?Di-Ni:Di===0?Pi[1]-dn[1]:Di===1?dn[0]-Pi[0]:Di===2?dn[1]-Pi[1]:Pi[0]-dn[0]}return function(dn){var Pi=dn,Di=hn(),Ni,mi,Mn,Qn,ao,eo,fo,An,un,yo,Ko,Ss={point:rl,lineStart:Fl,lineEnd:_l,polygonStart:el,polygonEnd:bs};function rl(Un,Lo){ka(Un,Lo)&&Pi.point(Un,Lo)}function Os(){for(var Un=0,Lo=0,Js=mi.length;Lo$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=[],Ko=!0}function bs(){var Un=Os(),Lo=Ko&&Un,Js=(Ni=x.merge(Ni)).length;(Lo||Js)&&(dn.polygonStart(),Lo&&(dn.lineStart(),li(null,null,1,dn),dn.lineEnd()),Js&&Br(Ni,Hi,Un,li,dn),dn.polygonEnd()),Pi=dn,Ni=mi=Mn=null}function Fl(){Ss.point=ll,mi&&mi.push(Mn=[]),yo=!0,un=!1,fo=An=NaN}function _l(){Ni&&(ll(Qn,ao),eo&&un&&Di.rejoin(),Ni.push(Di.result())),Ss.point=rl,un&&Pi.lineEnd()}function ll(Un,Lo){var Js=ka(Un,Lo);if(mi&&Mn.push([Un,Lo]),yo)Qn=Un,ao=Lo,eo=Js,yo=!1,Js&&(Pi.lineStart(),Pi.point(Un,Lo));else if(Js&&un)Pi.point(Un,Lo);else{var Rs=[fo=Math.max(Ai,Math.min(Ta,fo)),An=Math.max(Ai,Math.min(Ta,An))],uu=[Un=Math.max(Ai,Math.min(Ta,Un)),Lo=Math.max(Ai,Math.min(Ta,Lo))];la(Rs,uu,Qt,br,aa,$r)?(un||(Pi.lineStart(),Pi.point(Rs[0],Rs[1])),Pi.point(uu[0],uu[1]),Js||Pi.lineEnd(),Ko=!1):Js&&(Pi.lineStart(),Pi.point(Un,Lo),Ko=!1)}fo=Un,An=Lo,un=Js}return Ss}}function Ki(){var Qt=0,br=0,aa=960,$r=500,ka,li,Ci;return Ci={stream:function(Hi){return ka&&li===Hi?ka:ka=ki(Qt,br,aa,$r)(li=Hi)},extent:function(Hi){return arguments.length?(Qt=+Hi[0][0],br=+Hi[0][1],aa=+Hi[1][0],$r=+Hi[1][1],ka=li=null,Ci):[[Qt,br],[aa,$r]]}}}var _n=S(),Rn,En,On,no={sphere:L,point:L,lineStart:cn,lineEnd:L,polygonStart:L,polygonEnd:L};function cn(){no.point=Wo,no.lineEnd=lo}function lo(){no.point=no.lineEnd=L}function Wo(Qt,br){Qt*=c,br*=c,Rn=Qt,En=g(br),On=l(br),no.point=hs}function hs(Qt,br){Qt*=c,br*=c;var aa=g(br),$r=l(br),ka=m(Qt-Rn),li=l(ka),Ci=g(ka),Hi=$r*Ci,Qi=On*aa-En*$r*li,dn=En*aa+On*$r*li;_n.add(T(d(Hi*Hi+Qi*Qi),dn)),Rn=Qt,En=aa,On=$r}function Oo(Qt){return _n.reset(),U(Qt,no),+_n}var Wn=[null,null],No={type:"LineString",coordinates:Wn};function as(Qt,br){return Wn[0]=Qt,Wn[1]=br,Oo(No)}var Ns={Feature:function(Qt,br){return uo(Qt.geometry,br)},FeatureCollection:function(Qt,br){for(var aa=Qt.features,$r=-1,ka=aa.length;++$r0&&(ka=as(Qt[li],Qt[li-1]),ka>0&&aa<=ka&&$r<=ka&&(aa+$r-ka)*(1-Math.pow((aa-$r)/ka,2))r}).map(Ni)).concat(x.range(_(li/dn)*dn,ka,dn).filter(function(An){return m(An%Di)>r}).map(mi))}return eo.lines=function(){return fo().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(ao)):[[$r,Hi],[aa,Ci]]},eo.extentMinor=function(An){return arguments.length?(br=+An[0][0],Qt=+An[1][0],li=+An[0][1],ka=+An[1][1],br>Qt&&(An=br,br=Qt,Qt=An),li>ka&&(An=li,li=ka,ka=An),eo.precision(ao)):[[br,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],dn=+An[1],eo):[Qi,dn]},eo.precision=function(An){return arguments.length?(ao=+An,Ni=Gi(li,ka,90),mi=Ln(br,Qt,ao),Mn=Gi(Hi,Ci,90),Qn=Ln($r,aa,ao),eo):ao},eo.extentMajor([[-180,-90+r],[180,90-r]]).extentMinor([[-180,-80-r],[180,80+r]])}function _s(){return Us()()}function Gn(Qt,br){var aa=Qt[0]*c,$r=Qt[1]*c,ka=br[0]*c,li=br[1]*c,Ci=l($r),Hi=g($r),Qi=l(li),dn=g(li),Pi=Ci*l(aa),Di=Ci*g(aa),Ni=Qi*l(ka),mi=Qi*g(ka),Mn=2*f(d(R(li-$r)+Ci*Qi*R(ka-aa))),Qn=g(Mn),ao=Mn?function(eo){var fo=g(eo*=Mn)/Qn,An=g(Mn-eo)/Qn,un=An*Pi+fo*Ni,yo=An*Di+fo*mi,Ko=An*Hi+fo*dn;return[T(yo,un)*h,T(Ko,d(un*un+yo*yo))*h]}:function(){return[aa*h,$r*h]};return ao.distance=Mn,ao}function zs(Qt){return Qt}var vs=S(),Ws=S(),il,xn,ko,bo,Is={point:L,lineStart:L,lineEnd:L,polygonStart:function(){Is.lineStart=pu,Is.lineEnd=vl},polygonEnd:function(){Is.lineStart=Is.lineEnd=Is.point=L,vs.add(m(Ws)),Ws.reset()},result:function(){var Qt=vs/2;return vs.reset(),Qt}};function pu(){Is.point=co}function co(Qt,br){Is.point=Vs,il=ko=Qt,xn=bo=br}function Vs(Qt,br){Ws.add(bo*Qt-ko*br),ko=Qt,bo=br}function vl(){Vs(il,xn)}var Ts=1/0,js=Ts,us=-Ts,As=us,Nl={point:su,lineStart:L,lineEnd:L,polygonStart:L,polygonEnd:L,result:function(){var Qt=[[Ts,js],[us,As]];return us=As=-(js=Ts=1/0),Qt}};function su(Qt,br){Qtus&&(us=Qt),brAs&&(As=br)}var Tc=0,du=0,Sf=0,Uc=0,Fs=0,dc=0,Hc=0,lu=0,Pl=0,ic,Ou,nl,ml,xs={point:Xs,lineStart:nc,lineEnd:fl,polygonStart:function(){xs.lineStart=xh,xs.lineEnd=ns},polygonEnd:function(){xs.point=Xs,xs.lineStart=nc,xs.lineEnd=fl},result:function(){var Qt=Pl?[Hc/Pl,lu/Pl]:dc?[Uc/dc,Fs/dc]:Sf?[Tc/Sf,du/Sf]:[NaN,NaN];return Tc=du=Sf=Uc=Fs=dc=Hc=lu=Pl=0,Qt}};function Xs(Qt,br){Tc+=Qt,du+=br,++Sf}function nc(){xs.point=Ul}function Ul(Qt,br){xs.point=qu,Xs(nl=Qt,ml=br)}function qu(Qt,br){var aa=Qt-nl,$r=br-ml,ka=d(aa*aa+$r*$r);Uc+=ka*(nl+Qt)/2,Fs+=ka*(ml+br)/2,dc+=ka,Xs(nl=Qt,ml=br)}function fl(){xs.point=Xs}function xh(){xs.point=bh}function ns(){Es(ic,Ou)}function bh(Qt,br){xs.point=Es,Xs(ic=nl=Qt,Ou=ml=br)}function Es(Qt,br){var aa=Qt-nl,$r=br-ml,ka=d(aa*aa+$r*$r);Uc+=ka*(nl+Qt)/2,Fs+=ka*(ml+br)/2,dc+=ka,ka=ml*Qt-nl*br,Hc+=ka*(nl+Qt),lu+=ka*(ml+br),Pl+=ka*3,Xs(nl=Qt,ml=br)}function to(Qt){this._context=Qt}to.prototype={_radius:4.5,pointRadius:function(Qt){return this._radius=Qt,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(Qt,br){switch(this._point){case 0:{this._context.moveTo(Qt,br),this._point=1;break}case 1:{this._context.lineTo(Qt,br);break}default:{this._context.moveTo(Qt+this._radius,br),this._context.arc(Qt,br,this._radius,0,s);break}}},result:L};var Wc=S(),Vu,jl,Mf,Ac,nf,$l={point:L,lineStart:function(){$l.point=Jf},lineEnd:function(){Vu&&Of(jl,Mf),$l.point=L},polygonStart:function(){Vu=!0},polygonEnd:function(){Vu=null},result:function(){var Qt=+Wc;return Wc.reset(),Qt}};function Jf(Qt,br){$l.point=Of,jl=Ac=Qt,Mf=nf=br}function Of(Qt,br){Ac-=Qt,nf-=br,Wc.add(d(Ac*Ac+nf*nf)),Ac=Qt,nf=br}function of(){this._string=[]}of.prototype={_radius:4.5,_circle:jc(4.5),pointRadius:function(Qt){return(Qt=+Qt)!==this._radius&&(this._radius=Qt,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._string.push("Z"),this._point=NaN},point:function(Qt,br){switch(this._point){case 0:{this._string.push("M",Qt,",",br),this._point=1;break}case 1:{this._string.push("L",Qt,",",br);break}default:{this._circle==null&&(this._circle=jc(this._radius)),this._string.push("M",Qt,",",br,this._circle);break}}},result:function(){if(this._string.length){var Qt=this._string.join("");return this._string=[],Qt}else return null}};function jc(Qt){return"m0,"+Qt+"a"+Qt+","+Qt+" 0 1,1 0,"+-2*Qt+"a"+Qt+","+Qt+" 0 1,1 0,"+2*Qt+"z"}function Bf(Qt,br){var aa=4.5,$r,ka;function li(Ci){return Ci&&(typeof aa=="function"&&ka.pointRadius(+aa.apply(this,arguments)),U(Ci,$r(ka))),ka.result()}return li.area=function(Ci){return U(Ci,$r(Is)),Is.result()},li.measure=function(Ci){return U(Ci,$r($l)),$l.result()},li.bounds=function(Ci){return U(Ci,$r(Nl)),Nl.result()},li.centroid=function(Ci){return U(Ci,$r(xs)),xs.result()},li.projection=function(Ci){return arguments.length?($r=Ci==null?(Qt=null,zs):(Qt=Ci).stream,li):Qt},li.context=function(Ci){return arguments.length?(ka=Ci==null?(br=null,new of):new to(br=Ci),typeof aa!="function"&&ka.pointRadius(aa),li):br},li.pointRadius=function(Ci){return arguments.length?(aa=typeof Ci=="function"?Ci:(ka.pointRadius(+Ci),+Ci),li):aa},li.projection(Qt).context(br)}function Nf(Qt){return{stream:Gu(Qt)}}function Gu(Qt){return function(br){var aa=new Ef;for(var $r in Qt)aa[$r]=Qt[$r];return aa.stream=br,aa}}function Ef(){}Ef.prototype={constructor:Ef,point:function(Qt,br){this.stream.point(Qt,br)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function oc(Qt,br,aa){var $r=Qt.clipExtent&&Qt.clipExtent();return Qt.scale(150).translate([0,0]),$r!=null&&Qt.clipExtent(null),U(aa,Qt.stream(Nl)),br(Nl.result()),$r!=null&&Qt.clipExtent($r),Qt}function Xc(Qt,br,aa){return oc(Qt,function($r){var ka=br[1][0]-br[0][0],li=br[1][1]-br[0][1],Ci=Math.min(ka/($r[1][0]-$r[0][0]),li/($r[1][1]-$r[0][1])),Hi=+br[0][0]+(ka-Ci*($r[1][0]+$r[0][0]))/2,Qi=+br[0][1]+(li-Ci*($r[1][1]+$r[0][1]))/2;Qt.scale(150*Ci).translate([Hi,Qi])},aa)}function Ql(Qt,br,aa){return Xc(Qt,[[0,0],br],aa)}function qc(Qt,br,aa){return oc(Qt,function($r){var ka=+br,li=ka/($r[1][0]-$r[0][0]),Ci=(ka-li*($r[1][0]+$r[0][0]))/2,Hi=-li*$r[0][1];Qt.scale(150*li).translate([Ci,Hi])},aa)}function Sc(Qt,br,aa){return oc(Qt,function($r){var ka=+br,li=ka/($r[1][1]-$r[0][1]),Ci=-li*$r[0][0],Hi=(ka-li*($r[1][1]+$r[0][1]))/2;Qt.scale(150*li).translate([Ci,Hi])},aa)}var Zs=16,kf=l(30*c);function fh(Qt,br){return+br?Zc(Qt,br):Uf(Qt)}function Uf(Qt){return Gu({point:function(br,aa){br=Qt(br,aa),this.stream.point(br[0],br[1])}})}function Zc(Qt,br){function aa($r,ka,li,Ci,Hi,Qi,dn,Pi,Di,Ni,mi,Mn,Qn,ao){var eo=dn-$r,fo=Pi-ka,An=eo*eo+fo*fo;if(An>4*br&&Qn--){var un=Ci+Ni,yo=Hi+mi,Ko=Qi+Mn,Ss=d(un*un+yo*yo+Ko*Ko),rl=f(Ko/=Ss),Os=m(m(Ko)-1)br||m((eo*_l+fo*ll)/An-.5)>.3||Ci*Ni+Hi*mi+Qi*Mn2?Un[2]%360*c:0,_l()):[Hi*h,Qi*h,dn*h]},bs.angle=function(Un){return arguments.length?(Di=Un%360*c,_l()):Di*h},bs.reflectX=function(Un){return arguments.length?(Ni=Un?-1:1,_l()):Ni<0},bs.reflectY=function(Un){return arguments.length?(mi=Un?-1:1,_l()):mi<0},bs.precision=function(Un){return arguments.length?(Ko=fh(Ss,yo=Un*Un),ll()):d(yo)},bs.fitExtent=function(Un,Lo){return Xc(bs,Un,Lo)},bs.fitSize=function(Un,Lo){return Ql(bs,Un,Lo)},bs.fitWidth=function(Un,Lo){return qc(bs,Un,Lo)},bs.fitHeight=function(Un,Lo){return Sc(bs,Un,Lo)};function _l(){var Un=yl(aa,0,0,Ni,mi,Di).apply(null,br(li,Ci)),Lo=(Di?yl:jf)(aa,$r-Un[0],ka-Un[1],Ni,mi,Di);return Pi=Ba(Hi,Qi,dn),Ss=ra(br,Lo),rl=ra(Pi,Ss),Ko=fh(Ss,yo),ll()}function ll(){return Os=el=null,bs}return function(){return br=Qt.apply(this,arguments),bs.invert=br.invert&&Fl,_l()}}function ol(Qt){var br=0,aa=a/3,$r=Mc(Qt),ka=$r(br,aa);return ka.parallels=function(li){return arguments.length?$r(br=li[0]*c,aa=li[1]*c):[br*h,aa*h]},ka}function vc(Qt){var br=l(Qt);function aa($r,ka){return[$r*br,g(ka)/br]}return aa.invert=function($r,ka){return[$r/br,f(ka*br)]},aa}function yu(Qt,br){var aa=g(Qt),$r=(aa+g(br))/2;if(m($r)=.12&&ao<.234&&Qn>=-.425&&Qn<-.214?ka:ao>=.166&&ao<.234&&Qn>=-.214&&Qn<-.115?Ci:aa).invert(Ni)},Pi.stream=function(Ni){return Qt&&br===Ni?Qt:Qt=qf([aa.stream(br=Ni),ka.stream(Ni),Ci.stream(Ni)])},Pi.precision=function(Ni){return arguments.length?(aa.precision(Ni),ka.precision(Ni),Ci.precision(Ni),Di()):aa.precision()},Pi.scale=function(Ni){return arguments.length?(aa.scale(Ni),ka.scale(Ni*.35),Ci.scale(Ni),Pi.translate(aa.translate())):aa.scale()},Pi.translate=function(Ni){if(!arguments.length)return aa.translate();var mi=aa.scale(),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(dn),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(dn),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(dn),Di()},Pi.fitExtent=function(Ni,mi){return Xc(Pi,Ni,mi)},Pi.fitSize=function(Ni,mi){return Ql(Pi,Ni,mi)},Pi.fitWidth=function(Ni,mi){return qc(Pi,Ni,mi)},Pi.fitHeight=function(Ni,mi){return Sc(Pi,Ni,mi)};function Di(){return Qt=br=null,Pi}return Pi.scale(1070)}function Bu(Qt){return function(br,aa){var $r=l(br),ka=l(aa),li=Qt($r*ka);return[li*ka*g(br),li*g(aa)]}}function Ec(Qt){return function(br,aa){var $r=d(br*br+aa*aa),ka=Qt($r),li=g(ka),Ci=l(ka);return[T(br*li,$r*Ci),f($r&&aa*li/$r)]}}var mc=Bu(function(Qt){return d(2/(1+Qt))});mc.invert=Ec(function(Qt){return 2*f(Qt/2)});function Lh(){return Lu(mc).scale(124.75).clipAngle(180-.001)}var sf=Bu(function(Qt){return(Qt=y(Qt))&&Qt/g(Qt)});sf.invert=Ec(function(Qt){return Qt});function vf(){return Lu(sf).scale(79.4188).clipAngle(180-.001)}function Nu(Qt,br){return[Qt,A(u((n+br)/2))]}Nu.invert=function(Qt,br){return[Qt,2*p(w(br))-n]};function lf(){return au(Nu).scale(961/s)}function au(Qt){var br=Lu(Qt),aa=br.center,$r=br.scale,ka=br.translate,li=br.clipExtent,Ci=null,Hi,Qi,dn;br.scale=function(Di){return arguments.length?($r(Di),Pi()):$r()},br.translate=function(Di){return arguments.length?(ka(Di),Pi()):ka()},br.center=function(Di){return arguments.length?(aa(Di),Pi()):aa()},br.clipExtent=function(Di){return arguments.length?(Di==null?Ci=Hi=Qi=dn=null:(Ci=+Di[0][0],Hi=+Di[0][1],Qi=+Di[1][0],dn=+Di[1][1]),Pi()):Ci==null?null:[[Ci,Hi],[Qi,dn]]};function Pi(){var Di=a*$r(),Ni=br(pi(br.rotate()).invert([0,0]));return li(Ci==null?[[Ni[0]-Di,Ni[1]-Di],[Ni[0]+Di,Ni[1]+Di]]:Qt===Nu?[[Math.max(Ni[0]-Di,Ci),Hi],[Math.min(Ni[0]+Di,Qi),dn]]:[[Ci,Math.max(Ni[1]-Di,Hi)],[Qi,Math.min(Ni[1]+Di,dn)]])}return Pi()}function Yc(Qt){return u((n+Qt)/2)}function hh(Qt,br){var aa=l(Qt),$r=Qt===br?g(Qt):A(aa/l(br))/A(Yc(br)/Yc(Qt)),ka=aa*M(Yc(Qt),$r)/$r;if(!$r)return Nu;function li(Ci,Hi){ka>0?Hi<-n+r&&(Hi=-n+r):Hi>n-r&&(Hi=n-r);var Qi=ka/M(Yc(Hi),$r);return[Qi*g($r*Ci),ka-Qi*l($r*Ci)]}return li.invert=function(Ci,Hi){var Qi=ka-Hi,dn=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*p(M(ka/dn,1/$r))-n]},li}function mf(){return ol(hh).scale(109.5).parallels([30,30])}function sl(Qt,br){return[Qt,br]}sl.invert=sl;function _u(){return Lu(sl).scale(152.63)}function Pu(Qt,br){var aa=l(Qt),$r=Qt===br?g(Qt):(aa-l(br))/(br-Qt),ka=aa/$r+Qt;if(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 ql(Qt,br){return[l(br)*g(Qt),g(br)]}ql.invert=Ec(f);function xu(){return Lu(ql).scale(249.5).clipAngle(90+r)}function Lc(Qt,br){var aa=l(br),$r=1+l(Qt)*aa;return[aa*g(Qt)/$r,g(br)/$r]}Lc.invert=Ec(function(Qt){return 2*p(Qt)});function Jc(){return Lu(Lc).scale(250).clipAngle(142)}function sc(Qt,br){return[A(u((n+br)/2)),-Qt]}sc.invert=function(Qt,br){return[-br,2*p(w(Qt))-n]};function Pc(){var Qt=au(sc),br=Qt.center,aa=Qt.rotate;return Qt.center=function($r){return arguments.length?br([-$r[1],$r[0]]):($r=br(),[$r[1],-$r[0]])},Qt.rotate=function($r){return arguments.length?aa([$r[0],$r[1],$r.length>2?$r[2]+90:90]):($r=aa(),[$r[0],$r[1],$r[2]-90])},aa([0,0,90]).scale(159.155)}v.geoAlbers=El,v.geoAlbersUsa=Qf,v.geoArea=j,v.geoAzimuthalEqualArea=Lh,v.geoAzimuthalEqualAreaRaw=mc,v.geoAzimuthalEquidistant=vf,v.geoAzimuthalEquidistantRaw=sf,v.geoBounds=Ne,v.geoCentroid=Fr,v.geoCircle=on,v.geoClipAntimeridian=vr,v.geoClipCircle=ya,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=Xo,v.geoDistance=as,v.geoEqualEarth=Lf,v.geoEqualEarthRaw=Kc,v.geoEquirectangular=_u,v.geoEquirectangularRaw=sl,v.geoGnomonic=Vf,v.geoGnomonicRaw=iu,v.geoGraticule=Us,v.geoGraticule10=_s,v.geoIdentity=Xu,v.geoInterpolate=Gn,v.geoLength=Oo,v.geoMercator=lf,v.geoMercatorRaw=Nu,v.geoNaturalEarth1=gc,v.geoNaturalEarth1Raw=Cc,v.geoOrthographic=xu,v.geoOrthographicRaw=ql,v.geoPath=Bf,v.geoProjection=Lu,v.geoProjectionMutator=Mc,v.geoRotation=pi,v.geoStereographic=Jc,v.geoStereographicRaw=Lc,v.geoStream=U,v.geoTransform=Nf,v.geoTransverseMercator=Pc,v.geoTransverseMercatorRaw=sc,Object.defineProperty(v,"__esModule",{value:!0})})}}),UU=Xe({"node_modules/d3-geo-projection/dist/d3-geo-projection.js"(Z,G){(function(v,x){typeof Z=="object"&&typeof G<"u"?x(Z,zE(),_x()):x(v.d3=v.d3||{},v.d3,v.d3)})(Z,function(v,x,S){"use strict";var E=Math.abs,e=Math.atan,t=Math.atan2,r=Math.cos,o=Math.exp,a=Math.floor,n=Math.log,i=Math.max,s=Math.min,h=Math.pow,c=Math.round,m=Math.sign||function(He){return He>0?1:He<0?-1:0},p=Math.sin,T=Math.tan,l=1e-6,_=1e-12,w=Math.PI,A=w/2,M=w/4,g=Math.SQRT1_2,b=F(2),d=F(w),u=w*2,y=180/w,f=w/180;function R(He){return He?He/Math.sin(He):1}function L(He){return He>1?A:He<-1?-A:Math.asin(He)}function z(He){return He>1?0:He<-1?w:Math.acos(He)}function F(He){return He>0?Math.sqrt(He):0}function N(He){return He=o(2*He),(He-1)/(He+1)}function O(He){return(o(He)-o(-He))/2}function P(He){return(o(He)+o(-He))/2}function U(He){return n(He+F(He*He+1))}function B(He){return n(He+F(He*He-1))}function X(He){var Je=T(He/2),lt=2*n(r(He/2))/(Je*Je);function vt(Lt,At){var zt=r(Lt),cr=r(At),yr=p(At),Er=cr*zt,jr=-((1-Er?n((1+Er)/2)/(1-Er):-.5)+lt/(1+Er));return[jr*cr*p(Lt),jr*yr]}return vt.invert=function(Lt,At){var zt=F(Lt*Lt+At*At),cr=-He/2,yr=50,Er;if(!zt)return[0,0];do{var jr=cr/2,Qr=r(jr),pa=p(jr),Aa=pa/Qr,za=-n(E(Qr));cr-=Er=(2/Aa*za-lt*Aa-zt)/(-za/(pa*pa)+1-lt/(2*Qr*Qr))*(Qr<0?.7:1)}while(E(Er)>l&&--yr>0);var ci=p(cr);return[t(Lt*ci,zt*r(cr)),L(At*ci/zt)]},vt}function $(){var He=A,Je=x.geoProjectionMutator(X),lt=Je(He);return lt.radius=function(vt){return arguments.length?Je(He=vt*f):He*y},lt.scale(179.976).clipAngle(147)}function se(He,Je){var lt=r(Je),vt=R(z(lt*r(He/=2)));return[2*lt*p(He)*vt,p(Je)*vt]}se.invert=function(He,Je){if(!(He*He+4*Je*Je>w*w+l)){var lt=He,vt=Je,Lt=25;do{var At=p(lt),zt=p(lt/2),cr=r(lt/2),yr=p(vt),Er=r(vt),jr=p(2*vt),Qr=yr*yr,pa=Er*Er,Aa=zt*zt,za=1-pa*cr*cr,ci=za?z(Er*cr)*F(Vi=1/za):Vi=0,Vi,ji=2*ci*Er*zt-He,nn=ci*yr-Je,Sn=Vi*(pa*Aa+ci*Er*cr*Qr),Kn=Vi*(.5*At*jr-ci*2*yr*zt),Bn=Vi*.25*(jr*zt-ci*yr*pa*At),wo=Vi*(Qr*cr+ci*Aa*Er),is=Kn*Bn-wo*Sn;if(!is)break;var Ao=(nn*Kn-ji*wo)/is,Zo=(ji*Bn-nn*Sn)/is;lt-=Ao,vt-=Zo}while((E(Ao)>l||E(Zo)>l)&&--Lt>0);return[lt,vt]}};function le(){return x.geoProjection(se).scale(152.63)}function fe(He){var Je=p(He),lt=r(He),vt=He>=0?1:-1,Lt=T(vt*He),At=(1+Je-lt)/2;function zt(cr,yr){var Er=r(yr),jr=r(cr/=2);return[(1+Er)*p(cr),(vt*yr>-t(jr,Lt)-.001?0:-vt*10)+At+p(yr)*lt-(1+Er)*Je*jr]}return zt.invert=function(cr,yr){var Er=0,jr=0,Qr=50;do{var pa=r(Er),Aa=p(Er),za=r(jr),ci=p(jr),Vi=1+za,ji=Vi*Aa-cr,nn=At+ci*lt-Vi*Je*pa-yr,Sn=Vi*pa/2,Kn=-Aa*ci,Bn=Je*Vi*Aa/2,wo=lt*za+Je*pa*ci,is=Kn*Bn-wo*Sn,Ao=(nn*Kn-ji*wo)/is/2,Zo=(ji*Bn-nn*Sn)/is;E(Zo)>2&&(Zo/=2),Er-=Ao,jr-=Zo}while((E(Ao)>l||E(Zo)>l)&&--Qr>0);return vt*jr>-t(r(Er),Lt)-.001?[Er*2,jr]:null},zt}function V(){var He=20*f,Je=He>=0?1:-1,lt=T(Je*He),vt=x.geoProjectionMutator(fe),Lt=vt(He),At=Lt.stream;return Lt.parallel=function(zt){return arguments.length?(lt=T((Je=(He=zt*f)>=0?1:-1)*He),vt(He)):He*y},Lt.stream=function(zt){var cr=Lt.rotate(),yr=At(zt),Er=(Lt.rotate([0,0]),At(zt)),jr=Lt.precision();return Lt.rotate(cr),yr.sphere=function(){Er.polygonStart(),Er.lineStart();for(var Qr=Je*-180;Je*Qr<180;Qr+=Je*90)Er.point(Qr,Je*90);if(He)for(;Je*(Qr-=3*Je*jr)>=-180;)Er.point(Qr,Je*-t(r(Qr*f/2),lt)*y);Er.lineEnd(),Er.polygonEnd()},yr},Lt.scale(218.695).center([0,28.0974])}function Y(He,Je){var lt=T(Je/2),vt=F(1-lt*lt),Lt=1+vt*r(He/=2),At=p(He)*vt/Lt,zt=lt/Lt,cr=At*At,yr=zt*zt;return[4/3*At*(3+cr-3*yr),4/3*zt*(3+3*cr-yr)]}Y.invert=function(He,Je){if(He*=3/8,Je*=3/8,!He&&E(Je)>1)return null;var lt=He*He,vt=Je*Je,Lt=1+lt+vt,At=F((Lt-F(Lt*Lt-4*Je*Je))/2),zt=L(At)/3,cr=At?B(E(Je/At))/3:U(E(He))/3,yr=r(zt),Er=P(cr),jr=Er*Er-yr*yr;return[m(He)*2*t(O(cr)*yr,.25-jr),m(Je)*2*t(Er*p(zt),.25+jr)]};function ee(){return x.geoProjection(Y).scale(66.1603)}var q=F(8),oe=n(1+b);function ae(He,Je){var lt=E(Je);return lt_&&--vt>0);return[He/(r(lt)*(q-1/p(lt))),m(Je)*lt]};function j(){return x.geoProjection(ae).scale(112.314)}function Q(He){var Je=2*w/He;function lt(vt,Lt){var At=x.geoAzimuthalEquidistantRaw(vt,Lt);if(E(vt)>A){var zt=t(At[1],At[0]),cr=F(At[0]*At[0]+At[1]*At[1]),yr=Je*c((zt-A)/Je)+A,Er=t(p(zt-=yr),2-r(zt));zt=yr+L(w/cr*p(Er))-Er,At[0]=cr*r(zt),At[1]=cr*p(zt)}return At}return lt.invert=function(vt,Lt){var At=F(vt*vt+Lt*Lt);if(At>A){var zt=t(Lt,vt),cr=Je*c((zt-A)/Je)+A,yr=zt>cr?-1:1,Er=At*r(cr-zt),jr=1/T(yr*z((Er-w)/F(w*(w-2*Er)+At*At)));zt=cr+2*e((jr+yr*F(jr*jr-3))/3),vt=At*r(zt),Lt=At*p(zt)}return x.geoAzimuthalEquidistantRaw.invert(vt,Lt)},lt}function re(){var He=5,Je=x.geoProjectionMutator(Q),lt=Je(He),vt=lt.stream,Lt=.01,At=-r(Lt*f),zt=p(Lt*f);return lt.lobes=function(cr){return arguments.length?Je(He=+cr):He},lt.stream=function(cr){var yr=lt.rotate(),Er=vt(cr),jr=(lt.rotate([0,0]),vt(cr));return lt.rotate(yr),Er.sphere=function(){jr.polygonStart(),jr.lineStart();for(var Qr=0,pa=360/He,Aa=2*w/He,za=90-180/He,ci=A;Qr0&&E(Lt)>l);return vt<0?NaN:lt}function ze(He,Je,lt){return Je===void 0&&(Je=40),lt===void 0&&(lt=_),function(vt,Lt,At,zt){var cr,yr,Er;At=At===void 0?0:+At,zt=zt===void 0?0:+zt;for(var jr=0;jrcr){At-=yr/=2,zt-=Er/=2;continue}cr=za;var ci=(At>0?-1:1)*lt,Vi=(zt>0?-1:1)*lt,ji=He(At+ci,zt),nn=He(At,zt+Vi),Sn=(ji[0]-Qr[0])/ci,Kn=(ji[1]-Qr[1])/ci,Bn=(nn[0]-Qr[0])/Vi,wo=(nn[1]-Qr[1])/Vi,is=wo*Sn-Kn*Bn,Ao=(E(is)<.5?.5:1)/is;if(yr=(Aa*Bn-pa*wo)*Ao,Er=(pa*Kn-Aa*Sn)*Ao,At+=yr,zt+=Er,E(yr)0&&(cr[1]*=1+yr/1.5*cr[0]*cr[0]),cr}return vt.invert=ze(vt),vt}function at(){return x.geoProjection(Ze()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}function nt(He,Je){var lt=He*p(Je),vt=30,Lt;do Je-=Lt=(Je+p(Je)-lt)/(1+r(Je));while(E(Lt)>l&&--vt>0);return Je/2}function rt(He,Je,lt){function vt(Lt,At){return[He*Lt*r(At=nt(lt,At)),Je*p(At)]}return vt.invert=function(Lt,At){return At=L(At/Je),[Lt/(He*r(At)),L((2*At+p(2*At))/lt)]},vt}var st=rt(b/A,b,w);function Me(){return x.geoProjection(st).scale(169.529)}var ye=2.00276,he=1.11072;function Oe(He,Je){var lt=nt(w,Je);return[ye*He/(1/r(Je)+he/r(lt)),(Je+b*p(lt))/ye]}Oe.invert=function(He,Je){var lt=ye*Je,vt=Je<0?-M:M,Lt=25,At,zt;do zt=lt-b*p(vt),vt-=At=(p(2*vt)+2*vt-w*p(zt))/(2*r(2*vt)+2+w*r(zt)*b*r(vt));while(E(At)>l&&--Lt>0);return zt=lt-b*p(vt),[He*(1/r(zt)+he/r(vt))/ye,zt]};function tt(){return x.geoProjection(Oe).scale(160.857)}function ot(He){var Je=0,lt=x.geoProjectionMutator(He),vt=lt(Je);return vt.parallel=function(Lt){return arguments.length?lt(Je=Lt*f):Je*y},vt}function Qe(He,Je){return[He*r(Je),Je]}Qe.invert=function(He,Je){return[He/r(Je),Je]};function Pt(){return x.geoProjection(Qe).scale(152.63)}function It(He){if(!He)return Qe;var Je=1/T(He);function lt(vt,Lt){var At=Je+He-Lt,zt=At&&vt*r(Lt)/At;return[At*p(zt),Je-At*r(zt)]}return lt.invert=function(vt,Lt){var At=F(vt*vt+(Lt=Je-Lt)*Lt),zt=Je+He-At;return[At/r(zt)*t(vt,Lt),zt]},lt}function qt(){return ot(It).scale(123.082).center([0,26.1441]).parallel(45)}function Wt(He){function Je(lt,vt){var Lt=A-vt,At=Lt&<*He*p(Lt)/Lt;return[Lt*p(At)/He,A-Lt*r(At)]}return Je.invert=function(lt,vt){var Lt=lt*He,At=A-vt,zt=F(Lt*Lt+At*At),cr=t(Lt,At);return[(zt?zt/p(zt):1)*cr/He,A-zt]},Je}function kr(){var He=.5,Je=x.geoProjectionMutator(Wt),lt=Je(He);return lt.fraction=function(vt){return arguments.length?Je(He=+vt):He},lt.scale(158.837)}var mr=rt(1,4/w,w);function qr(){return x.geoProjection(mr).scale(152.63)}function Sr(He,Je,lt,vt,Lt,At){var zt=r(At),cr;if(E(He)>1||E(At)>1)cr=z(lt*Lt+Je*vt*zt);else{var yr=p(He/2),Er=p(At/2);cr=2*L(F(yr*yr+Je*vt*Er*Er))}return E(cr)>l?[cr,t(vt*p(At),Je*Lt-lt*vt*zt)]:[0,0]}function Rr(He,Je,lt){return z((He*He+Je*Je-lt*lt)/(2*He*Je))}function wt(He){return He-2*w*a((He+w)/(2*w))}function Ne(He,Je,lt){for(var vt=[[He[0],He[1],p(He[1]),r(He[1])],[Je[0],Je[1],p(Je[1]),r(Je[1])],[lt[0],lt[1],p(lt[1]),r(lt[1])]],Lt=vt[2],At,zt=0;zt<3;++zt,Lt=At)At=vt[zt],Lt.v=Sr(At[1]-Lt[1],Lt[3],Lt[2],At[3],At[2],At[0]-Lt[0]),Lt.point=[0,0];var cr=Rr(vt[0].v[0],vt[2].v[0],vt[1].v[0]),yr=Rr(vt[0].v[0],vt[1].v[0],vt[2].v[0]),Er=w-cr;vt[2].point[1]=0,vt[0].point[0]=-(vt[1].point[0]=vt[0].v[0]/2);var jr=[vt[2].point[0]=vt[0].point[0]+vt[2].v[0]*r(cr),2*(vt[0].point[1]=vt[1].point[1]=vt[2].v[0]*p(cr))];function Qr(pa,Aa){var za=p(Aa),ci=r(Aa),Vi=new Array(3),ji;for(ji=0;ji<3;++ji){var nn=vt[ji];if(Vi[ji]=Sr(Aa-nn[1],nn[3],nn[2],ci,za,pa-nn[0]),!Vi[ji][0])return nn.point;Vi[ji][1]=wt(Vi[ji][1]-nn.v[1])}var Sn=jr.slice();for(ji=0;ji<3;++ji){var Kn=ji==2?0:ji+1,Bn=Rr(vt[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]*p(Bn)):(Bn=Er-Bn,Sn[0]+=Vi[ji][0]*r(Bn),Sn[1]+=Vi[ji][0]*p(Bn)):(Sn[0]+=Vi[ji][0]*r(Bn),Sn[1]-=Vi[ji][0]*p(Bn))}return Sn[0]/=3,Sn[1]/=3,Sn}return Qr}function Ke(He){return He[0]*=f,He[1]*=f,He}function Te(){return Ie([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function Ie(He,Je,lt){var vt=x.geoCentroid({type:"MultiPoint",coordinates:[He,Je,lt]}),Lt=[-vt[0],-vt[1]],At=x.geoRotation(Lt),zt=Ne(Ke(At(He)),Ke(At(Je)),Ke(At(lt)));zt.invert=ze(zt);var cr=x.geoProjection(zt).rotate(Lt),yr=cr.center;return delete cr.rotate,cr.center=function(Er){return arguments.length?yr(At(Er)):At.invert(yr())},cr.clipAngle(90)}function Ve(He,Je){var lt=F(1-p(Je));return[2/d*He*lt,d*(1-lt)]}Ve.invert=function(He,Je){var lt=(lt=Je/d-1)*lt;return[lt>0?He*F(w/lt)/2:0,L(1-lt)]};function Ce(){return x.geoProjection(Ve).scale(95.6464).center([0,30])}function Ee(He){var Je=T(He);function lt(vt,Lt){return[vt,(vt?vt/p(vt):1)*(p(Lt)*r(vt)-Je*r(Lt))]}return lt.invert=Je?function(vt,Lt){vt&&(Lt*=p(vt)/vt);var At=r(vt);return[vt,2*t(F(At*At+Je*Je-Lt*Lt)-At,Je-Lt)]}:function(vt,Lt){return[vt,L(vt?Lt*T(vt)/vt:Lt)]},lt}function Pe(){return ot(Ee).scale(249.828).clipAngle(90)}var ft=F(3);function ct(He,Je){return[ft*He*(2*r(2*Je/3)-1)/d,ft*d*p(Je/3)]}ct.invert=function(He,Je){var lt=3*L(Je/(ft*d));return[d*He/(ft*(2*r(2*lt/3)-1)),lt]};function _t(){return x.geoProjection(ct).scale(156.19)}function Ct(He){var Je=r(He);function lt(vt,Lt){return[vt*Je,p(Lt)/Je]}return lt.invert=function(vt,Lt){return[vt/Je,L(Lt*Je)]},lt}function ir(){return ot(Ct).parallel(38.58).scale(195.044)}function rr(He){var Je=r(He);function lt(vt,Lt){return[vt*Je,(1+Je)*T(Lt/2)]}return lt.invert=function(vt,Lt){return[vt/Je,e(Lt/(1+Je))*2]},lt}function er(){return ot(rr).scale(124.75)}function Lr(He,Je){var lt=F(8/(3*w));return[lt*He*(1-E(Je)/w),lt*Je]}Lr.invert=function(He,Je){var lt=F(8/(3*w)),vt=Je/lt;return[He/(lt*(1-E(vt)/w)),vt]};function fa(){return x.geoProjection(Lr).scale(165.664)}function Da(He,Je){var lt=F(4-3*p(E(Je)));return[2/F(6*w)*He*lt,m(Je)*F(2*w/3)*(2-lt)]}Da.invert=function(He,Je){var lt=2-E(Je)/F(2*w/3);return[He*F(6*w)/(2*lt),m(Je)*L((4-lt*lt)/3)]};function Ia(){return x.geoProjection(Da).scale(165.664)}function qa(He,Je){var lt=F(w*(4+w));return[2/lt*He*(1+F(1-4*Je*Je/(w*w))),4/lt*Je]}qa.invert=function(He,Je){var lt=F(w*(4+w))/2;return[He*lt/(1+F(1-Je*Je*(4+w)/(4*w))),Je*lt/2]};function Wa(){return x.geoProjection(qa).scale(180.739)}function Ca(He,Je){var lt=(2+A)*p(Je);Je/=2;for(var vt=0,Lt=1/0;vt<10&&E(Lt)>l;vt++){var At=r(Je);Je-=Lt=(Je+p(Je)*(At+2)-lt)/(2*At*(1+At))}return[2/F(w*(4+w))*He*(1+r(Je)),2*F(w/(4+w))*p(Je)]}Ca.invert=function(He,Je){var lt=Je*F((4+w)/w)/2,vt=L(lt),Lt=r(vt);return[He/(2/F(w*(4+w))*(1+Lt)),L((vt+lt*(Lt+2))/(2+A))]};function hi(){return x.geoProjection(Ca).scale(180.739)}function wi(He,Je){return[He*(1+r(Je))/F(2+w),2*Je/F(2+w)]}wi.invert=function(He,Je){var lt=F(2+w),vt=Je*lt/2;return[lt*He/(1+r(vt)),vt]};function Kt(){return x.geoProjection(wi).scale(173.044)}function Ft(He,Je){for(var lt=(1+A)*p(Je),vt=0,Lt=1/0;vt<10&&E(Lt)>l;vt++)Je-=Lt=(Je+p(Je)-lt)/(1+r(Je));return lt=F(2+w),[He*(1+r(Je))/lt,2*Je/lt]}Ft.invert=function(He,Je){var lt=1+A,vt=F(lt/2);return[He*2*vt/(1+r(Je*=vt)),L((Je+p(Je))/lt)]};function Yt(){return x.geoProjection(Ft).scale(173.044)}var Jt=3+2*b;function Fr(He,Je){var lt=p(He/=2),vt=r(He),Lt=F(r(Je)),At=r(Je/=2),zt=p(Je)/(At+b*vt*Lt),cr=F(2/(1+zt*zt)),yr=F((b*At+(vt+lt)*Lt)/(b*At+(vt-lt)*Lt));return[Jt*(cr*(yr-1/yr)-2*n(yr)),Jt*(cr*zt*(yr+1/yr)-2*e(zt))]}Fr.invert=function(He,Je){if(!(At=Y.invert(He/1.2,Je*1.065)))return null;var lt=At[0],vt=At[1],Lt=20,At;He/=Jt,Je/=Jt;do{var zt=lt/2,cr=vt/2,yr=p(zt),Er=r(zt),jr=p(cr),Qr=r(cr),pa=r(vt),Aa=F(pa),za=jr/(Qr+b*Er*Aa),ci=za*za,Vi=F(2/(1+ci)),ji=b*Qr+(Er+yr)*Aa,nn=b*Qr+(Er-yr)*Aa,Sn=ji/nn,Kn=F(Sn),Bn=Kn-1/Kn,wo=Kn+1/Kn,is=Vi*Bn-2*n(Kn)-He,Ao=Vi*za*wo-2*e(za)-Je,Zo=jr&&g*Aa*yr*ci/jr,ps=(b*Er*Qr+Aa)/(2*(Qr+b*Er*Aa)*(Qr+b*Er*Aa)*Aa),ul=-.5*za*Vi*Vi*Vi,tl=ul*Zo,Jo=ul*ps,$o=($o=2*Qr+b*Aa*(Er-yr))*$o*Kn,Il=(b*Er*Qr*Aa+pa)/$o,eu=-(b*yr*jr)/(Aa*$o),Ru=Bn*tl-2*Il/Kn+Vi*(Il+Il/Sn),vu=Bn*Jo-2*eu/Kn+Vi*(eu+eu/Sn),Tl=za*wo*tl-2*Zo/(1+ci)+Vi*wo*Zo+Vi*za*(Il-Il/Sn),cu=za*wo*Jo-2*ps/(1+ci)+Vi*wo*ps+Vi*za*(eu-eu/Sn),uc=vu*Tl-cu*Ru;if(!uc)break;var Vl=(Ao*vu-is*cu)/uc,Gl=(is*Tl-Ao*Ru)/uc;lt-=Vl,vt=i(-A,s(A,vt-Gl))}while((E(Vl)>l||E(Gl)>l)&&--Lt>0);return E(E(vt)-A)vt){var Qr=F(jr),pa=t(Er,yr),Aa=lt*c(pa/lt),za=pa-Aa,ci=He*r(za),Vi=(He*p(za)-za*p(ci))/(A-ci),ji=Tt(za,Vi),nn=(w-He)/ut(ji,ci,w);yr=Qr;var Sn=50,Kn;do yr-=Kn=(He+ut(ji,ci,yr)*nn-Qr)/(ji(yr)*nn);while(E(Kn)>l&&--Sn>0);Er=za*p(yr),yrvt){var yr=F(cr),Er=t(zt,At),jr=lt*c(Er/lt),Qr=Er-jr;At=yr*r(Qr),zt=yr*p(Qr);for(var pa=At-A,Aa=p(At),za=zt/Aa,ci=Atl||E(za)>l)&&--ci>0);return[Qr,pa]},yr}var xr=Cr(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function Ir(){return x.geoProjection(xr).scale(149.995)}var Ur=Cr(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);function Hr(){return x.geoProjection(Ur).scale(153.93)}var xt=Cr(5/6*w,-.62636,-.0344,0,1.3493,-.05524,0,.045);function Xt(){return x.geoProjection(xt).scale(130.945)}function vr(He,Je){var lt=He*He,vt=Je*Je;return[He*(1-.162388*vt)*(.87-952426e-9*lt*lt),Je*(1+vt/12)]}vr.invert=function(He,Je){var lt=He,vt=Je,Lt=50,At;do{var zt=vt*vt;vt-=At=(vt*(1+zt/12)-Je)/(1+zt/4)}while(E(At)>l&&--Lt>0);Lt=50,He/=1-.162388*zt;do{var cr=(cr=lt*lt)*cr;lt-=At=(lt*(.87-952426e-9*cr)-He)/(.87-.00476213*cr)}while(E(At)>l&&--Lt>0);return[lt,vt]};function Or(){return x.geoProjection(vr).scale(131.747)}var ba=Cr(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function Pa(){return x.geoProjection(ba).scale(131.087)}function ya(He){var Je=He(A,0)[0]-He(-A,0)[0];function lt(vt,Lt){var At=vt>0?-.5:.5,zt=He(vt+At*w,Lt);return zt[0]-=At*Je,zt}return He.invert&&(lt.invert=function(vt,Lt){var At=vt>0?-.5:.5,zt=He.invert(vt+At*Je,Lt),cr=zt[0]-At*w;return cr<-w?cr+=2*w:cr>w&&(cr-=2*w),zt[0]=cr,zt}),lt}function la(He,Je){var lt=m(He),vt=m(Je),Lt=r(Je),At=r(He)*Lt,zt=p(He)*Lt,cr=p(vt*Je);He=E(t(zt,cr)),Je=L(At),E(He-A)>l&&(He%=A);var yr=Ta(He>w/4?A-He:He,Je);return He>w/4&&(cr=yr[0],yr[0]=-yr[1],yr[1]=-cr),yr[0]*=lt,yr[1]*=-vt,yr}la.invert=function(He,Je){E(He)>1&&(He=m(He)*2-He),E(Je)>1&&(Je=m(Je)*2-Je);var lt=m(He),vt=m(Je),Lt=-lt*He,At=-vt*Je,zt=At/Lt<1,cr=Ai(zt?At:Lt,zt?Lt:At),yr=cr[0],Er=cr[1],jr=r(Er);return zt&&(yr=-A-yr),[lt*(t(p(yr)*jr,-p(Er))+w),vt*L(r(yr)*jr)]};function Ta(He,Je){if(Je===A)return[0,0];var lt=p(Je),vt=lt*lt,Lt=vt*vt,At=1+Lt,zt=1+3*Lt,cr=1-Lt,yr=L(1/F(At)),Er=cr+vt*At*yr,jr=(1-lt)/Er,Qr=F(jr),pa=jr*At,Aa=F(pa),za=Qr*cr,ci,Vi;if(He===0)return[0,-(za+vt*Aa)];var ji=r(Je),nn=1/ji,Sn=2*lt*ji,Kn=(-3*vt+yr*zt)*Sn,Bn=(-Er*ji-(1-lt)*Kn)/(Er*Er),wo=.5*Bn/Qr,is=cr*wo-2*vt*Qr*Sn,Ao=vt*At*Bn+jr*zt*Sn,Zo=-nn*Sn,ps=-nn*Ao,ul=-2*nn*is,tl=4*He/w,Jo;if(He>.222*w||Je.175*w){if(ci=(za+vt*F(pa*(1+Lt)-za*za))/(1+Lt),He>w/4)return[ci,ci];var $o=ci,Il=.5*ci;ci=.5*(Il+$o),Vi=50;do{var eu=F(pa-ci*ci),Ru=ci*(ul+Zo*eu)+ps*L(ci/Aa)-tl;if(!Ru)break;Ru<0?Il=ci:$o=ci,ci=.5*(Il+$o)}while(E($o-Il)>l&&--Vi>0)}else{ci=l,Vi=25;do{var vu=ci*ci,Tl=F(pa-vu),cu=ul+Zo*Tl,uc=ci*cu+ps*L(ci/Aa)-tl,Vl=cu+(ps-Zo*vu)/Tl;ci-=Jo=Tl?uc/Vl:0}while(E(Jo)>l&&--Vi>0)}return[ci,-za-vt*F(pa-ci*ci)]}function Ai(He,Je){for(var lt=0,vt=1,Lt=.5,At=50;;){var zt=Lt*Lt,cr=F(Lt),yr=L(1/F(1+zt)),Er=1-zt+Lt*(1+zt)*yr,jr=(1-cr)/Er,Qr=F(jr),pa=jr*(1+zt),Aa=Qr*(1-zt),za=pa-He*He,ci=F(za),Vi=Je+Aa+Lt*ci;if(E(vt-lt)<_||--At===0||Vi===0)break;Vi>0?lt=Lt:vt=Lt,Lt=.5*(lt+vt)}if(!At)return null;var ji=L(cr),nn=r(ji),Sn=1/nn,Kn=2*cr*nn,Bn=(-3*Lt+yr*(1+3*zt))*Kn,wo=(-Er*nn-(1-cr)*Bn)/(Er*Er),is=.5*wo/Qr,Ao=(1-zt)*is-2*Lt*Qr*Kn,Zo=-2*Sn*Ao,ps=-Sn*Kn,ul=-Sn*(Lt*(1+zt)*wo+jr*(1+3*zt)*Kn);return[w/4*(He*(Zo+ps*ci)+ul*L(He/F(pa))),ji]}function ki(){return x.geoProjection(ya(la)).scale(239.75)}function Ki(He,Je,lt){var vt,Lt,At;return He?(vt=_n(He,lt),Je?(Lt=_n(Je,1-lt),At=Lt[1]*Lt[1]+lt*vt[0]*vt[0]*Lt[0]*Lt[0],[[vt[0]*Lt[2]/At,vt[1]*vt[2]*Lt[0]*Lt[1]/At],[vt[1]*Lt[1]/At,-vt[0]*vt[2]*Lt[0]*Lt[2]/At],[vt[2]*Lt[1]*Lt[2]/At,-lt*vt[0]*vt[1]*Lt[0]/At]]):[[vt[0],0],[vt[1],0],[vt[2],0]]):(Lt=_n(Je,1-lt),[[0,Lt[0]/Lt[1]],[1/Lt[1],0],[Lt[2]/Lt[1],0]])}function _n(He,Je){var lt,vt,Lt,At,zt;if(Je=1-l)return lt=(1-Je)/4,vt=P(He),At=N(He),Lt=1/vt,zt=vt*O(He),[At+lt*(zt-He)/(vt*vt),Lt-lt*At*Lt*(zt-He),Lt+lt*At*Lt*(zt+He),2*e(o(He))-A+lt*(zt-He)/vt];var cr=[1,0,0,0,0,0,0,0,0],yr=[F(Je),0,0,0,0,0,0,0,0],Er=0;for(vt=F(1-Je),zt=1;E(yr[Er]/cr[Er])>l&&Er<8;)lt=cr[Er++],yr[Er]=(lt-vt)/2,cr[Er]=(lt+vt)/2,vt=F(lt*vt),zt*=2;Lt=zt*cr[Er]*He;do At=yr[Er]*p(vt=Lt)/cr[Er],Lt=(L(At)+Lt)/2;while(--Er);return[p(Lt),At=r(Lt),At/r(Lt-vt),Lt]}function Rn(He,Je,lt){var vt=E(He),Lt=E(Je),At=O(Lt);if(vt){var zt=1/p(vt),cr=1/(T(vt)*T(vt)),yr=-(cr+lt*(At*At*zt*zt)-1+lt),Er=(lt-1)*cr,jr=(-yr+F(yr*yr-4*Er))/2;return[En(e(1/F(jr)),lt)*m(He),En(e(F((jr/cr-1)/lt)),1-lt)*m(Je)]}return[0,En(e(At),1-lt)*m(Je)]}function En(He,Je){if(!Je)return He;if(Je===1)return n(T(He/2+M));for(var lt=1,vt=F(1-Je),Lt=F(Je),At=0;E(Lt)>l;At++){if(He%w){var zt=e(vt*T(He)/lt);zt<0&&(zt+=w),He+=zt+~~(He/w)*w}else He+=He;Lt=(lt+vt)/2,vt=F(lt*vt),Lt=((lt=Lt)-vt)/2}return He/(h(2,At)*lt)}function On(He,Je){var lt=(b-1)/(b+1),vt=F(1-lt*lt),Lt=En(A,vt*vt),At=-1,zt=n(T(w/4+E(Je)/2)),cr=o(At*zt)/F(lt),yr=no(cr*r(At*He),cr*p(At*He)),Er=Rn(yr[0],yr[1],vt*vt);return[-Er[1],(Je>=0?1:-1)*(.5*Lt-Er[0])]}function no(He,Je){var lt=He*He,vt=Je+1,Lt=1-lt-Je*Je;return[.5*((He>=0?A:-A)-t(Lt,2*He)),-.25*n(Lt*Lt+4*lt)+.5*n(vt*vt+lt)]}function cn(He,Je){var lt=Je[0]*Je[0]+Je[1]*Je[1];return[(He[0]*Je[0]+He[1]*Je[1])/lt,(He[1]*Je[0]-He[0]*Je[1])/lt]}On.invert=function(He,Je){var lt=(b-1)/(b+1),vt=F(1-lt*lt),Lt=En(A,vt*vt),At=-1,zt=Ki(.5*Lt-Je,-He,vt*vt),cr=cn(zt[0],zt[1]),yr=t(cr[1],cr[0])/At;return[yr,2*e(o(.5/At*n(lt*cr[0]*cr[0]+lt*cr[1]*cr[1])))-A]};function lo(){return x.geoProjection(ya(On)).scale(151.496)}function Wo(He){var Je=p(He),lt=r(He),vt=hs(He);vt.invert=hs(-He);function Lt(At,zt){var cr=vt(At,zt);At=cr[0],zt=cr[1];var yr=p(zt),Er=r(zt),jr=r(At),Qr=z(Je*yr+lt*Er*jr),pa=p(Qr),Aa=E(pa)>l?Qr/pa:1;return[Aa*lt*p(At),(E(At)>A?Aa:-Aa)*(Je*Er-lt*yr*jr)]}return Lt.invert=function(At,zt){var cr=F(At*At+zt*zt),yr=-p(cr),Er=r(cr),jr=cr*Er,Qr=-zt*yr,pa=cr*Je,Aa=F(jr*jr+Qr*Qr-pa*pa),za=t(jr*pa+Qr*Aa,Qr*pa-jr*Aa),ci=(cr>A?-1:1)*t(At*yr,cr*r(za)*Er+zt*p(za)*yr);return vt.invert(ci,za)},Lt}function hs(He){var Je=p(He),lt=r(He);return function(vt,Lt){var At=r(Lt),zt=r(vt)*At,cr=p(vt)*At,yr=p(Lt);return[t(cr,zt*lt-yr*Je),L(yr*lt+zt*Je)]}}function Oo(){var He=0,Je=x.geoProjectionMutator(Wo),lt=Je(He),vt=lt.rotate,Lt=lt.stream,At=x.geoCircle();return lt.parallel=function(zt){if(!arguments.length)return He*y;var cr=lt.rotate();return Je(He=zt*f).rotate(cr)},lt.rotate=function(zt){return arguments.length?(vt.call(lt,[zt[0],zt[1]-He*y]),At.center([-zt[0],-zt[1]]),lt):(zt=vt.call(lt),zt[1]+=He*y,zt)},lt.stream=function(zt){return zt=Lt(zt),zt.sphere=function(){zt.polygonStart();var cr=.01,yr=At.radius(90-cr)().coordinates[0],Er=yr.length-1,jr=-1,Qr;for(zt.lineStart();++jr=0;)zt.point((Qr=yr[jr])[0],Qr[1]);zt.lineEnd(),zt.polygonEnd()},zt},lt.scale(79.4187).parallel(45).clipAngle(180-.001)}var Wn=3,No=L(1-1/Wn)*y,as=Ct(0);function Ns(He){var Je=No*f,lt=Ve(w,Je)[0]-Ve(-w,Je)[0],vt=as(0,Je)[1],Lt=Ve(0,Je)[1],At=d-Lt,zt=u/He,cr=4/u,yr=vt+At*At*4/u;function Er(jr,Qr){var pa,Aa=E(Qr);if(Aa>Je){var za=s(He-1,i(0,a((jr+w)/zt)));jr+=w*(He-1)/He-za*zt,pa=Ve(jr,Aa),pa[0]=pa[0]*u/lt-u*(He-1)/(2*He)+za*u/He,pa[1]=vt+(pa[1]-Lt)*4*At/u,Qr<0&&(pa[1]=-pa[1])}else pa=as(jr,Qr);return pa[0]*=cr,pa[1]/=yr,pa}return Er.invert=function(jr,Qr){jr/=cr,Qr*=yr;var pa=E(Qr);if(pa>vt){var Aa=s(He-1,i(0,a((jr+w)/zt)));jr=(jr+w*(He-1)/He-Aa*zt)*lt/u;var za=Ve.invert(jr,.25*(pa-vt)*u/At+Lt);return za[0]-=w*(He-1)/He-Aa*zt,Qr<0&&(za[1]=-za[1]),za}return as.invert(jr,Qr)},Er}function ss(He,Je){return[He,Je&1?90-l:No]}function uo(He,Je){return[He,Je&1?-90+l:-No]}function jn(He){return[He[0]*(1-l),He[1]]}function Xn(He){var Je=[].concat(S.range(-180,180+He/2,He).map(ss),S.range(180,-180-He/2,-He).map(uo));return{type:"Polygon",coordinates:[He===180?Je.map(jn):Je]}}function ls(){var He=4,Je=x.geoProjectionMutator(Ns),lt=Je(He),vt=lt.stream;return lt.lobes=function(Lt){return arguments.length?Je(He=+Lt):He},lt.stream=function(Lt){var At=lt.rotate(),zt=vt(Lt),cr=(lt.rotate([0,0]),vt(Lt));return lt.rotate(At),zt.sphere=function(){x.geoStream(Xn(180/He),cr)},zt},lt.scale(239.75)}function Cs(He){var Je=1+He,lt=p(1/Je),vt=L(lt),Lt=2*F(w/(At=w+4*vt*Je)),At,zt=.5*Lt*(Je+F(He*(2+He))),cr=He*He,yr=Je*Je;function Er(jr,Qr){var pa=1-p(Qr),Aa,za;if(pa&&pa<2){var ci=A-Qr,Vi=25,ji;do{var nn=p(ci),Sn=r(ci),Kn=vt+t(nn,Je-Sn),Bn=1+yr-2*Je*Sn;ci-=ji=(ci-cr*vt-Je*nn+Bn*Kn-.5*pa*At)/(2*Je*nn*Kn)}while(E(ji)>_&&--Vi>0);Aa=Lt*F(Bn),za=jr*Kn/w}else Aa=Lt*(He+pa),za=jr*vt/w;return[Aa*p(za),zt-Aa*r(za)]}return Er.invert=function(jr,Qr){var pa=jr*jr+(Qr-=zt)*Qr,Aa=(1+yr-pa/(Lt*Lt))/(2*Je),za=z(Aa),ci=p(za),Vi=vt+t(ci,Je-Aa);return[L(jr/F(pa))*w/Vi,L(1-2*(za-cr*vt-Je*ci+(1+yr-2*Je*Aa)*Vi)/At)]},Er}function Ks(){var He=1,Je=x.geoProjectionMutator(Cs),lt=Je(He);return lt.ratio=function(vt){return arguments.length?Je(He=+vt):He},lt.scale(167.774).center([0,18.67])}var Xo=.7109889596207567,Gi=.0528035274542;function Ln(He,Je){return Je>-Xo?(He=st(He,Je),He[1]+=Gi,He):Qe(He,Je)}Ln.invert=function(He,Je){return Je>-Xo?st.invert(He,Je-Gi):Qe.invert(He,Je)};function Us(){return x.geoProjection(Ln).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}function _s(He,Je){return E(Je)>Xo?(He=st(He,Je),He[1]-=Je>0?Gi:-Gi,He):Qe(He,Je)}_s.invert=function(He,Je){return E(Je)>Xo?st.invert(He,Je+(Je>0?Gi:-Gi)):Qe.invert(He,Je)};function Gn(){return x.geoProjection(_s).scale(152.63)}function zs(He,Je,lt,vt){var Lt=F(4*w/(2*lt+(1+He-Je/2)*p(2*lt)+(He+Je)/2*p(4*lt)+Je/2*p(6*lt))),At=F(vt*p(lt)*F((1+He*r(2*lt)+Je*r(4*lt))/(1+He+Je))),zt=lt*yr(1);function cr(Qr){return F(1+He*r(2*Qr)+Je*r(4*Qr))}function yr(Qr){var pa=Qr*lt;return(2*pa+(1+He-Je/2)*p(2*pa)+(He+Je)/2*p(4*pa)+Je/2*p(6*pa))/lt}function Er(Qr){return cr(Qr)*p(Qr)}var jr=function(Qr,pa){var Aa=lt*De(yr,zt*p(pa)/lt,pa/w);isNaN(Aa)&&(Aa=lt*m(pa));var za=Lt*cr(Aa);return[za*At*Qr/w*r(Aa),za/At*p(Aa)]};return jr.invert=function(Qr,pa){var Aa=De(Er,pa*At/Lt);return[Qr*w/(r(Aa)*Lt*At*cr(Aa)),L(lt*yr(Aa/lt)/zt)]},lt===0&&(Lt=F(vt/w),jr=function(Qr,pa){return[Qr*Lt,p(pa)/Lt]},jr.invert=function(Qr,pa){return[Qr/Lt,L(pa*Lt)]}),jr}function vs(){var He=1,Je=0,lt=45*f,vt=2,Lt=x.geoProjectionMutator(zs),At=Lt(He,Je,lt,vt);return At.a=function(zt){return arguments.length?Lt(He=+zt,Je,lt,vt):He},At.b=function(zt){return arguments.length?Lt(He,Je=+zt,lt,vt):Je},At.psiMax=function(zt){return arguments.length?Lt(He,Je,lt=+zt*f,vt):lt*y},At.ratio=function(zt){return arguments.length?Lt(He,Je,lt,vt=+zt):vt},At.scale(180.739)}function Ws(He,Je,lt,vt,Lt,At,zt,cr,yr,Er,jr){if(jr.nanEncountered)return NaN;var Qr,pa,Aa,za,ci,Vi,ji,nn,Sn,Kn;if(Qr=lt-Je,pa=He(Je+Qr*.25),Aa=He(lt-Qr*.25),isNaN(pa)){jr.nanEncountered=!0;return}if(isNaN(Aa)){jr.nanEncountered=!0;return}return za=Qr*(vt+4*pa+Lt)/12,ci=Qr*(Lt+4*Aa+At)/12,Vi=za+ci,Kn=(Vi-zt)/15,Er>yr?(jr.maxDepthCount++,Vi+Kn):Math.abs(Kn)>1;do yr[Vi]>Aa?ci=Vi:za=Vi,Vi=za+ci>>1;while(Vi>za);var ji=yr[Vi+1]-yr[Vi];return ji&&(ji=(Aa-yr[Vi+1])/ji),(Vi+1+ji)/zt}var Qr=2*jr(1)/w*At/lt,pa=function(Aa,za){var ci=jr(E(p(za))),Vi=vt(ci)*Aa;return ci/=Qr,[Vi,za>=0?ci:-ci]};return pa.invert=function(Aa,za){var ci;return za*=Qr,E(za)<1&&(ci=m(za)*L(Lt(E(za))*At)),[Aa/vt(E(za)),ci]},pa}function ko(){var He=0,Je=2.5,lt=1.183136,vt=x.geoProjectionMutator(xn),Lt=vt(He,Je,lt);return Lt.alpha=function(At){return arguments.length?vt(He=+At,Je,lt):He},Lt.k=function(At){return arguments.length?vt(He,Je=+At,lt):Je},Lt.gamma=function(At){return arguments.length?vt(He,Je,lt=+At):lt},Lt.scale(152.63)}function bo(He,Je){return E(He[0]-Je[0])=0;--yr)lt=He[1][yr],vt=lt[0][0],Lt=lt[0][1],At=lt[1][1],zt=lt[2][0],cr=lt[2][1],Je.push(Is([[zt-l,cr-l],[zt-l,At+l],[vt+l,At+l],[vt+l,Lt-l]],30));return{type:"Polygon",coordinates:[S.merge(Je)]}}function co(He,Je,lt){var vt,Lt;function At(yr,Er){for(var jr=Er<0?-1:1,Qr=Je[+(Er<0)],pa=0,Aa=Qr.length-1;paQr[pa][2][0];++pa);var za=He(yr-Qr[pa][1][0],Er);return za[0]+=He(Qr[pa][1][0],jr*Er>jr*Qr[pa][0][1]?Qr[pa][0][1]:Er)[0],za}lt?At.invert=lt(At):He.invert&&(At.invert=function(yr,Er){for(var jr=Lt[+(Er<0)],Qr=Je[+(Er<0)],pa=0,Aa=jr.length;paza&&(ci=Aa,Aa=za,za=ci),[[Qr,Aa],[pa,za]]})}),zt):Je.map(function(Er){return Er.map(function(jr){return[[jr[0][0]*y,jr[0][1]*y],[jr[1][0]*y,jr[1][1]*y],[jr[2][0]*y,jr[2][1]*y]]})})},Je!=null&&zt.lobes(Je),zt}var Vs=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function vl(){return co(Oe,Vs).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 js(){return co(_s,Ts).scale(152.63)}var us=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function As(){return co(st,us).scale(169.529)}var Nl=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function su(){return co(st,Nl).scale(169.529).rotate([20,0])}var Tc=[[[[-180,35],[-30,90],[0,35]],[[0,35],[30,90],[180,35]]],[[[-180,-10],[-102,-90],[-65,-10]],[[-65,-10],[5,-90],[77,-10]],[[77,-10],[103,-90],[180,-10]]]];function du(){return co(Ln,Tc,ze).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 co(Qe,Sf).scale(152.63).rotate([-20,0])}function Fs(He,Je){return[3/u*He*F(w*w/3-Je*Je),Je]}Fs.invert=function(He,Je){return[u/3*He/F(w*w/3-Je*Je),Je]};function dc(){return x.geoProjection(Fs).scale(158.837)}function Hc(He){function Je(lt,vt){if(E(E(vt)-A)2)return null;lt/=2,vt/=2;var At=lt*lt,zt=vt*vt,cr=2*vt/(1+At+zt);return cr=h((1+cr)/(1-cr),1/He),[t(2*lt,1-At-zt)/He,L((cr-1)/(cr+1))]},Je}function lu(){var He=.5,Je=x.geoProjectionMutator(Hc),lt=Je(He);return lt.spacing=function(vt){return arguments.length?Je(He=+vt):He},lt.scale(124.75)}var Pl=w/b;function ic(He,Je){return[He*(1+F(r(Je)))/2,Je/(r(Je/2)*r(He/6))]}ic.invert=function(He,Je){var lt=E(He),vt=E(Je),Lt=l,At=A;vtl||E(Vi)>l)&&--Lt>0);return Lt&&[lt,vt]};function ml(){return x.geoProjection(nl).scale(139.98)}function xs(He,Je){return[p(He)/r(Je),T(Je)*r(He)]}xs.invert=function(He,Je){var lt=He*He,vt=Je*Je,Lt=vt+1,At=lt+Lt,zt=He?g*F((At-F(At*At-4*lt))/lt):1/F(Lt);return[L(He*zt),m(Je)*z(zt)]};function Xs(){return x.geoProjection(xs).scale(144.049).clipAngle(90-.001)}function nc(He){var Je=r(He),lt=T(M+He/2);function vt(Lt,At){var zt=At-He,cr=E(zt)=0;)jr=He[Er],Qr=jr[0]+cr*(Aa=Qr)-yr*pa,pa=jr[1]+cr*pa+yr*Aa;return Qr=cr*(Aa=Qr)-yr*pa,pa=cr*pa+yr*Aa,[Qr,pa]}return lt.invert=function(vt,Lt){var At=20,zt=vt,cr=Lt;do{for(var yr=Je,Er=He[yr],jr=Er[0],Qr=Er[1],pa=0,Aa=0,za;--yr>=0;)Er=He[yr],pa=jr+zt*(za=pa)-cr*Aa,Aa=Qr+zt*Aa+cr*za,jr=Er[0]+zt*(za=jr)-cr*Qr,Qr=Er[1]+zt*Qr+cr*za;pa=jr+zt*(za=pa)-cr*Aa,Aa=Qr+zt*Aa+cr*za,jr=zt*(za=jr)-cr*Qr-vt,Qr=zt*Qr+cr*za-Lt;var ci=pa*pa+Aa*Aa,Vi,ji;zt-=Vi=(jr*pa+Qr*Aa)/ci,cr-=ji=(Qr*pa-jr*Aa)/ci}while(E(Vi)+E(ji)>l*l&&--At>0);if(At){var nn=F(zt*zt+cr*cr),Sn=2*e(nn*.5),Kn=p(Sn);return[t(zt*Kn,nn*r(Sn)),nn?L(cr*Kn/nn):0]}},lt}var ns=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],bh=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],Es=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],to=[[.9245,0],[0,0],[.01943,0]],Wc=[[.721316,0],[0,0],[-.00881625,-.00617325]];function Vu(){return $l(ns,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)}function jl(){return $l(bh,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function Mf(){return $l(Es,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function Ac(){return $l(to,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function nf(){return $l(Wc,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function $l(He,Je){var lt=x.geoProjection(xh(He)).rotate(Je).clipAngle(90),vt=x.geoRotation(Je),Lt=lt.center;return delete lt.rotate,lt.center=function(At){return arguments.length?Lt(vt(At)):vt.invert(Lt())},lt}var Jf=F(6),Of=F(7);function of(He,Je){var lt=L(7*p(Je)/(3*Jf));return[Jf*He*(2*r(2*lt/3)-1)/Of,9*p(lt/3)/Of]}of.invert=function(He,Je){var lt=3*L(Je*Of/9);return[He*Of/(Jf*(2*r(2*lt/3)-1)),L(p(lt)*3*Jf/7)]};function jc(){return x.geoProjection(of).scale(164.859)}function Bf(He,Je){for(var lt=(1+g)*p(Je),vt=Je,Lt=0,At;Lt<25&&(vt-=At=(p(vt/2)+p(vt)-lt)/(.5*r(vt/2)+r(vt)),!(E(At)_&&--vt>0);return At=lt*lt,zt=At*At,cr=At*zt,[He/(.84719-.13063*At+cr*cr*(-.04515+.05494*At-.02326*zt+.00331*cr)),lt]};function Xc(){return x.geoProjection(oc).scale(175.295)}function Ql(He,Je){return[He*(1+r(Je))/2,2*(Je-T(Je/2))]}Ql.invert=function(He,Je){for(var lt=Je/2,vt=0,Lt=1/0;vt<10&&E(Lt)>l;++vt){var At=r(Je/2);Je-=Lt=(Je-T(Je/2)-lt)/(1-.5/(At*At))}return[2*He/(1+r(Je)),Je]};function qc(){return x.geoProjection(Ql).scale(152.63)}var Sc=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function Zs(){return co(ce(1/0),Sc).rotate([20,0]).scale(152.63)}function kf(He,Je){var lt=p(Je),vt=r(Je),Lt=m(He);if(He===0||E(Je)===A)return[0,Je];if(Je===0)return[He,0];if(E(He)===A)return[He*vt,A*lt];var At=w/(2*He)-2*He/w,zt=2*Je/w,cr=(1-zt*zt)/(lt-zt),yr=At*At,Er=cr*cr,jr=1+yr/Er,Qr=1+Er/yr,pa=(At*lt/cr-At/2)/jr,Aa=(Er*lt/yr+cr/2)/Qr,za=pa*pa+vt*vt/jr,ci=Aa*Aa-(Er*lt*lt/yr+cr*lt-1)/Qr;return[A*(pa+F(za)*Lt),A*(Aa+F(ci<0?0:ci)*m(-Je*At)*Lt)]}kf.invert=function(He,Je){He/=A,Je/=A;var lt=He*He,vt=Je*Je,Lt=lt+vt,At=w*w;return[He?(Lt-1+F((1-Lt)*(1-Lt)+4*lt))/(2*He)*A:0,De(function(zt){return Lt*(w*p(zt)-2*zt)*w+4*zt*zt*(Je-p(zt))+2*w*zt-At*Je},0)]};function fh(){return x.geoProjection(kf).scale(127.267)}var Uf=1.0148,Zc=.23185,$f=-.14499,Cu=.02406,jf=Uf,yl=5*Zc,Lu=7*$f,Mc=9*Cu,ol=1.790857183;function vc(He,Je){var lt=Je*Je;return[He,Je*(Uf+lt*lt*(Zc+lt*($f+Cu*lt)))]}vc.invert=function(He,Je){Je>ol?Je=ol:Je<-ol&&(Je=-ol);var lt=Je,vt;do{var Lt=lt*lt;lt-=vt=(lt*(Uf+Lt*Lt*(Zc+Lt*($f+Cu*Lt)))-Je)/(jf+Lt*Lt*(yl+Lt*(Lu+Mc*Lt)))}while(E(vt)>l);return[He,lt]};function yu(){return x.geoProjection(vc).scale(139.319)}function Tu(He,Je){if(E(Je)l&&--Lt>0);return zt=T(vt),[(E(Je)=0;)if(vt=Je[cr],lt[0]===vt[0]&<[1]===vt[1]){if(At)return[At,lt];At=lt}}}function au(He){for(var Je=He.length,lt=[],vt=He[Je-1],Lt=0;Lt0?[-vt[0],0]:[180-vt[0],180])};var Je=mf.map(function(lt){return{face:lt,project:He(lt)}});return[-1,0,0,1,0,1,4,5].forEach(function(lt,vt){var Lt=Je[lt];Lt&&(Lt.children||(Lt.children=[])).push(Je[vt])}),sf(Je[0],function(lt,vt){return Je[lt<-w/2?vt<0?6:4:lt<0?vt<0?2:0:ltvt^Aa>vt&<<(pa-Er)*(vt-jr)/(Aa-jr)+Er&&(Lt=!Lt)}return Lt}function iu(He,Je){var lt=Je.stream,vt;if(!lt)throw new Error("invalid projection");switch(He&&He.type){case"Feature":vt=Xu;break;case"FeatureCollection":vt=Vf;break;default:vt=gc;break}return vt(He,lt)}function Vf(He,Je){return{type:"FeatureCollection",features:He.features.map(function(lt){return Xu(lt,Je)})}}function Xu(He,Je){return{type:"Feature",id:He.id,properties:He.properties,geometry:gc(He.geometry,Je)}}function Cc(He,Je){return{type:"GeometryCollection",geometries:He.geometries.map(function(lt){return gc(lt,Je)})}}function gc(He,Je){if(!He)return null;if(He.type==="GeometryCollection")return Cc(He,Je);var lt;switch(He.type){case"Point":lt=Lc;break;case"MultiPoint":lt=Lc;break;case"LineString":lt=Jc;break;case"MultiLineString":lt=Jc;break;case"Polygon":lt=sc;break;case"MultiPolygon":lt=sc;break;case"Sphere":lt=sc;break;default:return null}return x.geoStream(He,Je(lt)),lt.result()}var ql=[],xu=[],Lc={point:function(He,Je){ql.push([He,Je])},result:function(){var He=ql.length?ql.length<2?{type:"Point",coordinates:ql[0]}:{type:"MultiPoint",coordinates:ql}:null;return ql=[],He}},Jc={lineStart:Wu,point:function(He,Je){ql.push([He,Je])},lineEnd:function(){ql.length&&(xu.push(ql),ql=[])},result:function(){var He=xu.length?xu.length<2?{type:"LineString",coordinates:xu[0]}:{type:"MultiLineString",coordinates:xu}:null;return xu=[],He}},sc={polygonStart:Wu,lineStart:Wu,point:function(He,Je){ql.push([He,Je])},lineEnd:function(){var He=ql.length;if(He){do ql.push(ql[0].slice());while(++He<4);xu.push(ql),ql=[]}},polygonEnd:Wu,result:function(){if(!xu.length)return null;var He=[],Je=[];return xu.forEach(function(lt){Kc(lt)?He.push([lt]):Je.push(lt)}),Je.forEach(function(lt){var vt=lt[0];He.some(function(Lt){if(Lf(Lt[0],vt))return Lt.push(lt),!0})||He.push([lt])}),xu=[],He.length?He.length>1?{type:"MultiPolygon",coordinates:He}:{type:"Polygon",coordinates:He[0]}:null}};function Pc(He){var Je=He(A,0)[0]-He(-A,0)[0];function lt(vt,Lt){var At=E(vt)0?vt-w:vt+w,Lt),cr=(zt[0]-zt[1])*g,yr=(zt[0]+zt[1])*g;if(At)return[cr,yr];var Er=Je*g,jr=cr>0^yr>0?-1:1;return[jr*cr-m(yr)*Er,jr*yr-m(cr)*Er]}return He.invert&&(lt.invert=function(vt,Lt){var At=(vt+Lt)*g,zt=(Lt-vt)*g,cr=E(At)<.5*Je&&E(zt)<.5*Je;if(!cr){var yr=Je*g,Er=At>0^zt>0?-1:1,jr=-Er*vt+(zt>0?1:-1)*yr,Qr=-Er*Lt+(At>0?1:-1)*yr;At=(-jr-Qr)*g,zt=(jr-Qr)*g}var pa=He.invert(At,zt);return cr||(pa[0]+=At>0?w:-w),pa}),x.geoProjection(lt).rotate([-90,-90,45]).clipAngle(180-.001)}function Qt(){return Pc(la).scale(176.423)}function br(){return Pc(On).scale(111.48)}function aa(He,Je){if(!(0<=(Je=+Je)&&Je<=20))throw new Error("invalid digits");function lt(Er){var jr=Er.length,Qr=2,pa=new Array(jr);for(pa[0]=+Er[0].toFixed(Je),pa[1]=+Er[1].toFixed(Je);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 At(Er){return Er.map(Lt)}function zt(Er){if(Er==null)return Er;var jr;switch(Er.type){case"GeometryCollection":jr={type:"GeometryCollection",geometries:Er.geometries.map(zt)};break;case"Point":jr={type:"Point",coordinates:lt(Er.coordinates)};break;case"MultiPoint":jr={type:Er.type,coordinates:vt(Er.coordinates)};break;case"LineString":jr={type:Er.type,coordinates:Lt(Er.coordinates)};break;case"MultiLineString":case"Polygon":jr={type:Er.type,coordinates:At(Er.coordinates)};break;case"MultiPolygon":jr={type:"MultiPolygon",coordinates:Er.coordinates.map(At)};break;default:return Er}return Er.bbox!=null&&(jr.bbox=Er.bbox),jr}function cr(Er){var jr={type:"Feature",properties:Er.properties,geometry:zt(Er.geometry)};return Er.id!=null&&(jr.id=Er.id),Er.bbox!=null&&(jr.bbox=Er.bbox),jr}if(He!=null)switch(He.type){case"Feature":return cr(He);case"FeatureCollection":{var yr={type:"FeatureCollection",features:He.features.map(cr)};return He.bbox!=null&&(yr.bbox=He.bbox),yr}default:return zt(He)}return He}function $r(He){var Je=p(He);function lt(vt,Lt){var At=Je?T(vt*Je/2)/Je:vt/2;if(!Lt)return[2*At,-He];var zt=2*e(At*p(Lt)),cr=1/T(Lt);return[p(zt)*cr,Lt+(1-r(zt))*cr-He]}return lt.invert=function(vt,Lt){if(E(Lt+=He)l&&--cr>0);var pa=vt*(Er=T(zt)),Aa=T(E(Lt)0?A:-A)*(yr+Lt*(jr-zt)/2+Lt*Lt*(jr-2*yr+zt)/2)]}Ci.invert=function(He,Je){var lt=Je/A,vt=lt*90,Lt=s(18,E(vt/5)),At=i(0,a(Lt));do{var zt=li[At][1],cr=li[At+1][1],yr=li[s(19,At+2)][1],Er=yr-zt,jr=yr-2*cr+zt,Qr=2*(E(lt)-cr)/Er,pa=jr/Er,Aa=Qr*(1-pa*Qr*(1-2*pa*Qr));if(Aa>=0||At===1){vt=(Je>=0?5:-5)*(Aa+Lt);var za=50,ci;do Lt=s(18,E(vt)/5),At=a(Lt),Aa=Lt-At,zt=li[At][1],cr=li[At+1][1],yr=li[s(19,At+2)][1],vt-=(ci=(Je>=0?A:-A)*(cr+Aa*(yr-zt)/2+Aa*Aa*(yr-2*cr+zt)/2)-Je)*y;while(E(ci)>_&&--za>0);break}}while(--At>=0);var Vi=li[At][0],ji=li[At+1][0],nn=li[s(19,At+2)][0];return[He/(ji+Aa*(nn-Vi)/2+Aa*Aa*(nn-2*ji+Vi)/2),vt*f]};function Hi(){return x.geoProjection(Ci).scale(152.63)}function Qi(He){function Je(lt,vt){var Lt=r(vt),At=(He-1)/(He-Lt*r(lt));return[At*Lt*p(lt),At*p(vt)]}return Je.invert=function(lt,vt){var Lt=lt*lt+vt*vt,At=F(Lt),zt=(He-F(1-Lt*(He+1)/(He-1)))/((He-1)/At+At/(He-1));return[t(lt*zt,At*F(1-zt*zt)),At?L(vt*zt/At):0]},Je}function dn(He,Je){var lt=Qi(He);if(!Je)return lt;var vt=r(Je),Lt=p(Je);function At(zt,cr){var yr=lt(zt,cr),Er=yr[1],jr=Er*Lt/(He-1)+vt;return[yr[0]*vt/jr,Er/jr]}return At.invert=function(zt,cr){var yr=(He-1)/(He-1-cr*Lt);return lt.invert(yr*zt,yr*cr*vt)},At}function Pi(){var He=2,Je=0,lt=x.geoProjectionMutator(dn),vt=lt(He,Je);return vt.distance=function(Lt){return arguments.length?lt(He=+Lt,Je):He},vt.tilt=function(Lt){return arguments.length?lt(He,Je=Lt*f):Je*y},vt.scale(432.147).clipAngle(z(1/He)*y-1e-6)}var Di=1e-4,Ni=1e4,mi=-180,Mn=mi+Di,Qn=180,ao=Qn-Di,eo=-90,fo=eo+Di,An=90,un=An-Di;function yo(He){return He.length>0}function Ko(He){return Math.floor(He*Ni)/Ni}function Ss(He){return He===eo||He===An?[0,He]:[mi,Ko(He)]}function rl(He){var Je=He[0],lt=He[1],vt=!1;return Je<=Mn?(Je=mi,vt=!0):Je>=ao&&(Je=Qn,vt=!0),lt<=fo?(lt=eo,vt=!0):lt>=un&&(lt=An,vt=!0),vt?[Je,lt]:He}function Os(He){return He.map(rl)}function el(He,Je,lt){for(var vt=0,Lt=He.length;vt=ao||jr<=fo||jr>=un){At[zt]=rl(yr);for(var Qr=zt+1;QrMn&&Aafo&&za=cr)break;lt.push({index:-1,polygon:Je,ring:At=At.slice(Qr-1)}),At[0]=Ss(At[0][1]),zt=-1,cr=At.length}}}}function bs(He){var Je,lt=He.length,vt={},Lt={},At,zt,cr,yr,Er;for(Je=0;Je0?w-cr:cr)*y],Er=x.geoProjection(He(zt)).rotate(yr),jr=x.geoRotation(yr),Qr=Er.center;return delete Er.rotate,Er.center=function(pa){return arguments.length?Qr(jr(pa)):jr.invert(Qr())},Er.clipAngle(90)}function Rs(He){var Je=r(He);function lt(vt,Lt){var At=x.geoGnomonicRaw(vt,Lt);return At[0]*=Je,At}return lt.invert=function(vt,Lt){return x.geoGnomonicRaw.invert(vt/Je,Lt)},lt}function uu(){return Iu([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function Iu(He,Je){return Js(Rs,He,Je)}function Zu(He){if(!(He*=2))return x.geoAzimuthalEquidistantRaw;var Je=-He/2,lt=-Je,vt=He*He,Lt=T(lt),At=.5/p(lt);function zt(cr,yr){var Er=z(r(yr)*r(cr-Je)),jr=z(r(yr)*r(cr-lt)),Qr=yr<0?-1:1;return Er*=Er,jr*=jr,[(Er-jr)/(2*He),Qr*F(4*vt*jr-(vt-Er+jr)*(vt-Er+jr))/(2*He)]}return zt.invert=function(cr,yr){var Er=yr*yr,jr=r(F(Er+(pa=cr+Je)*pa)),Qr=r(F(Er+(pa=cr+lt)*pa)),pa,Aa;return[t(Aa=jr-Qr,pa=(jr+Qr)*Lt),(yr<0?-1:1)*z(F(pa*pa+Aa*Aa)*At)]},zt}function Ic(){return bu([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function bu(He,Je){return Js(Zu,He,Je)}function Rc(He,Je){if(E(Je)l&&--cr>0);return[m(He)*(F(Lt*Lt+4)+Lt)*w/4,A*zt]};function Yu(){return x.geoProjection(lc).scale(127.16)}function Ue(He,Je,lt,vt,Lt){function At(zt,cr){var yr=lt*p(vt*cr),Er=F(1-yr*yr),jr=F(2/(1+Er*r(zt*=Lt)));return[He*Er*jr*p(zt),Je*yr*jr]}return At.invert=function(zt,cr){var yr=zt/He,Er=cr/Je,jr=F(yr*yr+Er*Er),Qr=2*L(jr/2);return[t(zt*T(Qr),He*jr)/Lt,jr&&L(cr*p(Qr)/(Je*lt*jr))/vt]},At}function I(He,Je,lt,vt){var Lt=w/3;He=i(He,l),Je=i(Je,l),He=s(He,A),Je=s(Je,w-l),lt=i(lt,0),lt=s(lt,100-l),vt=i(vt,l);var At=lt/100+1,zt=vt/100,cr=z(At*r(Lt))/Lt,yr=p(He)/p(cr*A),Er=Je/w,jr=F(zt*p(He/2)/p(Je/2)),Qr=jr/F(Er*yr*cr),pa=1/(jr*F(Er*yr*cr));return Ue(Qr,pa,yr,cr,Er)}function ie(){var He=65*f,Je=60*f,lt=20,vt=200,Lt=x.geoProjectionMutator(I),At=Lt(He,Je,lt,vt);return At.poleline=function(zt){return arguments.length?Lt(He=+zt*f,Je,lt,vt):He*y},At.parallels=function(zt){return arguments.length?Lt(He,Je=+zt*f,lt,vt):Je*y},At.inflation=function(zt){return arguments.length?Lt(He,Je,lt=+zt,vt):lt},At.ratio=function(zt){return arguments.length?Lt(He,Je,lt,vt=+zt):vt},At.scale(163.775)}function we(){return ie().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)}var Se=4*w+3*F(3),Be=2*F(2*w*F(3)/Se),dt=rt(Be*F(3)/w,Be,Se/6);function St(){return x.geoProjection(dt).scale(176.84)}function Nt(He,Je){return[He*F(1-3*Je*Je/(w*w)),Je]}Nt.invert=function(He,Je){return[He/F(1-3*Je*Je/(w*w)),Je]};function $t(){return x.geoProjection(Nt).scale(152.63)}function Tr(He,Je){var lt=r(Je),vt=r(He)*lt,Lt=1-vt,At=r(He=t(p(He)*lt,-p(Je))),zt=p(He);return lt=F(1-vt*vt),[zt*lt-At*Lt,-At*lt-zt*Lt]}Tr.invert=function(He,Je){var lt=(He*He+Je*Je)/-2,vt=F(-lt*(2+lt)),Lt=Je*lt+He*vt,At=He*lt-Je*vt,zt=F(At*At+Lt*Lt);return[t(vt*Lt,zt*(1+lt)),zt?-L(vt*At/zt):0]};function Ar(){return x.geoProjection(Tr).rotate([0,-90,45]).scale(124.75).clipAngle(180-.001)}function Kr(He,Je){var lt=se(He,Je);return[(lt[0]+He/A)/2,(lt[1]+Je)/2]}Kr.invert=function(He,Je){var lt=He,vt=Je,Lt=25;do{var At=r(vt),zt=p(vt),cr=p(2*vt),yr=zt*zt,Er=At*At,jr=p(lt),Qr=r(lt/2),pa=p(lt/2),Aa=pa*pa,za=1-Er*Qr*Qr,ci=za?z(At*Qr)*F(Vi=1/za):Vi=0,Vi,ji=.5*(2*ci*At*pa+lt/A)-He,nn=.5*(ci*zt+vt)-Je,Sn=.5*Vi*(Er*Aa+ci*At*Qr*yr)+.5/A,Kn=Vi*(jr*cr/4-ci*zt*pa),Bn=.125*Vi*(cr*pa-ci*zt*Er*jr),wo=.5*Vi*(yr*Qr+ci*Aa*At)+.5,is=Kn*Bn-wo*Sn,Ao=(nn*Kn-ji*wo)/is,Zo=(ji*Bn-nn*Sn)/is;lt-=Ao,vt-=Zo}while((E(Ao)>l||E(Zo)>l)&&--Lt>0);return[lt,vt]};function na(){return x.geoProjection(Kr).scale(158.837)}v.geoNaturalEarth=x.geoNaturalEarth1,v.geoNaturalEarthRaw=x.geoNaturalEarth1Raw,v.geoAiry=$,v.geoAiryRaw=X,v.geoAitoff=le,v.geoAitoffRaw=se,v.geoArmadillo=V,v.geoArmadilloRaw=fe,v.geoAugust=ee,v.geoAugustRaw=Y,v.geoBaker=j,v.geoBakerRaw=ae,v.geoBerghaus=re,v.geoBerghausRaw=Q,v.geoBertin1953=at,v.geoBertin1953Raw=Ze,v.geoBoggs=tt,v.geoBoggsRaw=Oe,v.geoBonne=qt,v.geoBonneRaw=It,v.geoBottomley=kr,v.geoBottomleyRaw=Wt,v.geoBromley=qr,v.geoBromleyRaw=mr,v.geoChamberlin=Ie,v.geoChamberlinRaw=Ne,v.geoChamberlinAfrica=Te,v.geoCollignon=Ce,v.geoCollignonRaw=Ve,v.geoCraig=Pe,v.geoCraigRaw=Ee,v.geoCraster=_t,v.geoCrasterRaw=ct,v.geoCylindricalEqualArea=ir,v.geoCylindricalEqualAreaRaw=Ct,v.geoCylindricalStereographic=er,v.geoCylindricalStereographicRaw=rr,v.geoEckert1=fa,v.geoEckert1Raw=Lr,v.geoEckert2=Ia,v.geoEckert2Raw=Da,v.geoEckert3=Wa,v.geoEckert3Raw=qa,v.geoEckert4=hi,v.geoEckert4Raw=Ca,v.geoEckert5=Kt,v.geoEckert5Raw=wi,v.geoEckert6=Yt,v.geoEckert6Raw=Ft,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=on,v.geoGingery=Br,v.geoGingeryRaw=hn,v.geoGinzburg4=Ir,v.geoGinzburg4Raw=xr,v.geoGinzburg5=Hr,v.geoGinzburg5Raw=Ur,v.geoGinzburg6=Xt,v.geoGinzburg6Raw=xt,v.geoGinzburg8=Or,v.geoGinzburg8Raw=vr,v.geoGinzburg9=Pa,v.geoGinzburg9Raw=ba,v.geoGringorten=ki,v.geoGringortenRaw=la,v.geoGuyou=lo,v.geoGuyouRaw=On,v.geoHammer=Ae,v.geoHammerRaw=ce,v.geoHammerRetroazimuthal=Oo,v.geoHammerRetroazimuthalRaw=Wo,v.geoHealpix=ls,v.geoHealpixRaw=Ns,v.geoHill=Ks,v.geoHillRaw=Cs,v.geoHomolosine=Gn,v.geoHomolosineRaw=_s,v.geoHufnagel=vs,v.geoHufnagelRaw=zs,v.geoHyperelliptical=ko,v.geoHyperellipticalRaw=xn,v.geoInterrupt=co,v.geoInterruptedBoggs=vl,v.geoInterruptedHomolosine=js,v.geoInterruptedMollweide=As,v.geoInterruptedMollweideHemispheres=su,v.geoInterruptedSinuMollweide=du,v.geoInterruptedSinusoidal=Uc,v.geoKavrayskiy7=dc,v.geoKavrayskiy7Raw=Fs,v.geoLagrange=lu,v.geoLagrangeRaw=Hc,v.geoLarrivee=Ou,v.geoLarriveeRaw=ic,v.geoLaskowski=ml,v.geoLaskowskiRaw=nl,v.geoLittrow=Xs,v.geoLittrowRaw=xs,v.geoLoximuthal=Ul,v.geoLoximuthalRaw=nc,v.geoMiller=fl,v.geoMillerRaw=qu,v.geoModifiedStereographic=$l,v.geoModifiedStereographicRaw=xh,v.geoModifiedStereographicAlaska=Vu,v.geoModifiedStereographicGs48=jl,v.geoModifiedStereographicGs50=Mf,v.geoModifiedStereographicMiller=Ac,v.geoModifiedStereographicLee=nf,v.geoMollweide=Me,v.geoMollweideRaw=st,v.geoMtFlatPolarParabolic=jc,v.geoMtFlatPolarParabolicRaw=of,v.geoMtFlatPolarQuartic=Nf,v.geoMtFlatPolarQuarticRaw=Bf,v.geoMtFlatPolarSinusoidal=Ef,v.geoMtFlatPolarSinusoidalRaw=Gu,v.geoNaturalEarth2=Xc,v.geoNaturalEarth2Raw=oc,v.geoNellHammer=qc,v.geoNellHammerRaw=Ql,v.geoInterruptedQuarticAuthalic=Zs,v.geoNicolosi=fh,v.geoNicolosiRaw=kf,v.geoPatterson=yu,v.geoPattersonRaw=vc,v.geoPolyconic=El,v.geoPolyconicRaw=Tu,v.geoPolyhedral=sf,v.geoPolyhedralButterfly=sl,v.geoPolyhedralCollignon=Cf,v.geoPolyhedralWaterman=hl,v.geoProject=iu,v.geoGringortenQuincuncial=Qt,v.geoPeirceQuincuncial=br,v.geoPierceQuincuncial=br,v.geoQuantize=aa,v.geoQuincuncial=Pc,v.geoRectangularPolyconic=ka,v.geoRectangularPolyconicRaw=$r,v.geoRobinson=Hi,v.geoRobinsonRaw=Ci,v.geoSatellite=Pi,v.geoSatelliteRaw=dn,v.geoSinuMollweide=Us,v.geoSinuMollweideRaw=Ln,v.geoSinusoidal=Pt,v.geoSinusoidalRaw=Qe,v.geoStitch=ll,v.geoTimes=Lo,v.geoTimesRaw=Un,v.geoTwoPointAzimuthal=Iu,v.geoTwoPointAzimuthalRaw=Rs,v.geoTwoPointAzimuthalUsa=uu,v.geoTwoPointEquidistant=bu,v.geoTwoPointEquidistantRaw=Zu,v.geoTwoPointEquidistantUsa=Ic,v.geoVanDerGrinten=Au,v.geoVanDerGrintenRaw=Rc,v.geoVanDerGrinten2=ho,v.geoVanDerGrinten2Raw=yc,v.geoVanDerGrinten3=Dc,v.geoVanDerGrinten3Raw=Ro,v.geoVanDerGrinten4=Yu,v.geoVanDerGrinten4Raw=lc,v.geoWagner=ie,v.geoWagner7=we,v.geoWagnerRaw=I,v.geoWagner4=St,v.geoWagner4Raw=dt,v.geoWagner6=$t,v.geoWagner6Raw=Nt,v.geoWiechel=Ar,v.geoWiechelRaw=Tr,v.geoWinkel3=na,v.geoWinkel3Raw=Kr,Object.defineProperty(v,"__esModule",{value:!0})})}}),jU=Xe({"src/plots/geo/zoom.js"(Z,G){"use strict";var v=Hn(),x=sa(),S=so(),E=Math.PI/180,e=180/Math.PI,t={cursor:"pointer"},r={cursor:"auto"};function o(y,f){var R=y.projection,L;return f._isScoped?L=i:f._isClipped?L=h:L=s,L(y,R)}G.exports=o;function a(y,f){return v.behavior.zoom().translate(f.translate()).scale(f.scale())}function n(y,f,R){var L=y.id,z=y.graphDiv,F=z.layout,N=F[L],O=z._fullLayout,P=O[L],U={},B={};function X($,se){U[L+"."+$]=x.nestedProperty(N,$).get(),S.call("_storeDirectGUIEdit",F,O._preGUI,U);var le=x.nestedProperty(P,$);le.get()!==se&&(le.set(se),x.nestedProperty(N,$).set(se),B[L+"."+$]=se)}R(X),X("projection.scale",f.scale()/y.fitScale),X("fitbounds",!1),z.emit("plotly_relayout",B)}function i(y,f){var R=a(y,f);function L(){v.select(this).style(t)}function z(){f.scale(v.event.scale).translate(v.event.translate),y.render(!0);var O=f.invert(y.midPt);y.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":f.scale()/y.fitScale,"geo.center.lon":O[0],"geo.center.lat":O[1]})}function F(O){var P=f.invert(y.midPt);O("center.lon",P[0]),O("center.lat",P[1])}function N(){v.select(this).style(r),n(y,f,F)}return R.on("zoomstart",L).on("zoom",z).on("zoomend",N),R}function s(y,f){var R=a(y,f),L=2,z,F,N,O,P,U,B,X,$;function se(q){return f.invert(q)}function le(q){var oe=se(q);if(!oe)return!0;var ae=f(oe);return Math.abs(ae[0]-q[0])>L||Math.abs(ae[1]-q[1])>L}function fe(){v.select(this).style(t),z=v.mouse(this),F=f.rotate(),N=f.translate(),O=F,P=se(z)}function V(){if(U=v.mouse(this),le(z)){R.scale(f.scale()),R.translate(f.translate());return}f.scale(v.event.scale),f.translate([N[0],v.event.translate[1]]),P?se(U)&&(X=se(U),B=[O[0]+(X[0]-P[0]),F[1],F[2]],f.rotate(B),O=B):(z=U,P=se(z)),$=!0,y.render(!0);var q=f.rotate(),oe=f.invert(y.midPt);y.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":f.scale()/y.fitScale,"geo.center.lon":oe[0],"geo.center.lat":oe[1],"geo.projection.rotation.lon":-q[0]})}function Y(){v.select(this).style(r),$&&n(y,f,ee)}function ee(q){var oe=f.rotate(),ae=f.invert(y.midPt);q("projection.rotation.lon",-oe[0]),q("center.lon",ae[0]),q("center.lat",ae[1])}return R.on("zoomstart",fe).on("zoom",V).on("zoomend",Y),R}function h(y,f){var R={r:f.rotate(),k:f.scale()},L=a(y,f),z=u(L,"zoomstart","zoom","zoomend"),F=0,N=L.on,O;L.on("zoomstart",function(){v.select(this).style(t);var $=v.mouse(this),se=f.rotate(),le=se,fe=f.translate(),V=m(se);O=c(f,$),N.call(L,"zoom",function(){var Y=v.mouse(this);if(f.scale(R.k=v.event.scale),!O)$=Y,O=c(f,$);else if(c(f,Y)){f.rotate(se).translate(fe);var ee=c(f,Y),q=T(O,ee),oe=M(p(V,q)),ae=R.r=l(oe,O,le);(!isFinite(ae[0])||!isFinite(ae[1])||!isFinite(ae[2]))&&(ae=le),f.rotate(ae),le=ae}U(z.of(this,arguments))}),P(z.of(this,arguments))}).on("zoomend",function(){v.select(this).style(r),N.call(L,"zoom",null),B(z.of(this,arguments)),n(y,f,X)}).on("zoom.redraw",function(){y.render(!0);var $=f.rotate();y.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":f.scale()/y.fitScale,"geo.projection.rotation.lon":-$[0],"geo.projection.rotation.lat":-$[1]})});function P($){F++||$({type:"zoomstart"})}function U($){$({type:"zoom"})}function B($){--F||$({type:"zoomend"})}function X($){var se=f.rotate();$("projection.rotation.lon",-se[0]),$("projection.rotation.lat",-se[1])}return v.rebind(L,z,"on")}function c(y,f){var R=y.invert(f);return R&&isFinite(R[0])&&isFinite(R[1])&&g(R)}function m(y){var f=.5*y[0]*E,R=.5*y[1]*E,L=.5*y[2]*E,z=Math.sin(f),F=Math.cos(f),N=Math.sin(R),O=Math.cos(R),P=Math.sin(L),U=Math.cos(L);return[F*O*U+z*N*P,z*O*U-F*N*P,F*N*U+z*O*P,F*O*P-z*N*U]}function p(y,f){var R=y[0],L=y[1],z=y[2],F=y[3],N=f[0],O=f[1],P=f[2],U=f[3];return[R*N-L*O-z*P-F*U,R*O+L*N+z*U-F*P,R*P-L*U+z*N+F*O,R*U+L*P-z*O+F*N]}function T(y,f){if(!(!y||!f)){var R=d(y,f),L=Math.sqrt(b(R,R)),z=.5*Math.acos(Math.max(-1,Math.min(1,b(y,f)))),F=Math.sin(z)/L;return L&&[Math.cos(z),R[2]*F,-R[1]*F,R[0]*F]}}function l(y,f,R){var L=A(f,2,y[0]);L=A(L,1,y[1]),L=A(L,0,y[2]-R[2]);var z=f[0],F=f[1],N=f[2],O=L[0],P=L[1],U=L[2],B=Math.atan2(F,z)*e,X=Math.sqrt(z*z+F*F),$,se;Math.abs(P)>X?(se=(P>0?90:-90)-B,$=0):(se=Math.asin(P/X)*e-B,$=Math.sqrt(X*X-P*P));var le=180-se-2*B,fe=(Math.atan2(U,O)-Math.atan2(N,$))*e,V=(Math.atan2(U,O)-Math.atan2(N,-$))*e,Y=_(R[0],R[1],se,fe),ee=_(R[0],R[1],le,V);return Y<=ee?[se,fe,R[2]]:[le,V,R[2]]}function _(y,f,R,L){var z=w(R-y),F=w(L-f);return Math.sqrt(z*z+F*F)}function w(y){return(y%360+540)%360-180}function A(y,f,R){var L=R*E,z=y.slice(),F=f===0?1:0,N=f===2?1:2,O=Math.cos(L),P=Math.sin(L);return z[F]=y[F]*O-y[N]*P,z[N]=y[N]*O+y[F]*P,z}function M(y){return[Math.atan2(2*(y[0]*y[1]+y[2]*y[3]),1-2*(y[1]*y[1]+y[2]*y[2]))*e,Math.asin(Math.max(-1,Math.min(1,2*(y[0]*y[2]-y[3]*y[1]))))*e,Math.atan2(2*(y[0]*y[3]+y[1]*y[2]),1-2*(y[2]*y[2]+y[3]*y[3]))*e]}function g(y){var f=y[0]*E,R=y[1]*E,L=Math.cos(R);return[L*Math.cos(f),L*Math.sin(f),Math.sin(R)]}function b(y,f){for(var R=0,L=0,z=y.length;L0&&P._module.calcGeoJSON(O,L)}if(!z){var U=this.updateProjection(R,L);if(U)return;(!this.viewInitial||this.scope!==F.scope)&&this.saveViewInitial(F)}this.scope=F.scope,this.updateBaseLayers(L,F),this.updateDims(L,F),this.updateFx(L,F),s.generalUpdatePerTraceModule(this.graphDiv,this,R,F);var B=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=B.selectAll(".point"),this.dataPoints.text=B.selectAll("text"),this.dataPaths.line=B.selectAll(".js-line");var X=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=X.selectAll("path"),this._render()},d.updateProjection=function(R,L){var z=this.graphDiv,F=L[this.id],N=L._size,O=F.domain,P=F.projection,U=F.lonaxis,B=F.lataxis,X=U._ax,$=B._ax,se=this.projection=u(F),le=[[N.l+N.w*O.x[0],N.t+N.h*(1-O.y[1])],[N.l+N.w*O.x[1],N.t+N.h*(1-O.y[0])]],fe=F.center||{},V=P.rotation||{},Y=U.range||[],ee=B.range||[];if(F.fitbounds){X._length=le[1][0]-le[0][0],$._length=le[1][1]-le[0][1],X.range=c(z,X),$.range=c(z,$);var q=(X.range[0]+X.range[1])/2,oe=($.range[0]+$.range[1])/2;if(F._isScoped)fe={lon:q,lat:oe};else if(F._isClipped){fe={lon:q,lat:oe},V={lon:q,lat:oe,roll:V.roll};var ae=P.type,j=w.lonaxisSpan[ae]/2||180,Q=w.lataxisSpan[ae]/2||90;Y=[q-j,q+j],ee=[oe-Q,oe+Q]}else fe={lon:q,lat:oe},V={lon:q,lat:V.lat,roll:V.roll}}se.center([fe.lon-V.lon,fe.lat-V.lat]).rotate([-V.lon,-V.lat,V.roll]).parallels(P.parallels);var re=f(Y,ee);se.fitExtent(le,re);var ce=this.bounds=se.getBounds(re),be=this.fitScale=se.scale(),Ae=se.translate();if(F.fitbounds){var De=se.getBounds(f(X.range,$.range)),ze=Math.min((ce[1][0]-ce[0][0])/(De[1][0]-De[0][0]),(ce[1][1]-ce[0][1])/(De[1][1]-De[0][1]));isFinite(ze)?se.scale(ze*be):r.warn("Something went wrong during"+this.id+"fitbounds computations.")}else se.scale(P.scale*be);var Ze=this.midPt=[(ce[0][0]+ce[1][0])/2,(ce[0][1]+ce[1][1])/2];if(se.translate([Ae[0]+(Ze[0]-Ae[0]),Ae[1]+(Ze[1]-Ae[1])]).clipExtent(ce),F._isAlbersUsa){var at=se([fe.lon,fe.lat]),nt=se.translate();se.translate([nt[0]-(at[0]-nt[0]),nt[1]-(at[1]-nt[1])])}},d.updateBaseLayers=function(R,L){var z=this,F=z.topojson,N=z.layers,O=z.basePaths;function P(le){return le==="lonaxis"||le==="lataxis"}function U(le){return!!w.lineLayers[le]}function B(le){return!!w.fillLayers[le]}var X=this.hasChoropleth?w.layersForChoropleth:w.layers,$=X.filter(function(le){return U(le)||B(le)?L["show"+le]:P(le)?L[le].showgrid:!0}),se=z.framework.selectAll(".layer").data($,String);se.exit().each(function(le){delete N[le],delete O[le],v.select(this).remove()}),se.enter().append("g").attr("class",function(le){return"layer "+le}).each(function(le){var fe=N[le]=v.select(this);le==="bg"?z.bgRect=fe.append("rect").style("pointer-events","all"):P(le)?O[le]=fe.append("path").style("fill","none"):le==="backplot"?fe.append("g").classed("choroplethlayer",!0):le==="frontplot"?fe.append("g").classed("scatterlayer",!0):U(le)?O[le]=fe.append("path").style("fill","none").style("stroke-miterlimit",2):B(le)&&(O[le]=fe.append("path").style("stroke","none"))}),se.order(),se.each(function(le){var fe=O[le],V=w.layerNameToAdjective[le];le==="frame"?fe.datum(w.sphereSVG):U(le)||B(le)?fe.datum(g(F,F.objects[le])):P(le)&&fe.datum(y(le,L,R)).call(a.stroke,L[le].gridcolor).call(n.dashLine,L[le].griddash,L[le].gridwidth),U(le)?fe.call(a.stroke,L[V+"color"]).call(n.dashLine,"",L[V+"width"]):B(le)&&fe.call(a.fill,L[V+"color"])})},d.updateDims=function(R,L){var z=this.bounds,F=(L.framewidth||0)/2,N=z[0][0]-F,O=z[0][1]-F,P=z[1][0]-N+F,U=z[1][1]-O+F;n.setRect(this.clipRect,N,O,P,U),this.bgRect.call(n.setRect,N,O,P,U).call(a.fill,L.bgcolor),this.xaxis._offset=N,this.xaxis._length=P,this.yaxis._offset=O,this.yaxis._length=U},d.updateFx=function(R,L){var z=this,F=z.graphDiv,N=z.bgRect,O=R.dragmode,P=R.clickmode;if(z.isStatic)return;function U(){var se=z.viewInitial,le={};for(var fe in se)le[z.id+"."+fe]=se[fe];t.call("_guiRelayout",F,le),F.emit("plotly_doubleclick",null)}function B(se){return z.projection.invert([se[0]+z.xaxis._offset,se[1]+z.yaxis._offset])}var X=function(se,le){if(le.isRect){var fe=se.range={};fe[z.id]=[B([le.xmin,le.ymin]),B([le.xmax,le.ymax])]}else{var V=se.lassoPoints={};V[z.id]=le.map(B)}},$={element:z.bgRect.node(),gd:F,plotinfo:{id:z.id,xaxis:z.xaxis,yaxis:z.yaxis,fillRangeItems:X},xaxes:[z.xaxis],yaxes:[z.yaxis],subplot:z.id,clickFn:function(se){se===2&&T(F)}};O==="pan"?(N.node().onmousedown=null,N.call(_(z,L)),N.on("dblclick.zoom",U),F._context._scrollZoom.geo||N.on("wheel.zoom",null)):(O==="select"||O==="lasso")&&(N.on(".zoom",null),$.prepFn=function(se,le,fe){p(se,le,fe,$,O)},m.init($)),N.on("mousemove",function(){var se=z.projection.invert(r.getPositionFromD3Event());if(!se)return m.unhover(F,v.event);z.xaxis.p2c=function(){return se[0]},z.yaxis.p2c=function(){return se[1]},i.hover(F,v.event,z.id)}),N.on("mouseout",function(){F._dragging||m.unhover(F,v.event)}),N.on("click",function(){O!=="select"&&O!=="lasso"&&(P.indexOf("select")>-1&&l(v.event,F,[z.xaxis],[z.yaxis],z.id,$),P.indexOf("event")>-1&&i.click(F,v.event))})},d.makeFramework=function(){var R=this,L=R.graphDiv,z=L._fullLayout,F="clip"+z._uid+R.id;R.clipDef=z._clips.append("clipPath").attr("id",F),R.clipRect=R.clipDef.append("rect"),R.framework=v.select(R.container).append("g").attr("class","geo "+R.id).call(n.setClipUrl,F,L),R.project=function(N){var O=R.projection(N);return O?[O[0]-R.xaxis._offset,O[1]-R.yaxis._offset]:[null,null]},R.xaxis={_id:"x",c2p:function(N){return R.project(N)[0]}},R.yaxis={_id:"y",c2p:function(N){return R.project(N)[1]}},R.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},h.setConvert(R.mockAxis,z)},d.saveViewInitial=function(R){var L=R.center||{},z=R.projection,F=z.rotation||{};this.viewInitial={fitbounds:R.fitbounds,"projection.scale":z.scale};var N;R._isScoped?N={"center.lon":L.lon,"center.lat":L.lat}:R._isClipped?N={"projection.rotation.lon":F.lon,"projection.rotation.lat":F.lat}:N={"center.lon":L.lon,"center.lat":L.lat,"projection.rotation.lon":F.lon},r.extendFlat(this.viewInitial,N)},d.render=function(R){this._hasMarkerAngles&&R?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()},d._render=function(){var R=this.projection,L=R.getPath(),z;function F(O){var P=R(O.lonlat);return P?o(P[0],P[1]):null}function N(O){return R.isLonLatOverEdges(O.lonlat)?"none":null}for(z in this.basePaths)this.basePaths[z].attr("d",L);for(z in this.dataPaths)this.dataPaths[z].attr("d",function(O){return L(O.geojson)});for(z in this.dataPoints)this.dataPoints[z].attr("display",N).attr("transform",F)};function u(R){var L=R.projection,z=L.type,F=w.projNames[z];F="geo"+r.titleCase(F);for(var N=x[F]||e[F],O=N(),P=R._isSatellite?Math.acos(1/L.distance)*180/Math.PI:R._isClipped?w.lonaxisSpan[z]/2:null,U=["center","rotate","parallels","clipExtent"],B=function(se){return se?O:[]},X=0;XV}else return!1},O.getPath=function(){return S().projection(O)},O.getBounds=function(se){return O.getPath().bounds(se)},O.precision(w.precision),R._isSatellite&&O.tilt(L.tilt).distance(L.distance),P&&O.clipAngle(P-w.clipPad),O}function y(R,L,z){var F=1e-6,N=2.5,O=L[R],P=w.scopeDefaults[L.scope],U,B,X;R==="lonaxis"?(U=P.lonaxisRange,B=P.lataxisRange,X=function(oe,ae){return[oe,ae]}):R==="lataxis"&&(U=P.lataxisRange,B=P.lonaxisRange,X=function(oe,ae){return[ae,oe]});var $={type:"linear",range:[U[0],U[1]-F],tick0:O.tick0,dtick:O.dtick};h.setConvert($,z);var se=h.calcTicks($);!L.isScoped&&R==="lonaxis"&&se.pop();for(var le=se.length,fe=new Array(le),V=0;V0&&N<0&&(N+=360);var U=(N-F)/4;return{type:"Polygon",coordinates:[[[F,O],[F,P],[F+U,P],[F+2*U,P],[F+3*U,P],[N,P],[N,O],[N-U,O],[N-2*U,O],[N-3*U,O],[F,O]]]}}}}),FE=Xe({"src/plots/geo/layout_attributes.js"(Z,G){"use strict";var v=sh(),x=wc().attributes,S=Gh().dash,E=yx(),e=pc().overrideAll,t=Jm(),r={range:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},showgrid:{valType:"boolean",dflt:!1},tick0:{valType:"number",dflt:0},dtick:{valType:"number"},gridcolor:{valType:"color",dflt:v.lightLine},gridwidth:{valType:"number",min:0,dflt:1},griddash:S},o=G.exports=e({domain:x({name:"geo"},{}),fitbounds:{valType:"enumerated",values:[!1,"locations","geojson"],dflt:!1,editType:"plot"},resolution:{valType:"enumerated",values:[110,50],dflt:110,coerceNumber:!0},scope:{valType:"enumerated",values:t(E.scopeDefaults),dflt:"world"},projection:{type:{valType:"enumerated",values:t(E.projNames)},rotation:{lon:{valType:"number"},lat:{valType:"number"},roll:{valType:"number"}},tilt:{valType:"number",dflt:0},distance:{valType:"number",min:1.001,dflt:2},parallels:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},scale:{valType:"number",min:0,dflt:1}},center:{lon:{valType:"number"},lat:{valType:"number"}},visible:{valType:"boolean",dflt:!0},showcoastlines:{valType:"boolean"},coastlinecolor:{valType:"color",dflt:v.defaultLine},coastlinewidth:{valType:"number",min:0,dflt:1},showland:{valType:"boolean",dflt:!1},landcolor:{valType:"color",dflt:E.landColor},showocean:{valType:"boolean",dflt:!1},oceancolor:{valType:"color",dflt:E.waterColor},showlakes:{valType:"boolean",dflt:!1},lakecolor:{valType:"color",dflt:E.waterColor},showrivers:{valType:"boolean",dflt:!1},rivercolor:{valType:"color",dflt:E.waterColor},riverwidth:{valType:"number",min:0,dflt:1},showcountries:{valType:"boolean"},countrycolor:{valType:"color",dflt:v.defaultLine},countrywidth:{valType:"number",min:0,dflt:1},showsubunits:{valType:"boolean"},subunitcolor:{valType:"color",dflt:v.defaultLine},subunitwidth:{valType:"number",min:0,dflt:1},showframe:{valType:"boolean"},framecolor:{valType:"color",dflt:v.defaultLine},framewidth:{valType:"number",min:0,dflt:1},bgcolor:{valType:"color",dflt:v.background},lonaxis:r,lataxis:r},"plot","from-root");o.uirevision={valType:"any",editType:"none"}}}),VU=Xe({"src/plots/geo/layout_defaults.js"(Z,G){"use strict";var v=sa(),x=o0(),S=Hh().getSubplotData,E=yx(),e=FE(),t=E.axesNames;G.exports=function(a,n,i){x(a,n,i,{type:"geo",attributes:e,handleDefaults:r,fullData:i,partition:"y"})};function r(o,a,n,i){var s=S(i.fullData,"geo",i.id),h=s.map(function(ee){return ee.index}),c=n("resolution"),m=n("scope"),p=E.scopeDefaults[m],T=n("projection.type",p.projType),l=a._isAlbersUsa=T==="albers usa";l&&(m=a.scope="usa");var _=a._isScoped=m!=="world",w=a._isSatellite=T==="satellite",A=a._isConic=T.indexOf("conic")!==-1||T==="albers",M=a._isClipped=!!E.lonaxisSpan[T];if(o.visible===!1){var g=v.extendDeep({},a._template);g.showcoastlines=!1,g.showcountries=!1,g.showframe=!1,g.showlakes=!1,g.showland=!1,g.showocean=!1,g.showrivers=!1,g.showsubunits=!1,g.lonaxis&&(g.lonaxis.showgrid=!1),g.lataxis&&(g.lataxis.showgrid=!1),a._template=g}for(var b=n("visible"),d,u=0;u0&&B<0&&(B+=360);var X=(U+B)/2,$;if(!l){var se=_?p.projRotate:[X,0,0];$=n("projection.rotation.lon",se[0]),n("projection.rotation.lat",se[1]),n("projection.rotation.roll",se[2]),d=n("showcoastlines",!_&&b),d&&(n("coastlinecolor"),n("coastlinewidth")),d=n("showocean",b?void 0:!1),d&&n("oceancolor")}var le,fe;if(l?(le=-96.6,fe=38.7):(le=_?X:$,fe=(P[0]+P[1])/2),n("center.lon",le),n("center.lat",fe),w&&(n("projection.tilt"),n("projection.distance")),A){var V=p.projParallels||[0,60];n("projection.parallels",V)}n("projection.scale"),d=n("showland",b?void 0:!1),d&&n("landcolor"),d=n("showlakes",b?void 0:!1),d&&n("lakecolor"),d=n("showrivers",b?void 0:!1),d&&(n("rivercolor"),n("riverwidth")),d=n("showcountries",_&&m!=="usa"&&b),d&&(n("countrycolor"),n("countrywidth")),(m==="usa"||m==="north america"&&c===50)&&(n("showsubunits",b),n("subunitcolor"),n("subunitwidth")),_||(d=n("showframe",b),d&&(n("framecolor"),n("framewidth"))),n("bgcolor");var Y=n("fitbounds");Y&&(delete a.projection.scale,_?(delete a.center.lon,delete a.center.lat):M?(delete a.center.lon,delete a.center.lat,delete a.projection.rotation.lon,delete a.projection.rotation.lat,delete a.lonaxis.range,delete a.lataxis.range):(delete a.center.lon,delete a.center.lat,delete a.projection.rotation.lon))}}}),OE=Xe({"src/plots/geo/index.js"(Z,G){"use strict";var v=Hh().getSubplotCalcData,x=sa().counterRegex,S=qU(),E="geo",e=x(E),t={};t[E]={valType:"subplotid",dflt:E,editType:"calc"};function r(n){for(var i=n._fullLayout,s=n.calcdata,h=i._subplots[E],c=0;c")}}}}),fT=Xe({"src/traces/choropleth/event_data.js"(Z,G){"use strict";G.exports=function(x,S,E,e,t){x.location=S.location,x.z=S.z;var r=e[t];return r.fIn&&r.fIn.properties&&(x.properties=r.fIn.properties),x.ct=r.ct,x}}}),hT=Xe({"src/traces/choropleth/select.js"(Z,G){"use strict";G.exports=function(x,S){var E=x.cd,e=x.xaxis,t=x.yaxis,r=[],o,a,n,i,s;if(S===!1)for(o=0;o=Math.min(B,X)&&T<=Math.max(B,X)?0:1/0}if(L=Math.min($,se)&&l<=Math.max($,se)?0:1/0}N=Math.sqrt(L*L+z*z),u=w[R]}}}else for(R=w.length-1;R>-1;R--)d=w[R],y=m[d],f=p[d],L=h.c2p(y)-T,z=c.c2p(f)-l,F=Math.sqrt(L*L+z*z),F100},Z.isDotSymbol=function(v){return typeof v=="string"?G.DOT_RE.test(v):v>200}}}),YU=Xe({"src/traces/scattergl/defaults.js"(Z,G){"use strict";var v=sa(),x=so(),S=dT(),E=xx(),e=Tv(),t=Fu(),r=n1(),o=Qd(),a=md(),n=Dd(),i=ev(),s=zd();G.exports=function(c,m,p,T){function l(u,y){return v.coerce(c,m,E,u,y)}var _=c.marker?S.isOpenSymbol(c.marker.symbol):!1,w=t.isBubble(c),A=r(c,m,T,l);if(!A){m.visible=!1;return}o(c,m,T,l),l("xhoverformat"),l("yhoverformat");var M=A>>1,c=r[h],m=a!==void 0?a(c,o):c-o;m>=0?(s=h,i=h-1):n=h+1}return s}function x(r,o,a,n,i){for(var s=i+1;n<=i;){var h=n+i>>>1,c=r[h],m=a!==void 0?a(c,o):c-o;m>0?(s=h,i=h-1):n=h+1}return s}function S(r,o,a,n,i){for(var s=n-1;n<=i;){var h=n+i>>>1,c=r[h],m=a!==void 0?a(c,o):c-o;m<0?(s=h,n=h+1):i=h-1}return s}function E(r,o,a,n,i){for(var s=n-1;n<=i;){var h=n+i>>>1,c=r[h],m=a!==void 0?a(c,o):c-o;m<=0?(s=h,n=h+1):i=h-1}return s}function e(r,o,a,n,i){for(;n<=i;){var s=n+i>>>1,h=r[s],c=a!==void 0?a(h,o):h-o;if(c===0)return s;c<=0?n=s+1:i=s-1}return-1}function t(r,o,a,n,i,s){return typeof a=="function"?s(r,o,a,n===void 0?0:n|0,i===void 0?r.length-1:i|0):s(r,o,void 0,a===void 0?0:a|0,n===void 0?r.length-1:n|0)}G.exports={ge:function(r,o,a,n,i){return t(r,o,a,n,i,v)},gt:function(r,o,a,n,i){return t(r,o,a,n,i,x)},lt:function(r,o,a,n,i){return t(r,o,a,n,i,S)},le:function(r,o,a,n,i){return t(r,o,a,n,i,E)},eq:function(r,o,a,n,i){return t(r,o,a,n,i,e)}}}}),Ev=Xe({"node_modules/pick-by-alias/index.js"(Z,G){"use strict";G.exports=function(E,e,t){var r={},o,a;if(typeof e=="string"&&(e=x(e)),Array.isArray(e)){var n={};for(a=0;a1&&(S=arguments),typeof S=="string"?S=S.split(/\s/).map(parseFloat):typeof S=="number"&&(S=[S]),S.length&&typeof S[0]=="number"?S.length===1?E={width:S[0],height:S[0],x:0,y:0}:S.length===2?E={width:S[0],height:S[1],x:0,y:0}:E={x:S[0],y:S[1],width:S[2]-S[0]||0,height:S[3]-S[1]||0}:S&&(S=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"}),E={x:S.left||0,y:S.top||0},S.width==null?S.right?E.width=S.right-E.x:E.width=0:E.width=S.width,S.height==null?S.bottom?E.height=S.bottom-E.y:E.height=0:E.height=S.height),E}}}),mg=Xe({"node_modules/array-bounds/index.js"(Z,G){"use strict";G.exports=v;function v(x,S){if(!x||x.length==null)throw Error("Argument should be an array");S==null?S=1:S=Math.floor(S);for(var E=Array(S*2),e=0;et&&(t=x[o]),x[o]>>1,w;m.dtype||(m.dtype="array"),typeof m.dtype=="string"?w=new(a(m.dtype))(_):m.dtype&&(w=m.dtype,Array.isArray(w)&&(w.length=_));for(let L=0;L<_;++L)w[L]=L;let A=[],M=[],g=[],b=[];u(0,0,1,w,0,1);let d=0;for(let L=0;Lp||P>i){for(let oe=0;oere||X>ce||$=le||j===Q)return;let be=A[ae];Q===void 0&&(Q=be.length);for(let Me=j;Me=N&&he<=P&&Oe>=O&&Oe<=U&&fe.push(ye)}let Ae=M[ae],De=Ae[j*4+0],ze=Ae[j*4+1],Ze=Ae[j*4+2],at=Ae[j*4+3],nt=Y(Ae,j+1),rt=oe*.5,st=ae+1;V(ee,q,rt,st,De,ze||Ze||at||nt),V(ee,q+rt,rt,st,ze,Ze||at||nt),V(ee+rt,q,rt,st,Ze,at||nt),V(ee+rt,q+rt,rt,st,at,nt)}function Y(ee,q){let oe=null,ae=0;for(;oe===null;)if(oe=ee[q*4+ae],ae++,ae>ee.length)return null;return oe}return fe}function f(L,z,F,N,O){let P=[];for(let U=0;U1&&(c=1),c<-1&&(c=-1),h*Math.acos(c)},t=function(a,n,i,s,h,c,m,p,T,l,_,w){var A=Math.pow(h,2),M=Math.pow(c,2),g=Math.pow(_,2),b=Math.pow(w,2),d=A*M-A*b-M*g;d<0&&(d=0),d/=A*b+M*g,d=Math.sqrt(d)*(m===p?-1:1);var u=d*h/c*w,y=d*-c/h*_,f=l*u-T*y+(a+i)/2,R=T*u+l*y+(n+s)/2,L=(_-u)/h,z=(w-y)/c,F=(-_-u)/h,N=(-w-y)/c,O=e(1,0,L,z),P=e(L,z,F,N);return p===0&&P>0&&(P-=x),p===1&&P<0&&(P+=x),[f,R,O,P]},r=function(a){var n=a.px,i=a.py,s=a.cx,h=a.cy,c=a.rx,m=a.ry,p=a.xAxisRotation,T=p===void 0?0:p,l=a.largeArcFlag,_=l===void 0?0:l,w=a.sweepFlag,A=w===void 0?0:w,M=[];if(c===0||m===0)return[];var g=Math.sin(T*x/360),b=Math.cos(T*x/360),d=b*(n-s)/2+g*(i-h)/2,u=-g*(n-s)/2+b*(i-h)/2;if(d===0&&u===0)return[];c=Math.abs(c),m=Math.abs(m);var y=Math.pow(d,2)/Math.pow(c,2)+Math.pow(u,2)/Math.pow(m,2);y>1&&(c*=Math.sqrt(y),m*=Math.sqrt(y));var f=t(n,i,s,h,c,m,_,A,g,b,d,u),R=v(f,4),L=R[0],z=R[1],F=R[2],N=R[3],O=Math.abs(N)/(x/4);Math.abs(1-O)<1e-7&&(O=1);var P=Math.max(Math.ceil(O),1);N/=P;for(var U=0;U4?(o=l[l.length-4],a=l[l.length-3]):(o=c,a=m),r.push(l)}return r}function S(e,t,r,o){return["C",e,t,r,o,r,o]}function E(e,t,r,o,a,n){return["C",e/3+2/3*r,t/3+2/3*o,a/3+2/3*r,n/3+2/3*o,a,n]}}}),UE=Xe({"node_modules/is-svg-path/index.js"(Z,G){"use strict";G.exports=function(x){return typeof x!="string"?!1:(x=x.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(x)&&/[\dz]$/i.test(x)&&x.length>4))}}}),ij=Xe({"node_modules/svg-path-bounds/index.js"(Z,G){"use strict";var v=M_(),x=NE(),S=aj(),E=UE(),e=K_();G.exports=t;function t(r){if(Array.isArray(r)&&r.length===1&&typeof r[0]=="string"&&(r=r[0]),typeof r=="string"&&(e(E(r),"String is not an SVG path."),r=v(r)),e(Array.isArray(r),"Argument should be a string or an array of path segments."),r=x(r),r=S(r),!r.length)return[0,0,0,0];for(var o=[1/0,1/0,-1/0,-1/0],a=0,n=r.length;ao[2]&&(o[2]=i[s+0]),i[s+1]>o[3]&&(o[3]=i[s+1]);return o}}}),nj=Xe({"node_modules/normalize-svg-path/index.js"(Z,G){var v=Math.PI,x=o(120);G.exports=S;function S(a){for(var n,i=[],s=0,h=0,c=0,m=0,p=null,T=null,l=0,_=0,w=0,A=a.length;w7&&(i.push(M.splice(0,7)),M.unshift("C"));break;case"S":var b=l,d=_;(n=="C"||n=="S")&&(b+=b-s,d+=d-h),M=["C",b,d,M[1],M[2],M[3],M[4]];break;case"T":n=="Q"||n=="T"?(p=l*2-p,T=_*2-T):(p=l,T=_),M=e(l,_,p,T,M[1],M[2]);break;case"Q":p=M[1],T=M[2],M=e(l,_,M[1],M[2],M[3],M[4]);break;case"L":M=E(l,_,M[1],M[2]);break;case"H":M=E(l,_,M[1],_);break;case"V":M=E(l,_,l,M[1]);break;case"Z":M=E(l,_,c,m);break}n=g,l=M[M.length-2],_=M[M.length-1],M.length>4?(s=M[M.length-4],h=M[M.length-3]):(s=l,h=_),i.push(M)}return i}function E(a,n,i,s){return["C",a,n,i,s,i,s]}function e(a,n,i,s,h,c){return["C",a/3+2/3*i,n/3+2/3*s,h/3+2/3*i,c/3+2/3*s,h,c]}function t(a,n,i,s,h,c,m,p,T,l){if(l)f=l[0],R=l[1],u=l[2],y=l[3];else{var _=r(a,n,-h);a=_.x,n=_.y,_=r(p,T,-h),p=_.x,T=_.y;var w=(a-p)/2,A=(n-T)/2,M=w*w/(i*i)+A*A/(s*s);M>1&&(M=Math.sqrt(M),i=M*i,s=M*s);var g=i*i,b=s*s,d=(c==m?-1:1)*Math.sqrt(Math.abs((g*b-g*A*A-b*w*w)/(g*A*A+b*w*w)));d==1/0&&(d=1);var u=d*i*A/s+(a+p)/2,y=d*-s*w/i+(n+T)/2,f=Math.asin(((n-y)/s).toFixed(9)),R=Math.asin(((T-y)/s).toFixed(9));f=aR&&(f=f-v*2),!m&&R>f&&(R=R-v*2)}if(Math.abs(R-f)>x){var L=R,z=p,F=T;R=f+x*(m&&R>f?1:-1),p=u+i*Math.cos(R),T=y+s*Math.sin(R);var N=t(p,T,i,s,h,0,m,z,F,[R,L,u,y])}var O=Math.tan((R-f)/4),P=4/3*i*O,U=4/3*s*O,B=[2*a-(a+P*Math.sin(f)),2*n-(n-U*Math.cos(f)),p+P*Math.sin(R),T-U*Math.cos(R),p,T];if(l)return B;N&&(B=B.concat(N));for(var X=0;X0?r.strokeStyle="white":r.strokeStyle="black",r.lineWidth=Math.abs(p)),r.translate(h*.5,c*.5),r.scale(_,_),n()){var w=new Path2D(i);r.fill(w),p&&r.stroke(w)}else{var A=x(i);S(r,A),r.fill(),p&&r.stroke()}r.setTransform(1,0,0,1,0,0);var M=e(r,{cutoff:s.cutoff!=null?s.cutoff:.5,radius:s.radius!=null?s.radius:m*.5});return M}var a;function n(){if(a!=null)return a;var i=document.createElement("canvas").getContext("2d");if(i.canvas.width=i.canvas.height=1,!window.Path2D)return a=!1;var s=new Path2D("M0,0h1v1h-1v-1Z");i.fillStyle="black",i.fill(s);var h=i.getImageData(0,0,1,1);return a=h&&h.data&&h.data[3]===255}}}),yg=Xe({"src/traces/scattergl/convert.js"(Z,G){"use strict";var v=rs(),x=lj(),S=d0(),E=so(),e=sa(),t=e.isArrayOrTypedArray,r=es(),o=ef(),a=tm().formatColor,n=Fu(),i=r1(),s=dT(),h=y0(),c=Ym().DESELECTDIM,m={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},p=$p().appendArrayPointValue;function T(N,O){var P,U={marker:void 0,markerSel:void 0,markerUnsel:void 0,line:void 0,fill:void 0,errorX:void 0,errorY:void 0,text:void 0,textSel:void 0,textUnsel:void 0},B=N._context.plotGlPixelRatio;if(O.visible!==!0)return U;if(n.hasText(O)&&(U.text=l(N,O),U.textSel=M(N,O,O.selected),U.textUnsel=M(N,O,O.unselected)),n.hasMarkers(O)&&(U.marker=w(N,O),U.markerSel=A(N,O,O.selected),U.markerUnsel=A(N,O,O.unselected),!O.unselected&&t(O.marker.opacity))){var X=O.marker.opacity;for(U.markerUnsel.opacity=new Array(X.length),P=0;P500?"bold":"normal":N}function w(N,O){var P=O._length,U=O.marker,B={},X,$=t(U.symbol),se=t(U.angle),le=t(U.color),fe=t(U.line.color),V=t(U.opacity),Y=t(U.size),ee=t(U.line.width),q;if($||(q=s.isOpenSymbol(U.symbol)),$||le||fe||V||se){B.symbols=new Array(P),B.angles=new Array(P),B.colors=new Array(P),B.borderColors=new Array(P);var oe=U.symbol,ae=U.angle,j=a(U,U.opacity,P),Q=a(U.line,U.opacity,P);if(!t(Q[0])){var re=Q;for(Q=Array(P),X=0;Xh.TOO_MANY_POINTS||n.hasMarkers(O)?"rect":"round";if(fe&&O.connectgaps){var Y=X[0],ee=X[1];for($=0;$1?le[$]:le[0]:le,q=t(fe)?fe.length>1?fe[$]:fe[0]:fe,oe=m[ee],ae=m[q],j=V?V/.8+1:0,Q=-ae*j-ae*.5;X.offset[$]=[oe*j/Y,Q/Y]}}return X}G.exports={style:T,markerStyle:w,markerSelection:A,linePositions:L,errorBarPositions:z,textPosition:F}}}),jE=Xe({"src/traces/scattergl/scene_update.js"(Z,G){"use strict";var v=sa();G.exports=function(S,E){var e=E._scene,t={count:0,dirty:!0,lineOptions:[],fillOptions:[],markerOptions:[],markerSelectedOptions:[],markerUnselectedOptions:[],errorXOptions:[],errorYOptions:[],textOptions:[],textSelectedOptions:[],textUnselectedOptions:[],selectBatch:[],unselectBatch:[]},r={fill2d:!1,scatter2d:!1,error2d:!1,line2d:!1,glText:!1,select2d:!1};return E._scene||(e=E._scene={},e.init=function(){v.extendFlat(e,r,t)},e.init(),e.update=function(a){var n=v.repeat(a,e.count);if(e.fill2d&&e.fill2d.update(n),e.scatter2d&&e.scatter2d.update(n),e.line2d&&e.line2d.update(n),e.error2d&&e.error2d.update(n.concat(n)),e.select2d&&e.select2d.update(n),e.glText)for(var i=0;i=c,u=b*2,y={},f,R=A.makeCalcdata(_,"x"),L=M.makeCalcdata(_,"y"),z=e(_,A,"x",R),F=e(_,M,"y",L),N=z.vals,O=F.vals;_._x=N,_._y=O,_.xperiodalignment&&(_._origX=R,_._xStarts=z.starts,_._xEnds=z.ends),_.yperiodalignment&&(_._origY=L,_._yStarts=F.starts,_._yEnds=F.ends);var P=new Array(u),U=new Array(b);for(f=0;f1&&x.extendFlat(g.line,i.linePositions(T,_,w)),g.errorX||g.errorY){var b=i.errorBarPositions(T,_,w,A,M);g.errorX&&x.extendFlat(g.errorX,b.x),g.errorY&&x.extendFlat(g.errorY,b.y)}return g.text&&(x.extendFlat(g.text,{positions:w},i.textPosition(T,_,g.text,g.marker)),x.extendFlat(g.textSel,{positions:w},i.textPosition(T,_,g.text,g.markerSel)),x.extendFlat(g.textUnsel,{positions:w},i.textPosition(T,_,g.text,g.markerUnsel))),g}}}),qE=Xe({"src/traces/scattergl/edit_style.js"(Z,G){"use strict";var v=sa(),x=$n(),S=Ym().DESELECTDIM;function E(e){var t=e[0],r=t.trace,o=t.t,a=o._scene,n=o.index,i=a.selectBatch[n],s=a.unselectBatch[n],h=a.textOptions[n],c=a.textSelectedOptions[n]||{},m=a.textUnselectedOptions[n]||{},p=v.extendFlat({},h),T,l;if(i.length||s.length){var _=c.color,w=m.color,A=h.color,M=v.isArrayOrTypedArray(A);for(p.color=new Array(r._length),T=0;T>>24,r=(E&16711680)>>>16,o=(E&65280)>>>8,a=E&255;return e===!1?[t,r,o,a]:[t/255,r/255,o/255,a/255]}}}),ch=Xe({"node_modules/object-assign/index.js"(Z,G){"use strict";var v=Object.getOwnPropertySymbols,x=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable;function E(t){if(t==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}function e(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de",Object.getOwnPropertyNames(t)[0]==="5")return!1;for(var r={},o=0;o<10;o++)r["_"+String.fromCharCode(o)]=o;var a=Object.getOwnPropertyNames(r).map(function(i){return r[i]});if(a.join("")!=="0123456789")return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(i){n[i]=i}),Object.keys(Object.assign({},n)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}G.exports=e()?Object.assign:function(t,r){for(var o,a=E(t),n,i=1;iy.length)&&(f=y.length);for(var R=0,L=new Array(f);R 1.0 + delta) { discard; } alpha -= smoothstep(1.0 - delta, 1.0 + delta, radius); float borderRadius = fragBorderRadius; float ratio = smoothstep(borderRadius - delta, borderRadius + delta, radius); vec4 color = mix(fragColor, fragBorderColor, ratio); color.a *= alpha * opacity; gl_FragColor = color; } `]),le.vert=p([`precision highp float; #define GLSLIFY 1 attribute float x, y, xFract, yFract; attribute float size, borderSize; attribute vec4 colorId, borderColorId; attribute float isActive; // \`invariant\` effectively turns off optimizations for the position. // We need this because -fast-math on M1 Macs is re-ordering // floating point operations in a way that causes floating point // precision limits to put points in the wrong locations. invariant gl_Position; uniform bool constPointSize; uniform float pixelRatio; uniform vec2 paletteSize, scale, scaleFract, translate, translateFract; uniform sampler2D paletteTexture; const float maxSize = 100.; varying vec4 fragColor, fragBorderColor; varying float fragBorderRadius, fragWidth; float pointSizeScale = (constPointSize) ? 2. : pixelRatio; bool isDirect = (paletteSize.x < 1.); vec4 getColor(vec4 id) { return isDirect ? id / 255. : texture2D(paletteTexture, vec2( (id.x + .5) / paletteSize.x, (id.y + .5) / paletteSize.y ) ); } void main() { // ignore inactive points if (isActive == 0.) return; vec2 position = vec2(x, y); vec2 positionFract = vec2(xFract, yFract); vec4 color = getColor(colorId); vec4 borderColor = getColor(borderColorId); float size = size * maxSize / 255.; float borderSize = borderSize * maxSize / 255.; gl_PointSize = (size + borderSize) * pointSizeScale; vec2 pos = (position + translate) * scale + (positionFract + translateFract) * scale + (position + translate) * scaleFract + (positionFract + translateFract) * scaleFract; gl_Position = vec4(pos * 2. - 1., 0., 1.); fragBorderRadius = 1. - 2. * borderSize / (size + borderSize); fragColor = color; fragBorderColor = borderColor.a == 0. || borderSize == 0. ? vec4(color.rgb, 0.) : borderColor; fragWidth = 1. / gl_PointSize; } `]),w&&(le.frag=le.frag.replace("smoothstep","smoothStep"),se.frag=se.frag.replace("smoothstep","smoothStep")),this.drawCircle=y(le)}b.defaults={color:"black",borderColor:"transparent",borderSize:0,size:12,opacity:1,marker:void 0,viewport:null,range:null,pixelSize:null,count:0,offset:0,bounds:null,positions:[],snap:1e4},b.prototype.render=function(){return arguments.length&&this.update.apply(this,arguments),this.draw(),this},b.prototype.draw=function(){for(var y=this,f=arguments.length,R=new Array(f),L=0;Lye)?st.tree=c(rt,{bounds:Qe}):ye&&ye.length&&(st.tree=ye),st.tree){var Pt={primitive:"points",usage:"static",data:st.tree,type:"uint32"};st.elements?st.elements(Pt):st.elements=N.elements(Pt)}var It=A.float32(rt);he({data:It,usage:"dynamic"});var qt=A.fract32(rt,It);return Oe({data:qt,usage:"dynamic"}),tt({data:new Uint8Array(ot),type:"uint8",usage:"stream"}),rt}},{marker:function(rt,st,Me){var ye=st.activation;if(ye.forEach(function(qt){return qt&&qt.destroy&&qt.destroy()}),ye.length=0,!rt||typeof rt[0]=="number"){var he=y.addMarker(rt);ye[he]=!0}else{for(var Oe=[],tt=0,ot=Math.min(rt.length,st.count);tt=0)return z;var F;if(y instanceof Uint8Array||y instanceof Uint8ClampedArray)F=y;else{F=new Uint8Array(y.length);for(var N=0,O=y.length;NL*4&&(this.tooManyColors=!0),this.updatePalette(R),z.length===1?z[0]:z},b.prototype.updatePalette=function(y){if(!this.tooManyColors){var f=this.maxColors,R=this.paletteTexture,L=Math.ceil(y.length*.25/f);if(L>1){y=y.slice();for(var z=y.length*.25%f;z80*P){se=fe=N[0],le=V=N[1];for(var oe=P;oefe&&(fe=Y),ee>V&&(V=ee);q=Math.max(fe-se,V-le),q=q!==0?32767/q:0}return E(X,$,P,se,le,q,0),$}function x(N,O,P,U,B){var X,$;if(B===F(N,O,P,U)>0)for(X=O;X=O;X-=U)$=R(X,N[X],N[X+1],$);return $&&A($,$.next)&&(L($),$=$.next),$}function S(N,O){if(!N)return N;O||(O=N);var P=N,U;do if(U=!1,!P.steiner&&(A(P,P.next)||w(P.prev,P,P.next)===0)){if(L(P),P=O=P.prev,P===P.next)break;U=!0}else P=P.next;while(U||P!==O);return O}function E(N,O,P,U,B,X,$){if(N){!$&&X&&c(N,U,B,X);for(var se=N,le,fe;N.prev!==N.next;){if(le=N.prev,fe=N.next,X?t(N,U,B,X):e(N)){O.push(le.i/P|0),O.push(N.i/P|0),O.push(fe.i/P|0),L(N),N=fe.next,se=fe.next;continue}if(N=fe,N===se){$?$===1?(N=r(S(N),O,P),E(N,O,P,U,B,X,2)):$===2&&o(N,O,P,U,B,X):E(S(N),O,P,U,B,X,1);break}}}}function e(N){var O=N.prev,P=N,U=N.next;if(w(O,P,U)>=0)return!1;for(var B=O.x,X=P.x,$=U.x,se=O.y,le=P.y,fe=U.y,V=BX?B>$?B:$:X>$?X:$,q=se>le?se>fe?se:fe:le>fe?le:fe,oe=U.next;oe!==O;){if(oe.x>=V&&oe.x<=ee&&oe.y>=Y&&oe.y<=q&&l(B,se,X,le,$,fe,oe.x,oe.y)&&w(oe.prev,oe,oe.next)>=0)return!1;oe=oe.next}return!0}function t(N,O,P,U){var B=N.prev,X=N,$=N.next;if(w(B,X,$)>=0)return!1;for(var se=B.x,le=X.x,fe=$.x,V=B.y,Y=X.y,ee=$.y,q=sele?se>fe?se:fe:le>fe?le:fe,j=V>Y?V>ee?V:ee:Y>ee?Y:ee,Q=p(q,oe,O,P,U),re=p(ae,j,O,P,U),ce=N.prevZ,be=N.nextZ;ce&&ce.z>=Q&&be&&be.z<=re;){if(ce.x>=q&&ce.x<=ae&&ce.y>=oe&&ce.y<=j&&ce!==B&&ce!==$&&l(se,V,le,Y,fe,ee,ce.x,ce.y)&&w(ce.prev,ce,ce.next)>=0||(ce=ce.prevZ,be.x>=q&&be.x<=ae&&be.y>=oe&&be.y<=j&&be!==B&&be!==$&&l(se,V,le,Y,fe,ee,be.x,be.y)&&w(be.prev,be,be.next)>=0))return!1;be=be.nextZ}for(;ce&&ce.z>=Q;){if(ce.x>=q&&ce.x<=ae&&ce.y>=oe&&ce.y<=j&&ce!==B&&ce!==$&&l(se,V,le,Y,fe,ee,ce.x,ce.y)&&w(ce.prev,ce,ce.next)>=0)return!1;ce=ce.prevZ}for(;be&&be.z<=re;){if(be.x>=q&&be.x<=ae&&be.y>=oe&&be.y<=j&&be!==B&&be!==$&&l(se,V,le,Y,fe,ee,be.x,be.y)&&w(be.prev,be,be.next)>=0)return!1;be=be.nextZ}return!0}function r(N,O,P){var U=N;do{var B=U.prev,X=U.next.next;!A(B,X)&&M(B,U,U.next,X)&&u(B,X)&&u(X,B)&&(O.push(B.i/P|0),O.push(U.i/P|0),O.push(X.i/P|0),L(U),L(U.next),U=N=X),U=U.next}while(U!==N);return S(U)}function o(N,O,P,U,B,X){var $=N;do{for(var se=$.next.next;se!==$.prev;){if($.i!==se.i&&_($,se)){var le=f($,se);$=S($,$.next),le=S(le,le.next),E($,O,P,U,B,X,0),E(le,O,P,U,B,X,0);return}se=se.next}$=$.next}while($!==N)}function a(N,O,P,U){var B=[],X,$,se,le,fe;for(X=0,$=O.length;X<$;X++)se=O[X]*U,le=X<$-1?O[X+1]*U:N.length,fe=x(N,se,le,U,!1),fe===fe.next&&(fe.steiner=!0),B.push(T(fe));for(B.sort(n),X=0;X=P.next.y&&P.next.y!==P.y){var se=P.x+(B-P.y)*(P.next.x-P.x)/(P.next.y-P.y);if(se<=U&&se>X&&(X=se,$=P.x=P.x&&P.x>=fe&&U!==P.x&&l(B$.x||P.x===$.x&&h($,P)))&&($=P,Y=ee)),P=P.next;while(P!==le);return $}function h(N,O){return w(N.prev,N,O.prev)<0&&w(O.next,N,N.next)<0}function c(N,O,P,U){var B=N;do B.z===0&&(B.z=p(B.x,B.y,O,P,U)),B.prevZ=B.prev,B.nextZ=B.next,B=B.next;while(B!==N);B.prevZ.nextZ=null,B.prevZ=null,m(B)}function m(N){var O,P,U,B,X,$,se,le,fe=1;do{for(P=N,N=null,X=null,$=0;P;){for($++,U=P,se=0,O=0;O0||le>0&&U;)se!==0&&(le===0||!U||P.z<=U.z)?(B=P,P=P.nextZ,se--):(B=U,U=U.nextZ,le--),X?X.nextZ=B:N=B,B.prevZ=X,X=B;P=U}X.nextZ=null,fe*=2}while($>1);return N}function p(N,O,P,U,B){return N=(N-P)*B|0,O=(O-U)*B|0,N=(N|N<<8)&16711935,N=(N|N<<4)&252645135,N=(N|N<<2)&858993459,N=(N|N<<1)&1431655765,O=(O|O<<8)&16711935,O=(O|O<<4)&252645135,O=(O|O<<2)&858993459,O=(O|O<<1)&1431655765,N|O<<1}function T(N){var O=N,P=N;do(O.x=(N-$)*(X-se)&&(N-$)*(U-se)>=(P-$)*(O-se)&&(P-$)*(X-se)>=(B-$)*(U-se)}function _(N,O){return N.next.i!==O.i&&N.prev.i!==O.i&&!d(N,O)&&(u(N,O)&&u(O,N)&&y(N,O)&&(w(N.prev,N,O.prev)||w(N,O.prev,O))||A(N,O)&&w(N.prev,N,N.next)>0&&w(O.prev,O,O.next)>0)}function w(N,O,P){return(O.y-N.y)*(P.x-O.x)-(O.x-N.x)*(P.y-O.y)}function A(N,O){return N.x===O.x&&N.y===O.y}function M(N,O,P,U){var B=b(w(N,O,P)),X=b(w(N,O,U)),$=b(w(P,U,N)),se=b(w(P,U,O));return!!(B!==X&&$!==se||B===0&&g(N,P,O)||X===0&&g(N,U,O)||$===0&&g(P,N,U)||se===0&&g(P,O,U))}function g(N,O,P){return O.x<=Math.max(N.x,P.x)&&O.x>=Math.min(N.x,P.x)&&O.y<=Math.max(N.y,P.y)&&O.y>=Math.min(N.y,P.y)}function b(N){return N>0?1:N<0?-1:0}function d(N,O){var P=N;do{if(P.i!==N.i&&P.next.i!==N.i&&P.i!==O.i&&P.next.i!==O.i&&M(P,P.next,N,O))return!0;P=P.next}while(P!==N);return!1}function u(N,O){return w(N.prev,N,N.next)<0?w(N,O,N.next)>=0&&w(N,N.prev,O)>=0:w(N,O,N.prev)<0||w(N,N.next,O)<0}function y(N,O){var P=N,U=!1,B=(N.x+O.x)/2,X=(N.y+O.y)/2;do P.y>X!=P.next.y>X&&P.next.y!==P.y&&B<(P.next.x-P.x)*(X-P.y)/(P.next.y-P.y)+P.x&&(U=!U),P=P.next;while(P!==N);return U}function f(N,O){var P=new z(N.i,N.x,N.y),U=new z(O.i,O.x,O.y),B=N.next,X=O.prev;return N.next=O,O.prev=N,P.next=B,B.prev=P,U.next=P,P.prev=U,X.next=U,U.prev=X,U}function R(N,O,P,U){var B=new z(N,O,P);return U?(B.next=U.next,B.prev=U,U.next.prev=B,U.next=B):(B.prev=B,B.next=B),B}function L(N){N.next.prev=N.prev,N.prev.next=N.next,N.prevZ&&(N.prevZ.nextZ=N.nextZ),N.nextZ&&(N.nextZ.prevZ=N.prevZ)}function z(N,O,P){this.i=N,this.x=O,this.y=P,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}v.deviation=function(N,O,P,U){var B=O&&O.length,X=B?O[0]*P:N.length,$=Math.abs(F(N,0,X,P));if(B)for(var se=0,le=O.length;se0&&(U+=N[B-1].length,P.holes.push(U))}return P}}}),vj=Xe({"node_modules/array-normalize/index.js"(Z,G){"use strict";var v=mg();G.exports=x;function x(S,E,e){if(!S||S.length==null)throw Error("Argument should be an array");E==null&&(E=1),e==null&&(e=v(S,E));for(var t=0;t-1}}}),JE=Xe({"node_modules/es5-ext/string/#/contains/index.js"(Z,G){"use strict";G.exports=kj()()?String.prototype.contains:Cj()}}),am=Xe({"node_modules/d/index.js"(Z,G){"use strict";var v=_g(),x=YE(),S=_T(),E=KE(),e=JE(),t=G.exports=function(r,o){var a,n,i,s,h;return arguments.length<2||typeof r!="string"?(s=o,o=r,r=null):s=arguments[2],v(r)?(a=e.call(r,"c"),n=e.call(r,"e"),i=e.call(r,"w")):(a=i=!0,n=!1),h={value:o,configurable:a,enumerable:n,writable:i},s?S(E(s),h):h};t.gs=function(r,o,a){var n,i,s,h;return typeof r!="string"?(s=a,a=o,o=r,r=null):s=arguments[3],v(o)?x(o)?v(a)?x(a)||(s=a,a=void 0):a=void 0:(s=o,o=a=void 0):o=void 0,v(r)?(n=e.call(r,"c"),i=e.call(r,"e")):(n=!0,i=!1),h={get:o,set:a,configurable:n,enumerable:i},s?S(E(s),h):h}}}),bx=Xe({"node_modules/es5-ext/function/is-arguments.js"(Z,G){"use strict";var v=Object.prototype.toString,x=v.call(function(){return arguments}());G.exports=function(S){return v.call(S)===x}}}),wx=Xe({"node_modules/es5-ext/string/is-string.js"(Z,G){"use strict";var v=Object.prototype.toString,x=v.call("");G.exports=function(S){return typeof S=="string"||S&&typeof S=="object"&&(S instanceof String||v.call(S)===x)||!1}}}),Lj=Xe({"node_modules/ext/global-this/is-implemented.js"(Z,G){"use strict";G.exports=function(){return typeof globalThis!="object"||!globalThis?!1:globalThis.Array===Array}}}),Pj=Xe({"node_modules/ext/global-this/implementation.js"(Z,G){var v=function(){if(typeof self=="object"&&self)return self;if(typeof window=="object"&&window)return window;throw new Error("Unable to resolve global `this`")};G.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch{return v()}try{return __global__||v()}finally{delete Object.prototype.__global__}}()}}),Tx=Xe({"node_modules/ext/global-this/index.js"(Z,G){"use strict";G.exports=Lj()()?globalThis:Pj()}}),Ij=Xe({"node_modules/es6-symbol/is-implemented.js"(Z,G){"use strict";var v=Tx(),x={object:!0,symbol:!0};G.exports=function(){var S=v.Symbol,E;if(typeof S!="function")return!1;E=S("test symbol");try{String(E)}catch{return!1}return!(!x[typeof S.iterator]||!x[typeof S.toPrimitive]||!x[typeof S.toStringTag])}}}),Rj=Xe({"node_modules/es6-symbol/is-symbol.js"(Z,G){"use strict";G.exports=function(v){return v?typeof v=="symbol"?!0:!v.constructor||v.constructor.name!=="Symbol"?!1:v[v.constructor.toStringTag]==="Symbol":!1}}}),$E=Xe({"node_modules/es6-symbol/validate-symbol.js"(Z,G){"use strict";var v=Rj();G.exports=function(x){if(!v(x))throw new TypeError(x+" is not a symbol");return x}}}),Dj=Xe({"node_modules/es6-symbol/lib/private/generate-name.js"(Z,G){"use strict";var v=am(),x=Object.create,S=Object.defineProperty,E=Object.prototype,e=x(null);G.exports=function(t){for(var r=0,o,a;e[t+(r||"")];)++r;return t+=r||"",e[t]=!0,o="@@"+t,S(E,o,v.gs(null,function(n){a||(a=!0,S(this,o,v(n)),a=!1)})),o}}}),zj=Xe({"node_modules/es6-symbol/lib/private/setup/standard-symbols.js"(Z,G){"use strict";var v=am(),x=Tx().Symbol;G.exports=function(S){return Object.defineProperties(S,{hasInstance:v("",x&&x.hasInstance||S("hasInstance")),isConcatSpreadable:v("",x&&x.isConcatSpreadable||S("isConcatSpreadable")),iterator:v("",x&&x.iterator||S("iterator")),match:v("",x&&x.match||S("match")),replace:v("",x&&x.replace||S("replace")),search:v("",x&&x.search||S("search")),species:v("",x&&x.species||S("species")),split:v("",x&&x.split||S("split")),toPrimitive:v("",x&&x.toPrimitive||S("toPrimitive")),toStringTag:v("",x&&x.toStringTag||S("toStringTag")),unscopables:v("",x&&x.unscopables||S("unscopables"))})}}}),Fj=Xe({"node_modules/es6-symbol/lib/private/setup/symbol-registry.js"(Z,G){"use strict";var v=am(),x=$E(),S=Object.create(null);G.exports=function(E){return Object.defineProperties(E,{for:v(function(e){return S[e]?S[e]:S[e]=E(String(e))}),keyFor:v(function(e){var t;x(e);for(t in S)if(S[t]===e)return t})})}}}),Oj=Xe({"node_modules/es6-symbol/polyfill.js"(Z,G){"use strict";var v=am(),x=$E(),S=Tx().Symbol,E=Dj(),e=zj(),t=Fj(),r=Object.create,o=Object.defineProperties,a=Object.defineProperty,n,i,s;if(typeof S=="function")try{String(S()),s=!0}catch{}else S=null;i=function(c){if(this instanceof i)throw new TypeError("Symbol is not a constructor");return n(c)},G.exports=n=function h(c){var m;if(this instanceof h)throw new TypeError("Symbol is not a constructor");return s?S(c):(m=r(i.prototype),c=c===void 0?"":String(c),o(m,{__description__:v("",c),__name__:v("",E(c))}))},e(n),t(n),o(i.prototype,{constructor:v(n),toString:v("",function(){return this.__name__})}),o(n.prototype,{toString:v(function(){return"Symbol ("+x(this).__description__+")"}),valueOf:v(function(){return x(this)})}),a(n.prototype,n.toPrimitive,v("",function(){var h=x(this);return typeof h=="symbol"?h:h.toString()})),a(n.prototype,n.toStringTag,v("c","Symbol")),a(i.prototype,n.toStringTag,v("c",n.prototype[n.toStringTag])),a(i.prototype,n.toPrimitive,v("c",n.prototype[n.toPrimitive]))}}),x0=Xe({"node_modules/es6-symbol/index.js"(Z,G){"use strict";G.exports=Ij()()?Tx().Symbol:Oj()}}),Bj=Xe({"node_modules/es5-ext/array/#/clear.js"(Z,G){"use strict";var v=rm();G.exports=function(){return v(this).length=0,this}}}),L1=Xe({"node_modules/es5-ext/object/valid-callable.js"(Z,G){"use strict";G.exports=function(v){if(typeof v!="function")throw new TypeError(v+" is not a function");return v}}}),Nj=Xe({"node_modules/type/string/coerce.js"(Z,G){"use strict";var v=_g(),x=yT(),S=Object.prototype.toString;G.exports=function(E){if(!v(E))return null;if(x(E)){var e=E.toString;if(typeof e!="function"||e===S)return null}try{return""+E}catch{return null}}}}),Uj=Xe({"node_modules/type/lib/safe-to-string.js"(Z,G){"use strict";G.exports=function(v){try{return v.toString()}catch{try{return String(v)}catch{return null}}}}}),jj=Xe({"node_modules/type/lib/to-short-string.js"(Z,G){"use strict";var v=Uj(),x=/[\n\r\u2028\u2029]/g;G.exports=function(S){var E=v(S);return E===null?"":(E.length>100&&(E=E.slice(0,99)+"\u2026"),E=E.replace(x,function(e){switch(e){case` `:return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}}),E)}}}),QE=Xe({"node_modules/type/lib/resolve-exception.js"(Z,G){"use strict";var v=_g(),x=yT(),S=Nj(),E=jj(),e=function(t,r){return t.replace("%v",E(r))};G.exports=function(t,r,o){if(!x(o))throw new TypeError(e(r,t));if(!v(t)){if("default"in o)return o.default;if(o.isOptional)return null}var a=S(o.errorMessage);throw v(a)||(a=r),new TypeError(e(a,t))}}}),qj=Xe({"node_modules/type/value/ensure.js"(Z,G){"use strict";var v=QE(),x=_g();G.exports=function(S){return x(S)?S:v(S,"Cannot use %v",arguments[1])}}}),Vj=Xe({"node_modules/type/plain-function/ensure.js"(Z,G){"use strict";var v=QE(),x=YE();G.exports=function(S){return x(S)?S:v(S,"%v is not a plain function",arguments[1])}}}),Gj=Xe({"node_modules/es5-ext/array/from/is-implemented.js"(Z,G){"use strict";G.exports=function(){var v=Array.from,x,S;return typeof v!="function"?!1:(x=["raz","dwa"],S=v(x),!!(S&&S!==x&&S[1]==="dwa"))}}}),Hj=Xe({"node_modules/es5-ext/function/is-function.js"(Z,G){"use strict";var v=Object.prototype.toString,x=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);G.exports=function(S){return typeof S=="function"&&x(v.call(S))}}}),Wj=Xe({"node_modules/es5-ext/math/sign/is-implemented.js"(Z,G){"use strict";G.exports=function(){var v=Math.sign;return typeof v!="function"?!1:v(10)===1&&v(-20)===-1}}}),Xj=Xe({"node_modules/es5-ext/math/sign/shim.js"(Z,G){"use strict";G.exports=function(v){return v=Number(v),isNaN(v)||v===0?v:v>0?1:-1}}}),Zj=Xe({"node_modules/es5-ext/math/sign/index.js"(Z,G){"use strict";G.exports=Wj()()?Math.sign:Xj()}}),Yj=Xe({"node_modules/es5-ext/number/to-integer.js"(Z,G){"use strict";var v=Zj(),x=Math.abs,S=Math.floor;G.exports=function(E){return isNaN(E)?0:(E=Number(E),E===0||!isFinite(E)?E:v(E)*S(x(E)))}}}),Kj=Xe({"node_modules/es5-ext/number/to-pos-integer.js"(Z,G){"use strict";var v=Yj(),x=Math.max;G.exports=function(S){return x(0,v(S))}}}),Jj=Xe({"node_modules/es5-ext/array/from/shim.js"(Z,G){"use strict";var v=x0().iterator,x=bx(),S=Hj(),E=Kj(),e=L1(),t=rm(),r=_0(),o=wx(),a=Array.isArray,n=Function.prototype.call,i={configurable:!0,enumerable:!0,writable:!0,value:null},s=Object.defineProperty;G.exports=function(h){var c=arguments[1],m=arguments[2],p,T,l,_,w,A,M,g,b,d;if(h=Object(t(h)),r(c)&&e(c),!this||this===Array||!S(this)){if(!c){if(x(h))return w=h.length,w!==1?Array.apply(null,h):(_=new Array(1),_[0]=h[0],_);if(a(h)){for(_=new Array(w=h.length),T=0;T=55296&&A<=56319&&(d+=h[++T])),d=c?n.call(c,m,d,l):d,p?(i.value=d,s(_,l,i)):_[l]=d,++l;w=l}}if(w===void 0)for(w=E(h.length),p&&(_=new p(w)),T=0;T=this.__nextIndex__)){if(++this.__nextIndex__,!this.__redo__){o(this,"__redo__",e("c",[i]));return}this.__redo__.forEach(function(s,h){s>=i&&(this.__redo__[h]=++s)},this),this.__redo__.push(i)}}),_onDelete:e(function(i){var s;i>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(s=this.__redo__.indexOf(i),s!==-1&&this.__redo__.splice(s,1),this.__redo__.forEach(function(h,c){h>i&&(this.__redo__[c]=--h)},this)))}),_onClear:e(function(){this.__redo__&&v.call(this.__redo__),this.__nextIndex__=0})}))),o(n.prototype,r.iterator,e(function(){return this}))}}),iq=Xe({"node_modules/es6-iterator/array.js"(Z,G){"use strict";var v=gT(),x=JE(),S=am(),E=x0(),e=e6(),t=Object.defineProperty,r;r=G.exports=function(o,a){if(!(this instanceof r))throw new TypeError("Constructor requires 'new'");e.call(this,o),a?x.call(a,"key+value")?a="key+value":x.call(a,"key")?a="key":a="value":a="value",t(this,"__kind__",S("",a))},v&&v(r,e),delete r.prototype.constructor,r.prototype=Object.create(e.prototype,{_resolve:S(function(o){return this.__kind__==="value"?this.__list__[o]:this.__kind__==="key+value"?[o,this.__list__[o]]:o})}),t(r.prototype,E.toStringTag,S("c","Array Iterator"))}}),nq=Xe({"node_modules/es6-iterator/string.js"(Z,G){"use strict";var v=gT(),x=am(),S=x0(),E=e6(),e=Object.defineProperty,t;t=G.exports=function(r){if(!(this instanceof t))throw new TypeError("Constructor requires 'new'");r=String(r),E.call(this,r),e(this,"__length__",x("",r.length))},v&&v(t,E),delete t.prototype.constructor,t.prototype=Object.create(E.prototype,{_next:x(function(){if(this.__list__){if(this.__nextIndex__=55296&&a<=56319?o+this.__list__[this.__nextIndex__++]:o)})}),e(t.prototype,S.toStringTag,x("c","String Iterator"))}}),oq=Xe({"node_modules/es6-iterator/is-iterable.js"(Z,G){"use strict";var v=bx(),x=_0(),S=wx(),E=x0().iterator,e=Array.isArray;G.exports=function(t){return x(t)?e(t)||S(t)||v(t)?!0:typeof t[E]=="function":!1}}}),sq=Xe({"node_modules/es6-iterator/valid-iterable.js"(Z,G){"use strict";var v=oq();G.exports=function(x){if(!v(x))throw new TypeError(x+" is not iterable");return x}}}),t6=Xe({"node_modules/es6-iterator/get.js"(Z,G){"use strict";var v=bx(),x=wx(),S=iq(),E=nq(),e=sq(),t=x0().iterator;G.exports=function(r){return typeof e(r)[t]=="function"?r[t]():v(r)?new S(r):x(r)?new E(r):new S(r)}}}),lq=Xe({"node_modules/es6-iterator/for-of.js"(Z,G){"use strict";var v=bx(),x=L1(),S=wx(),E=t6(),e=Array.isArray,t=Function.prototype.call,r=Array.prototype.some;G.exports=function(o,a){var n,i=arguments[2],s,h,c,m,p,T,l;if(e(o)||v(o)?n="array":S(o)?n="string":o=E(o),x(a),h=function(){c=!0},n==="array"){r.call(o,function(_){return t.call(a,i,_,h),c});return}if(n==="string"){for(p=o.length,m=0;m=55296&&l<=56319&&(T+=o[++m])),t.call(a,i,T,h),!c);++m);return}for(s=o.next();!s.done;){if(t.call(a,i,s.value,h),c)return;s=o.next()}}}}),uq=Xe({"node_modules/es6-weak-map/is-native-implemented.js"(Z,G){"use strict";G.exports=function(){return typeof WeakMap!="function"?!1:Object.prototype.toString.call(new WeakMap)==="[object WeakMap]"}()}}),cq=Xe({"node_modules/es6-weak-map/polyfill.js"(Z,G){"use strict";var v=_0(),x=gT(),S=_j(),E=rm(),e=xj(),t=am(),r=t6(),o=lq(),a=x0().toStringTag,n=uq(),i=Array.isArray,s=Object.defineProperty,h=Object.prototype.hasOwnProperty,c=Object.getPrototypeOf,m;G.exports=m=function(){var p=arguments[0],T;if(!(this instanceof m))throw new TypeError("Constructor requires 'new'");return T=n&&x&&WeakMap!==m?x(new WeakMap,c(this)):this,v(p)&&(i(p)||(p=r(p))),s(T,"__weakMapData__",t("c","$weakMap$"+e())),p&&o(p,function(l){E(l),T.set(l[0],l[1])}),T},n&&(x&&x(m,WeakMap),m.prototype=Object.create(WeakMap.prototype,{constructor:t(m)})),Object.defineProperties(m.prototype,{delete:t(function(p){return h.call(S(p),this.__weakMapData__)?(delete p[this.__weakMapData__],!0):!1}),get:t(function(p){if(h.call(S(p),this.__weakMapData__))return p[this.__weakMapData__]}),has:t(function(p){return h.call(S(p),this.__weakMapData__)}),set:t(function(p,T){return s(S(p),this.__weakMapData__,t("c",T)),this}),toString:t(function(){return"[object WeakMap]"})}),s(m.prototype,a,t("c","WeakMap"))}}),r6=Xe({"node_modules/es6-weak-map/index.js"(Z,G){"use strict";G.exports=mj()()?WeakMap:cq()}}),fq=Xe({"node_modules/array-find-index/index.js"(Z,G){"use strict";G.exports=function(v,x,S){if(typeof Array.prototype.findIndex=="function")return v.findIndex(x,S);if(typeof x!="function")throw new TypeError("predicate must be a function");var E=Object(v),e=E.length;if(e===0)return-1;for(var t=0;t 0. && baClipping < length(normalWidth * endBotJoin)) { //handle miter clipping bTopCoord -= normalWidth * endTopJoin; bTopCoord += normalize(endTopJoin * normalWidth) * baClipping; } if (nextReverse) { //make join rectangular vec2 miterShift = normalWidth * endJoinDirection * miterLimit * .5; float normalAdjust = 1. - min(miterLimit / endMiterRatio, 1.); bBotCoord = bCoord + miterShift - normalAdjust * normalWidth * currNormal * .5; bTopCoord = bCoord + miterShift + normalAdjust * normalWidth * currNormal * .5; } else if (!prevReverse && abClipping > 0. && abClipping < length(normalWidth * startBotJoin)) { //handle miter clipping aBotCoord -= normalWidth * startBotJoin; aBotCoord += normalize(startBotJoin * normalWidth) * abClipping; } vec2 aTopPosition = (aTopCoord) * adjustedScale + translate; vec2 aBotPosition = (aBotCoord) * adjustedScale + translate; vec2 bTopPosition = (bTopCoord) * adjustedScale + translate; vec2 bBotPosition = (bBotCoord) * adjustedScale + translate; //position is normalized 0..1 coord on the screen vec2 position = (aTopPosition * lineTop + aBotPosition * lineBot) * lineStart + (bTopPosition * lineTop + bBotPosition * lineBot) * lineEnd; startCoord = aCoord * scaleRatio + translate * viewport.zw + viewport.xy; endCoord = bCoord * scaleRatio + translate * viewport.zw + viewport.xy; gl_Position = vec4(position * 2.0 - 1.0, depth, 1); enableStartMiter = step(dot(currTangent, prevTangent), .5); enableEndMiter = step(dot(currTangent, nextTangent), .5); //bevel miter cutoffs if (miterMode == 1.) { if (enableStartMiter == 1.) { vec2 startMiterWidth = vec2(startJoinDirection) * thickness * miterLimit * .5; startCutoff = vec4(aCoord, aCoord); startCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio; startCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw; startCutoff += viewport.xyxy; startCutoff += startMiterWidth.xyxy; } if (enableEndMiter == 1.) { vec2 endMiterWidth = vec2(endJoinDirection) * thickness * miterLimit * .5; endCutoff = vec4(bCoord, bCoord); endCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x) / scaleRatio; endCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw; endCutoff += viewport.xyxy; endCutoff += endMiterWidth.xyxy; } } //round miter cutoffs else if (miterMode == 2.) { if (enableStartMiter == 1.) { vec2 startMiterWidth = vec2(startJoinDirection) * thickness * abs(dot(startJoinDirection, currNormal)) * .5; startCutoff = vec4(aCoord, aCoord); startCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio; startCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw; startCutoff += viewport.xyxy; startCutoff += startMiterWidth.xyxy; } if (enableEndMiter == 1.) { vec2 endMiterWidth = vec2(endJoinDirection) * thickness * abs(dot(endJoinDirection, currNormal)) * .5; endCutoff = vec4(bCoord, bCoord); endCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x) / scaleRatio; endCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw; endCutoff += viewport.xyxy; endCutoff += endMiterWidth.xyxy; } } } `,l=` precision highp float; uniform float dashLength, pixelRatio, thickness, opacity, id, miterMode; uniform sampler2D dashTexture; varying vec4 fragColor; varying vec2 tangent; varying vec4 startCutoff, endCutoff; varying vec2 startCoord, endCoord; varying float enableStartMiter, enableEndMiter; float distToLine(vec2 p, vec2 a, vec2 b) { vec2 diff = b - a; vec2 perp = normalize(vec2(-diff.y, diff.x)); return dot(p - a, perp); } void main() { float alpha = 1., distToStart, distToEnd; float cutoff = thickness * .5; //bevel miter if (miterMode == 1.) { if (enableStartMiter == 1.) { distToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw); if (distToStart < -1.) { discard; return; } alpha *= min(max(distToStart + 1., 0.), 1.); } if (enableEndMiter == 1.) { distToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw); if (distToEnd < -1.) { discard; return; } alpha *= min(max(distToEnd + 1., 0.), 1.); } } // round miter else if (miterMode == 2.) { if (enableStartMiter == 1.) { distToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw); if (distToStart < 0.) { float radius = length(gl_FragCoord.xy - startCoord); if(radius > cutoff + .5) { discard; return; } alpha -= smoothstep(cutoff - .5, cutoff + .5, radius); } } if (enableEndMiter == 1.) { distToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw); if (distToEnd < 0.) { float radius = length(gl_FragCoord.xy - endCoord); if(radius > cutoff + .5) { discard; return; } alpha -= smoothstep(cutoff - .5, cutoff + .5, radius); } } } float t = fract(dot(tangent, gl_FragCoord.xy) / dashLength) * .5 + .25; float dash = texture2D(dashTexture, vec2(t, .5)).r; gl_FragColor = fragColor; gl_FragColor.a *= alpha * opacity * dash; } `;G.exports=_;function _(w,A){if(!(this instanceof _))return new _(w,A);if(typeof w=="function"?(A||(A={}),A.regl=w):A=w,A.length&&(A.positions=A),w=A.regl,!w.hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");this.gl=w._gl,this.regl=w,this.passes=[],this.shaders=_.shaders.has(w)?_.shaders.get(w):_.shaders.set(w,_.createShaders(w)).get(w),this.update(A)}_.dashMult=2,_.maxPatternLength=256,_.precisionThreshold=3e6,_.maxPoints=1e4,_.maxLines=2048,_.shaders=new n,_.createShaders=function(w){let A=w.buffer({usage:"static",type:"float",data:[0,1,0,0,1,1,1,0]}),M={primitive:"triangle strip",instances:w.prop("count"),count:4,offset:0,uniforms:{miterMode:(u,y)=>y.join==="round"?2:1,miterLimit:w.prop("miterLimit"),scale:w.prop("scale"),scaleFract:w.prop("scaleFract"),translateFract:w.prop("translateFract"),translate:w.prop("translate"),thickness:w.prop("thickness"),dashTexture:w.prop("dashTexture"),opacity:w.prop("opacity"),pixelRatio:w.context("pixelRatio"),id:w.prop("id"),dashLength:w.prop("dashLength"),viewport:(u,y)=>[y.viewport.x,y.viewport.y,u.viewportWidth,u.viewportHeight],depth:w.prop("depth")},blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:(u,y)=>!y.overlay},stencil:{enable:!1},scissor:{enable:!0,box:w.prop("viewport")},viewport:w.prop("viewport")},g=w(S({vert:h,frag:c,attributes:{lineEnd:{buffer:A,divisor:0,stride:8,offset:0},lineTop:{buffer:A,divisor:0,stride:8,offset:4},aCoord:{buffer:w.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:w.prop("positionBuffer"),stride:8,offset:16,divisor:1},aCoordFract:{buffer:w.prop("positionFractBuffer"),stride:8,offset:8,divisor:1},bCoordFract:{buffer:w.prop("positionFractBuffer"),stride:8,offset:16,divisor:1},color:{buffer:w.prop("colorBuffer"),stride:4,offset:0,divisor:1}}},M)),b;try{b=w(S({cull:{enable:!0,face:"back"},vert:T,frag:l,attributes:{lineEnd:{buffer:A,divisor:0,stride:8,offset:0},lineTop:{buffer:A,divisor:0,stride:8,offset:4},aColor:{buffer:w.prop("colorBuffer"),stride:4,offset:0,divisor:1},bColor:{buffer:w.prop("colorBuffer"),stride:4,offset:4,divisor:1},prevCoord:{buffer:w.prop("positionBuffer"),stride:8,offset:0,divisor:1},aCoord:{buffer:w.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:w.prop("positionBuffer"),stride:8,offset:16,divisor:1},nextCoord:{buffer:w.prop("positionBuffer"),stride:8,offset:24,divisor:1}}},M))}catch{b=g}return{fill:w({primitive:"triangle",elements:(u,y)=>y.triangles,offset:0,vert:m,frag:p,uniforms:{scale:w.prop("scale"),color:w.prop("fill"),scaleFract:w.prop("scaleFract"),translateFract:w.prop("translateFract"),translate:w.prop("translate"),opacity:w.prop("opacity"),pixelRatio:w.context("pixelRatio"),id:w.prop("id"),viewport:(u,y)=>[y.viewport.x,y.viewport.y,u.viewportWidth,u.viewportHeight]},attributes:{position:{buffer:w.prop("positionBuffer"),stride:8,offset:8},positionFract:{buffer:w.prop("positionFractBuffer"),stride:8,offset:8}},blend:M.blend,depth:{enable:!1},scissor:M.scissor,stencil:M.stencil,viewport:M.viewport}),rect:g,miter:b}},_.defaults={dashes:null,join:"miter",miterLimit:1,thickness:10,cap:"square",color:"black",opacity:1,overlay:!1,viewport:null,range:null,close:!1,fill:null},_.prototype.render=function(...w){w.length&&this.update(...w),this.draw()},_.prototype.draw=function(...w){return(w.length?w:this.passes).forEach((A,M)=>{if(A&&Array.isArray(A))return this.draw(...A);typeof A=="number"&&(A=this.passes[A]),A&&A.count>1&&A.opacity&&(this.regl._refresh(),A.fill&&A.triangles&&A.triangles.length>2&&this.shaders.fill(A),A.thickness&&(A.scale[0]*A.viewport.width>_.precisionThreshold||A.scale[1]*A.viewport.height>_.precisionThreshold?this.shaders.rect(A):A.join==="rect"||!A.join&&(A.thickness<=2||A.count>=_.maxPoints)?this.shaders.rect(A):this.shaders.miter(A)))}),this},_.prototype.update=function(w){if(!w)return;w.length!=null?typeof w[0]=="number"&&(w=[{positions:w}]):Array.isArray(w)||(w=[w]);let{regl:A,gl:M}=this;if(w.forEach((b,d)=>{let u=this.passes[d];if(b!==void 0){if(b===null){this.passes[d]=null;return}if(typeof b[0]=="number"&&(b={positions:b}),b=E(b,{positions:"positions points data coords",thickness:"thickness lineWidth lineWidths line-width linewidth width stroke-width strokewidth strokeWidth",join:"lineJoin linejoin join type mode",miterLimit:"miterlimit miterLimit",dashes:"dash dashes dasharray dash-array dashArray",color:"color colour stroke colors colours stroke-color strokeColor",fill:"fill fill-color fillColor",opacity:"alpha opacity",overlay:"overlay crease overlap intersect",close:"closed close closed-path closePath",range:"range dataBox",viewport:"viewport viewBox",hole:"holes hole hollow",splitNull:"splitNull"}),u||(this.passes[d]=u={id:d,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:A.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:"linear",min:"linear"}),colorBuffer:A.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array}),positionBuffer:A.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),positionFractBuffer:A.buffer({usage:"dynamic",type:"float",data:new Uint8Array})},b=S({},_.defaults,b)),b.thickness!=null&&(u.thickness=parseFloat(b.thickness)),b.opacity!=null&&(u.opacity=parseFloat(b.opacity)),b.miterLimit!=null&&(u.miterLimit=parseFloat(b.miterLimit)),b.overlay!=null&&(u.overlay=!!b.overlay,d<_.maxLines&&(u.depth=2*(_.maxLines-1-d%_.maxLines)/_.maxLines-1)),b.join!=null&&(u.join=b.join),b.hole!=null&&(u.hole=b.hole),b.fill!=null&&(u.fill=b.fill?v(b.fill,"uint8"):null),b.viewport!=null&&(u.viewport=i(b.viewport)),u.viewport||(u.viewport=i([M.drawingBufferWidth,M.drawingBufferHeight])),b.close!=null&&(u.close=b.close),b.positions===null&&(b.positions=[]),b.positions){let R,L;if(b.positions.x&&b.positions.y){let O=b.positions.x,P=b.positions.y;L=u.count=Math.max(O.length,P.length),R=new Float64Array(L*2);for(let U=0;Ule-fe),X=[],$=0,se=u.hole!=null?u.hole[0]:null;if(se!=null){let le=s(B,fe=>fe>=se);B=B.slice(0,le),B.push(se)}for(let le=0;leee-se+(B[le]-$)),Y=t(fe,V);Y=Y.map(ee=>ee+$+(ee+${w.colorBuffer.destroy(),w.positionBuffer.destroy(),w.dashTexture.destroy()}),this.passes.length=0,this}}}),hq=Xe({"node_modules/regl-error2d/index.js"(Z,G){"use strict";var v=mg(),x=d0(),S=GE(),E=Ev(),e=ch(),t=gg(),{float32:r,fract32:o}=mT();G.exports=n;var a=[[1,0,0,1,0,0],[1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,1,0,0],[1,0,0,1,0,0],[1,0,-1,0,0,1],[1,0,-1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,1],[1,0,-1,0,0,1],[-1,0,-1,0,0,1],[-1,0,-1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,1],[-1,0,-1,0,0,1],[0,1,1,0,0,0],[0,1,-1,0,0,0],[0,-1,-1,0,0,0],[0,-1,-1,0,0,0],[0,1,1,0,0,0],[0,-1,1,0,0,0],[0,1,0,-1,1,0],[0,1,0,-1,-1,0],[0,1,0,1,-1,0],[0,1,0,1,1,0],[0,1,0,-1,1,0],[0,1,0,1,-1,0],[0,-1,0,-1,1,0],[0,-1,0,-1,-1,0],[0,-1,0,1,-1,0],[0,-1,0,1,1,0],[0,-1,0,-1,1,0],[0,-1,0,1,-1,0]];function n(i,s){if(typeof i=="function"?(s||(s={}),s.regl=i):s=i,s.length&&(s.positions=s),i=s.regl,!i.hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");let h=i._gl,c,m,p,T,l,_,w={color:"black",capSize:5,lineWidth:1,opacity:1,viewport:null,range:null,offset:0,count:0,bounds:null,positions:[],errors:[]},A=[];return T=i.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array(0)}),m=i.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),p=i.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),l=i.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),_=i.buffer({usage:"static",type:"float",data:a}),d(s),c=i({vert:` precision highp float; attribute vec2 position, positionFract; attribute vec4 error; attribute vec4 color; attribute vec2 direction, lineOffset, capOffset; uniform vec4 viewport; uniform float lineWidth, capSize; uniform vec2 scale, scaleFract, translate, translateFract; varying vec4 fragColor; void main() { fragColor = color / 255.; vec2 pixelOffset = lineWidth * lineOffset + (capSize + lineWidth) * capOffset; vec2 dxy = -step(.5, direction.xy) * error.xz + step(direction.xy, vec2(-.5)) * error.yw; vec2 position = position + dxy; vec2 pos = (position + translate) * scale + (positionFract + translateFract) * scale + (position + translate) * scaleFract + (positionFract + translateFract) * scaleFract; pos += pixelOffset / viewport.zw; gl_Position = vec4(pos * 2. - 1., 0, 1); } `,frag:` precision highp float; varying vec4 fragColor; uniform float opacity; void main() { gl_FragColor = fragColor; gl_FragColor.a *= opacity; } `,uniforms:{range:i.prop("range"),lineWidth:i.prop("lineWidth"),capSize:i.prop("capSize"),opacity:i.prop("opacity"),scale:i.prop("scale"),translate:i.prop("translate"),scaleFract:i.prop("scaleFract"),translateFract:i.prop("translateFract"),viewport:(y,f)=>[f.viewport.x,f.viewport.y,y.viewportWidth,y.viewportHeight]},attributes:{color:{buffer:T,offset:(y,f)=>f.offset*4,divisor:1},position:{buffer:m,offset:(y,f)=>f.offset*8,divisor:1},positionFract:{buffer:p,offset:(y,f)=>f.offset*8,divisor:1},error:{buffer:l,offset:(y,f)=>f.offset*16,divisor:1},direction:{buffer:_,stride:24,offset:0},lineOffset:{buffer:_,stride:24,offset:8},capOffset:{buffer:_,stride:24,offset:16}},primitive:"triangles",blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:!1},scissor:{enable:!0,box:i.prop("viewport")},viewport:i.prop("viewport"),stencil:!1,instances:i.prop("count"),count:a.length}),e(M,{update:d,draw:g,destroy:u,regl:i,gl:h,canvas:h.canvas,groups:A}),M;function M(y){y?d(y):y===null&&u(),g()}function g(y){if(typeof y=="number")return b(y);y&&!Array.isArray(y)&&(y=[y]),i._refresh(),A.forEach((f,R)=>{if(f){if(y&&(y[R]?f.draw=!0:f.draw=!1),!f.draw){f.draw=!0;return}b(R)}})}function b(y){typeof y=="number"&&(y=A[y]),y!=null&&y&&y.count&&y.color&&y.opacity&&y.positions&&y.positions.length>1&&(y.scaleRatio=[y.scale[0]*y.viewport.width,y.scale[1]*y.viewport.height],c(y),y.after&&y.after(y))}function d(y){if(!y)return;y.length!=null?typeof y[0]=="number"&&(y=[{positions:y}]):Array.isArray(y)||(y=[y]);let f=0,R=0;if(M.groups=A=y.map((F,N)=>{let O=A[N];if(F)typeof F=="function"?F={after:F}:typeof F[0]=="number"&&(F={positions:F});else return O;return F=E(F,{color:"color colors fill",capSize:"capSize cap capsize cap-size",lineWidth:"lineWidth line-width width line thickness",opacity:"opacity alpha",range:"range dataBox",viewport:"viewport viewBox",errors:"errors error",positions:"positions position data points"}),O||(A[N]=O={id:N,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},F=e({},w,F)),S(O,F,[{lineWidth:P=>+P*.5,capSize:P=>+P*.5,opacity:parseFloat,errors:P=>(P=t(P),R+=P.length,P),positions:(P,U)=>(P=t(P,"float64"),U.count=Math.floor(P.length/2),U.bounds=v(P,2),U.offset=f,f+=U.count,P)},{color:(P,U)=>{let B=U.count;if(P||(P="transparent"),!Array.isArray(P)||typeof P[0]=="number"){let $=P;P=Array(B);for(let se=0;se{let X=U.bounds;return P||(P=X),U.scale=[1/(P[2]-P[0]),1/(P[3]-P[1])],U.translate=[-P[0],-P[1]],U.scaleFract=o(U.scale),U.translateFract=o(U.translate),P},viewport:P=>{let U;return Array.isArray(P)?U={x:P[0],y:P[1],width:P[2]-P[0],height:P[3]-P[1]}:P?(U={x:P.x||P.left||0,y:P.y||P.top||0},P.right?U.width=P.right-U.x:U.width=P.w||P.width||0,P.bottom?U.height=P.bottom-U.y:U.height=P.h||P.height||0):U={x:0,y:0,width:h.drawingBufferWidth,height:h.drawingBufferHeight},U}}]),O}),f||R){let F=A.reduce((U,B,X)=>U+(B?B.count:0),0),N=new Float64Array(F*2),O=new Uint8Array(F*4),P=new Float32Array(F*4);A.forEach((U,B)=>{if(!U)return;let{positions:X,count:$,offset:se,color:le,errors:fe}=U;$&&(O.set(le,se*4),P.set(fe,se*4),N.set(X,se*2))});var L=r(N);m(L);var z=o(N,L);p(z),T(O),l(P)}}function u(){m.destroy(),p.destroy(),T.destroy(),l.destroy(),_.destroy()}}}}),pq=Xe({"node_modules/unquote/index.js"(Z,G){var v=/[\'\"]/;G.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=Xe({"node_modules/css-global-keywords/index.json"(Z,G){G.exports=["inherit","initial","unset"]}}),n6=Xe({"node_modules/css-system-font-keywords/index.json"(Z,G){G.exports=["caption","icon","menu","message-box","small-caption","status-bar"]}}),o6=Xe({"node_modules/css-font-weight-keywords/index.json"(Z,G){G.exports=["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]}}),s6=Xe({"node_modules/css-font-style-keywords/index.json"(Z,G){G.exports=["normal","italic","oblique"]}}),l6=Xe({"node_modules/css-font-stretch-keywords/index.json"(Z,G){G.exports=["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]}}),dq=Xe({"node_modules/parenthesis/index.js"(Z,G){"use strict";function v(E,e){if(typeof E!="string")return[E];var t=[E];typeof e=="string"||Array.isArray(e)?e={brackets:e}:e||(e={});var r=e.brackets?Array.isArray(e.brackets)?e.brackets:[e.brackets]:["{}","[]","()"],o=e.escape||"___",a=!!e.flat;r.forEach(function(s){var h=new RegExp(["\\",s[0],"[^\\",s[0],"\\",s[1],"]*\\",s[1]].join("")),c=[];function m(p,T,l){var _=t.push(p.slice(s[0].length,-s[1].length))-1;return c.push(_),o+_+o}t.forEach(function(p,T){for(var l,_=0;p!=l;)if(l=p,p=p.replace(h,m),_++>1e4)throw Error("References have circular dependency. Please, check them.");t[T]=p}),c=c.reverse(),t=t.map(function(p){return c.forEach(function(T){p=p.replace(new RegExp("(\\"+o+T+"\\"+o+")","g"),s[0]+"$1"+s[1])}),p})});var n=new RegExp("\\"+o+"([0-9]+)\\"+o);function i(s,h,c){for(var m=[],p,T=0;p=n.exec(s);){if(T++>1e4)throw Error("Circular references in parenthesis");m.push(s.slice(0,p.index)),m.push(i(h[p[1]],h)),s=s.slice(p.index+p[0].length)}return m.push(s),m}return a?t:i(t[0],t)}function x(E,e){if(e&&e.flat){var t=e&&e.escape||"___",r=E[0],o;if(!r)return"";for(var a=new RegExp("\\"+t+"([0-9]+)\\"+t),n=0;r!=o;){if(n++>1e4)throw Error("Circular references in "+E);o=r,r=r.replace(a,i)}return r}return E.reduce(function s(h,c){return Array.isArray(c)&&(c=c.reduce(s,"")),h+c},"");function i(s,h){if(E[h]==null)throw Error("Reference "+h+"is undefined");return E[h]}}function S(E,e){return Array.isArray(E)?x(E,e):v(E,e)}S.parse=v,S.stringify=x,G.exports=S}}),vq=Xe({"node_modules/string-split-by/index.js"(Z,G){"use strict";var v=dq();G.exports=function(S,E,e){if(S==null)throw Error("First argument should be a string");if(E==null)throw Error("Separator should be a string or a RegExp");e?(typeof e=="string"||Array.isArray(e))&&(e={ignore:e}):e={},e.escape==null&&(e.escape=!0),e.ignore==null?e.ignore=["[]","()","{}","<>",'""',"''","``","\u201C\u201D","\xAB\xBB"]:(typeof e.ignore=="string"&&(e.ignore=[e.ignore]),e.ignore=e.ignore.map(function(h){return h.length===1&&(h=h+h),h}));var t=v.parse(S,{flat:!0,brackets:e.ignore}),r=t[0],o=r.split(E);if(e.escape){for(var a=[],n=0;n1&&Zt===fr&&(Zt==='"'||Zt==="'"))return['"'+r(it.substr(1,it.length-2))+'"'];var oa=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(it);if(oa)return o(it.substr(0,oa.index)).concat(o(oa[1])).concat(o(it.substr(oa.index+oa[0].length)));var wa=it.split(".");if(wa.length===1)return['"'+r(it)+'"'];for(var ma=[],_a=0;_a"u"?1:window.devicePixelRatio,si=!1,yn={},zi=function(ea){},Ei=function(){};if(typeof Zt=="string"?fr=document.querySelector(Zt):typeof Zt=="object"&&(_(Zt)?fr=Zt:w(Zt)?(ma=Zt,wa=ma.canvas):("gl"in Zt?ma=Zt.gl:"canvas"in Zt?wa=M(Zt.canvas):"container"in Zt&&(oa=M(Zt.container)),"attributes"in Zt&&(_a=Zt.attributes),"extensions"in Zt&&(Ya=A(Zt.extensions)),"optionalExtensions"in Zt&&(bi=A(Zt.optionalExtensions)),"onDone"in Zt&&(zi=Zt.onDone),"profile"in Zt&&(si=!!Zt.profile),"pixelRatio"in Zt&&(yi=+Zt.pixelRatio),"cachedCode"in Zt&&(yn=Zt.cachedCode))),fr&&(fr.nodeName.toLowerCase()==="canvas"?wa=fr:oa=fr),!ma){if(!wa){var Na=T(oa||document.body,zi,yi);if(!Na)return null;wa=Na.canvas,Ei=Na.onDestroy}_a.premultipliedAlpha===void 0&&(_a.premultipliedAlpha=!0),ma=l(wa,_a)}return ma?{gl:ma,canvas:wa,container:oa,extensions:Ya,optionalExtensions:bi,pixelRatio:yi,profile:si,cachedCode:yn,onDone:zi,onDestroy:Ei}:(Ei(),zi("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function b(it,Zt){var fr={};function oa(_a){var Ya=_a.toLowerCase(),bi;try{bi=fr[Ya]=it.getExtension(Ya)}catch{}return!!bi}for(var wa=0;wa65535)<<4,it>>>=Zt,fr=(it>255)<<3,it>>>=fr,Zt|=fr,fr=(it>15)<<2,it>>>=fr,Zt|=fr,fr=(it>3)<<1,it>>>=fr,Zt|=fr,Zt|it>>1}function P(){var it=d(8,function(){return[]});function Zt(ma){var _a=N(ma),Ya=it[O(_a)>>2];return Ya.length>0?Ya.pop():new ArrayBuffer(_a)}function fr(ma){it[O(ma.byteLength)>>2].push(ma)}function oa(ma,_a){var Ya=null;switch(ma){case u:Ya=new Int8Array(Zt(_a),0,_a);break;case y:Ya=new Uint8Array(Zt(_a),0,_a);break;case f:Ya=new Int16Array(Zt(2*_a),0,_a);break;case R:Ya=new Uint16Array(Zt(2*_a),0,_a);break;case L:Ya=new Int32Array(Zt(4*_a),0,_a);break;case z:Ya=new Uint32Array(Zt(4*_a),0,_a);break;case F:Ya=new Float32Array(Zt(4*_a),0,_a);break;default:return null}return Ya.length!==_a?Ya.subarray(0,_a):Ya}function wa(ma){fr(ma.buffer)}return{alloc:Zt,free:fr,allocType:oa,freeType:wa}}var U=P();U.zero=P();var B=3408,X=3410,$=3411,se=3412,le=3413,fe=3414,V=3415,Y=33901,ee=33902,q=3379,oe=3386,ae=34921,j=36347,Q=36348,re=35661,ce=35660,be=34930,Ae=36349,De=34076,ze=34024,Ze=7936,at=7937,nt=7938,rt=35724,st=34047,Me=36063,ye=34852,he=3553,Oe=34067,tt=34069,ot=33984,Qe=6408,Pt=5126,It=5121,qt=36160,Wt=36053,kr=36064,mr=16384,qr=function(it,Zt){var fr=1;Zt.ext_texture_filter_anisotropic&&(fr=it.getParameter(st));var oa=1,wa=1;Zt.webgl_draw_buffers&&(oa=it.getParameter(ye),wa=it.getParameter(Me));var ma=!!Zt.oes_texture_float;if(ma){var _a=it.createTexture();it.bindTexture(he,_a),it.texImage2D(he,0,Qe,1,1,0,Qe,Pt,null);var Ya=it.createFramebuffer();if(it.bindFramebuffer(qt,Ya),it.framebufferTexture2D(qt,kr,he,_a,0),it.bindTexture(he,null),it.checkFramebufferStatus(qt)!==Wt)ma=!1;else{it.viewport(0,0,1,1),it.clearColor(1,0,0,1),it.clear(mr);var bi=U.allocType(Pt,4);it.readPixels(0,0,1,1,Qe,Pt,bi),it.getError()?ma=!1:(it.deleteFramebuffer(Ya),it.deleteTexture(_a),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 yn=it.createTexture(),zi=U.allocType(It,36);it.activeTexture(ot),it.bindTexture(Oe,yn),it.texImage2D(tt,0,Qe,3,3,0,Qe,It,zi),U.freeType(zi),it.bindTexture(Oe,null),it.deleteTexture(yn),si=!it.getError()}return{colorBits:[it.getParameter(X),it.getParameter($),it.getParameter(se),it.getParameter(le)],depthBits:it.getParameter(fe),stencilBits:it.getParameter(V),subpixelBits:it.getParameter(B),extensions:Object.keys(Zt).filter(function(Ei){return!!Zt[Ei]}),maxAnisotropic:fr,maxDrawbuffers:oa,maxColorAttachments:wa,pointSizeDims:it.getParameter(Y),lineWidthDims:it.getParameter(ee),maxViewportDims:it.getParameter(oe),maxCombinedTextureUnits:it.getParameter(re),maxCubeMapSize:it.getParameter(De),maxRenderbufferSize:it.getParameter(ze),maxTextureUnits:it.getParameter(be),maxTextureSize:it.getParameter(q),maxAttributes:it.getParameter(ae),maxVertexUniforms:it.getParameter(j),maxVertexTextureUnits:it.getParameter(ce),maxVaryingVectors:it.getParameter(Q),maxFragmentUniforms:it.getParameter(Ae),glsl:it.getParameter(rt),renderer:it.getParameter(at),vendor:it.getParameter(Ze),version:it.getParameter(nt),readFloat:ma,npotTextureCube:si}},Sr=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 Rr(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)||Sr(it.data))}var wt=function(it){return Object.keys(it).map(function(Zt){return it[Zt]})},Ne={shape:Ee,flatten:Ce};function Ke(it,Zt,fr){for(var oa=0;oa0){var pn;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])||Sr(Ha[0])){Ri=Ca(Ha);var xi=Wa(Ha,Ri,Va.dtype);Li(xi,Yi),U.freeType(xi)}}}else if(Rr(Ha)){Ri=Ha.shape;var Xi=Ha.stride,mn=0,In=0,Ii=0,an=0;Ri.length===1?(mn=Ri[0],In=1,Ii=Xi[0],an=0):Ri.length===2&&(mn=Ri[0],In=Ri[1],Ii=Xi[0],an=Xi[1]);var kn=Array.isArray(Ha.data)?Va.dtype:Jt(Ha.data),Dn=U.allocType(kn,mn*In);ta(Dn,Ha.data,mn,In,Ii,an,Ha.offset),Li(Dn,Yi),U.freeType(Dn)}return Bi}return Qa||Bi(ea),Bi._reglType="buffer",Bi._buffer=Va,Bi.subdata=pn,fr.profile&&(Bi.stats=Va.stats),Bi.destroy=function(){zi(Va)},Bi}function Na(){wt(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&&(Zt.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(){wt(ma).forEach(zi),Ya.forEach(zi)},getBuffer:function(ea){return ea&&ea._buffer instanceof _a?ea._buffer:null},restore:Na,_initBuffer:yn}}var ca=0,Ba=0,$a=1,Za=1,ri=4,pi=4,Ra={points:ca,point:Ba,lines:$a,line:Za,triangles:ri,triangle:pi,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},tn=0,on=1,hn=4,Tt=5120,ut=5121,Br=5122,Cr=5123,xr=5124,Ir=5125,Ur=34963,Hr=35040,xt=35044;function Xt(it,Zt,fr,oa){var wa={},ma=0,_a={uint8:ut,uint16:Cr};Zt.oes_element_index_uint&&(_a.uint32=Ir);function Ya(Na){this.id=ma++,wa[this.id]=this,this.buffer=Na,this.primType=hn,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,Ur,!0,!1)._buffer)),yn(ea,Na,Hr,-1,-1,0,0),ea}function si(Na){bi.push(Na)}function yn(Na,ea,Ma,Qa,di,Va,Bi){Na.buffer.bind();var Li;if(ea){var pn=Bi;!Bi&&(!Sr(ea)||Rr(ea)&&!Sr(ea.data))&&(pn=Zt.oes_element_index_uint?Ir:Cr),fr._initBuffer(Na.buffer,ea,Ma,pn,3)}else it.bufferData(Ur,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 Tt:Li=ut;break;case Cr:case Br:Li=Cr;break;case Ir:case xr:Li=Ir;break;default:}Na.buffer.dtype=Li}Na.type=Li;var Ha=di;Ha<0&&(Ha=Na.buffer.byteLength,Li===Cr?Ha>>=1:Li===Ir&&(Ha>>=2)),Na.vertCount=Ha;var Ua=Qa;if(Qa<0){Ua=hn;var Yi=Na.buffer.dimension;Yi===1&&(Ua=tn),Yi===2&&(Ua=on),Yi===3&&(Ua=hn)}Na.primType=Ua}function zi(Na){oa.elementsCount--,delete wa[Na.id],Na.buffer.destroy(),Na.buffer=null}function Ei(Na,ea){var Ma=fr.create(null,Ur,!0),Qa=new Ya(Ma._buffer);oa.elementsCount++;function di(Va){if(!Va)Ma(),Qa.primType=hn,Qa.vertCount=0,Qa.type=ut;else if(typeof Va=="number")Ma(Va),Qa.primType=hn,Qa.vertCount=Va|0,Qa.type=ut;else{var Bi=null,Li=xt,pn=-1,Ha=-1,Ua=0,Yi=0;Array.isArray(Va)||Sr(Va)||Rr(Va)?Bi=Va:("data"in Va&&(Bi=Va.data),"usage"in Va&&(Li=qa[Va.usage]),"primitive"in Va&&(pn=Ra[Va.primitive]),"count"in Va&&(Ha=Va.count|0),"type"in Va&&(Yi=_a[Va.type]),"length"in Va?Ua=Va.length|0:(Ua=Ha,Yi===Cr||Yi===Br?Ua*=2:(Yi===Ir||Yi===xr)&&(Ua*=4))),yn(Qa,Bi,Li,pn,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(){wt(wa).forEach(zi)}}}var vr=new Float32Array(1),Or=new Uint32Array(vr.buffer),ba=5123;function Pa(it){for(var Zt=U.allocType(ba,it.length),fr=0;fr>>31<<15,ma=(oa<<1>>>24)-127,_a=oa>>13&1023;if(ma<-24)Zt[fr]=wa;else if(ma<-14){var Ya=-14-ma;Zt[fr]=wa+(_a+1024>>Ya)}else ma>15?Zt[fr]=wa+31744:Zt[fr]=wa+(ma+15<<10)+_a}return Zt}function ya(it){return Array.isArray(it)||Sr(it)}var la=34467,Ta=3553,Ai=34067,ki=34069,Ki=6408,_n=6406,Rn=6407,En=6409,On=6410,no=32854,cn=32855,lo=36194,Wo=32819,hs=32820,Oo=33635,Wn=34042,No=6402,as=34041,Ns=35904,ss=35906,uo=36193,jn=33776,Xn=33777,ls=33778,Cs=33779,Ks=35986,Xo=35987,Gi=34798,Ln=35840,Us=35841,_s=35842,Gn=35843,zs=36196,vs=5121,Ws=5123,il=5125,xn=5126,ko=10242,bo=10243,Is=10497,pu=33071,co=33648,Vs=10240,vl=10241,Ts=9728,js=9729,us=9984,As=9985,Nl=9986,su=9987,Tc=33170,du=4352,Sf=4353,Uc=4354,Fs=34046,dc=3317,Hc=37440,lu=37441,Pl=37443,ic=37444,Ou=33984,nl=[us,Nl,As,su],ml=[0,En,On,Rn,Ki],xs={};xs[En]=xs[_n]=xs[No]=1,xs[as]=xs[On]=2,xs[Rn]=xs[Ns]=3,xs[Ki]=xs[ss]=4;function Xs(it){return"[object "+it+"]"}var nc=Xs("HTMLCanvasElement"),Ul=Xs("OffscreenCanvas"),qu=Xs("CanvasRenderingContext2D"),fl=Xs("ImageBitmap"),xh=Xs("HTMLImageElement"),ns=Xs("HTMLVideoElement"),bh=Object.keys(Pe).concat([nc,Ul,qu,fl,xh,ns]),Es=[];Es[vs]=1,Es[xn]=4,Es[uo]=2,Es[Ws]=2,Es[il]=4;var to=[];to[no]=2,to[cn]=2,to[lo]=2,to[as]=4,to[jn]=.5,to[Xn]=.5,to[ls]=1,to[Cs]=1,to[Ks]=.5,to[Xo]=1,to[Gi]=1,to[Ln]=.5,to[Us]=.25,to[_s]=.5,to[Gn]=.25,to[zs]=.5;function Wc(it){return Array.isArray(it)&&(it.length===0||typeof it[0]=="number")}function Vu(it){if(!Array.isArray(it))return!1;var Zt=it.length;return!(Zt===0||!ya(it[0]))}function jl(it){return Object.prototype.toString.call(it)}function Mf(it){return jl(it)===nc}function Ac(it){return jl(it)===Ul}function nf(it){return jl(it)===qu}function $l(it){return jl(it)===fl}function Jf(it){return jl(it)===xh}function Of(it){return jl(it)===ns}function of(it){if(!it)return!1;var Zt=jl(it);return bh.indexOf(Zt)>=0?!0:Wc(it)||Vu(it)||Rr(it)}function jc(it){return Pe[Object.prototype.toString.call(it)]|0}function Bf(it,Zt){var fr=Zt.length;switch(it.type){case vs:case Ws:case il:case xn:var oa=U.allocType(it.type,fr);oa.set(Zt),it.data=oa;break;case uo:it.data=Pa(Zt);break;default:}}function Nf(it,Zt){return U.allocType(it.type===uo?xn:it.type,Zt)}function Gu(it,Zt){it.type===uo?(it.data=Pa(Zt),U.freeType(Zt)):it.data=Zt}function Ef(it,Zt,fr,oa,wa,ma){for(var _a=it.width,Ya=it.height,bi=it.channels,yi=_a*Ya*bi,si=Nf(it,yi),yn=0,zi=0;zi=1;)Ya+=_a*bi*bi,bi/=2;return Ya}else return _a*fr*oa}function Xc(it,Zt,fr,oa,wa,ma,_a){var Ya={"don't care":du,"dont care":du,nice:Uc,fast:Sf},bi={repeat:Is,clamp:pu,mirror:co},yi={nearest:Ts,linear:js},si=v({mipmap:su,"nearest mipmap nearest":us,"linear mipmap nearest":As,"nearest mipmap linear":Nl,"linear mipmap linear":su},yi),yn={none:0,browser:ic},zi={uint8:vs,rgba4:Wo,rgb565:Oo,"rgb5 a1":hs},Ei={alpha:_n,luminance:En,"luminance alpha":On,rgb:Rn,rgba:Ki,rgba4:no,"rgb5 a1":cn,rgb565:lo},Na={};Zt.ext_srgb&&(Ei.srgb=Ns,Ei.srgba=ss),Zt.oes_texture_float&&(zi.float32=zi.float=xn),Zt.oes_texture_half_float&&(zi.float16=zi["half float"]=uo),Zt.webgl_depth_texture&&(v(Ei,{depth:No,"depth stencil":as}),v(zi,{uint16:Ws,uint32:il,"depth stencil":Wn})),Zt.webgl_compressed_texture_s3tc&&v(Na,{"rgb s3tc dxt1":jn,"rgba s3tc dxt1":Xn,"rgba s3tc dxt3":ls,"rgba s3tc dxt5":Cs}),Zt.webgl_compressed_texture_atc&&v(Na,{"rgb atc":Ks,"rgba atc explicit alpha":Xo,"rgba atc interpolated alpha":Gi}),Zt.webgl_compressed_texture_pvrtc&&v(Na,{"rgb pvrtc 4bppv1":Ln,"rgb pvrtc 2bppv1":Us,"rgba pvrtc 4bppv1":_s,"rgba pvrtc 2bppv1":Gn}),Zt.webgl_compressed_texture_etc1&&(Na["rgb etc1"]=zs);var ea=Array.prototype.slice.call(it.getParameter(la));Object.keys(Na).forEach(function(Le){var $e=Na[Le];ea.indexOf($e)>=0&&(Ei[Le]=$e)});var Ma=Object.keys(Ei);fr.textureFormats=Ma;var Qa=[];Object.keys(Ei).forEach(function(Le){var $e=Ei[Le];Qa[$e]=Le});var di=[];Object.keys(zi).forEach(function(Le){var $e=zi[Le];di[$e]=Le});var Va=[];Object.keys(yi).forEach(function(Le){var $e=yi[Le];Va[$e]=Le});var Bi=[];Object.keys(si).forEach(function(Le){var $e=si[Le];Bi[$e]=Le});var Li=[];Object.keys(bi).forEach(function(Le){var $e=bi[Le];Li[$e]=Le});var pn=Ma.reduce(function(Le,$e){var gt=Ei[$e];return gt===En||gt===_n||gt===En||gt===On||gt===No||gt===as||Zt.ext_srgb&&(gt===Ns||gt===ss)?Le[gt]=gt:gt===cn||$e.indexOf("rgba")>=0?Le[gt]=Ki:Le[gt]=Rn,Le},{});function Ha(){this.internalformat=Ki,this.format=Ki,this.type=vs,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(Le,$e){Le.internalformat=$e.internalformat,Le.format=$e.format,Le.type=$e.type,Le.compressed=$e.compressed,Le.premultiplyAlpha=$e.premultiplyAlpha,Le.flipY=$e.flipY,Le.unpackAlignment=$e.unpackAlignment,Le.colorSpace=$e.colorSpace,Le.width=$e.width,Le.height=$e.height,Le.channels=$e.channels}function Yi(Le,$e){if(!(typeof $e!="object"||!$e)){if("premultiplyAlpha"in $e&&(Le.premultiplyAlpha=$e.premultiplyAlpha),"flipY"in $e&&(Le.flipY=$e.flipY),"alignment"in $e&&(Le.unpackAlignment=$e.alignment),"colorSpace"in $e&&(Le.colorSpace=yn[$e.colorSpace]),"type"in $e){var gt=$e.type;Le.type=zi[gt]}var jt=Le.width,wr=Le.height,Nr=Le.channels,pr=!1;"shape"in $e?(jt=$e.shape[0],wr=$e.shape[1],$e.shape.length===3&&(Nr=$e.shape[2],pr=!0)):("radius"in $e&&(jt=wr=$e.radius),"width"in $e&&(jt=$e.width),"height"in $e&&(wr=$e.height),"channels"in $e&&(Nr=$e.channels,pr=!0)),Le.width=jt|0,Le.height=wr|0,Le.channels=Nr|0;var yt=!1;if("format"in $e){var kt=$e.format,Bt=Le.internalformat=Ei[kt];Le.format=pn[Bt],kt in zi&&("type"in $e||(Le.type=zi[kt])),kt in Na&&(Le.compressed=!0),yt=!0}!pr&&yt?Le.channels=xs[Le.format]:pr&&!yt&&Le.channels!==ml[Le.format]&&(Le.format=Le.internalformat=ml[Le.channels])}}function Ri(Le){it.pixelStorei(Hc,Le.flipY),it.pixelStorei(lu,Le.premultiplyAlpha),it.pixelStorei(Pl,Le.colorSpace),it.pixelStorei(dc,Le.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(Le,$e){var gt=null;if(of($e)?gt=$e:$e&&(Yi(Le,$e),"x"in $e&&(Le.xOffset=$e.x|0),"y"in $e&&(Le.yOffset=$e.y|0),of($e.data)&&(gt=$e.data)),$e.copy){var jt=wa.viewportWidth,wr=wa.viewportHeight;Le.width=Le.width||jt-Le.xOffset,Le.height=Le.height||wr-Le.yOffset,Le.needsCopy=!0}else if(!gt)Le.width=Le.width||1,Le.height=Le.height||1,Le.channels=Le.channels||4;else if(Sr(gt))Le.channels=Le.channels||4,Le.data=gt,!("type"in $e)&&Le.type===vs&&(Le.type=jc(gt));else if(Wc(gt))Le.channels=Le.channels||4,Bf(Le,gt),Le.alignment=1,Le.needsFree=!0;else if(Rr(gt)){var Nr=gt.data;!Array.isArray(Nr)&&Le.type===vs&&(Le.type=jc(Nr));var pr=gt.shape,yt=gt.stride,kt,Bt,nr,hr,lr,dr;pr.length===3?(nr=pr[2],dr=yt[2]):(nr=1,dr=1),kt=pr[0],Bt=pr[1],hr=yt[0],lr=yt[1],Le.alignment=1,Le.width=kt,Le.height=Bt,Le.channels=nr,Le.format=Le.internalformat=ml[nr],Le.needsFree=!0,Ef(Le,Nr,hr,lr,dr,gt.offset)}else if(Mf(gt)||Ac(gt)||nf(gt))Mf(gt)||Ac(gt)?Le.element=gt:Le.element=gt.canvas,Le.width=Le.element.width,Le.height=Le.element.height,Le.channels=4;else if($l(gt))Le.element=gt,Le.width=gt.width,Le.height=gt.height,Le.channels=4;else if(Jf(gt))Le.element=gt,Le.width=gt.naturalWidth,Le.height=gt.naturalHeight,Le.channels=4;else if(Of(gt))Le.element=gt,Le.width=gt.videoWidth,Le.height=gt.videoHeight,Le.channels=4;else if(Vu(gt)){var ur=Le.width||gt[0].length,Ht=Le.height||gt.length,sr=Le.channels;ya(gt[0][0])?sr=sr||gt[0][0].length:sr=sr||1;for(var Vt=Ne.shape(gt),Dr=1,Jr=0;Jr>=wr,gt.height>>=wr,xi(gt,jt[wr]),Le.mipmask|=1<=0&&!("faces"in $e)&&(Le.genMipmaps=!0)}if("mag"in $e){var jt=$e.mag;Le.magFilter=yi[jt]}var wr=Le.wrapS,Nr=Le.wrapT;if("wrap"in $e){var pr=$e.wrap;typeof pr=="string"?wr=Nr=bi[pr]:Array.isArray(pr)&&(wr=bi[pr[0]],Nr=bi[pr[1]])}else{if("wrapS"in $e){var yt=$e.wrapS;wr=bi[yt]}if("wrapT"in $e){var kt=$e.wrapT;Nr=bi[kt]}}if(Le.wrapS=wr,Le.wrapT=Nr,"anisotropic"in $e){var Bt=$e.anisotropic;Le.anisotropic=$e.anisotropic}if("mipmap"in $e){var nr=!1;switch(typeof $e.mipmap){case"string":Le.mipmapHint=Ya[$e.mipmap],Le.genMipmaps=!0,nr=!0;break;case"boolean":nr=Le.genMipmaps=$e.mipmap;break;case"object":Le.genMipmaps=!1,nr=!0;break;default:}nr&&!("min"in $e)&&(Le.minFilter=us)}}function kl(Le,$e){it.texParameteri($e,vl,Le.minFilter),it.texParameteri($e,Vs,Le.magFilter),it.texParameteri($e,ko,Le.wrapS),it.texParameteri($e,bo,Le.wrapT),Zt.ext_texture_filter_anisotropic&&it.texParameteri($e,Fs,Le.anisotropic),Le.genMipmaps&&(it.hint(Tc,Le.mipmapHint),it.generateMipmap($e))}var tu=0,qs={},pl=fr.maxTextureUnits,wl=Array(pl).map(function(){return null});function Yn(Le){Ha.call(this),this.mipmask=0,this.internalformat=Ki,this.id=tu++,this.refCount=1,this.target=Le,this.texture=it.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new fs,_a.profile&&(this.stats={size:0})}function Cl(Le){it.activeTexture(Ou),it.bindTexture(Le.target,Le.texture)}function Co(){var Le=wl[0];Le?it.bindTexture(Le.target,Le.texture):it.bindTexture(Ta,null)}function ve(Le){var $e=Le.texture,gt=Le.unit,jt=Le.target;gt>=0&&(it.activeTexture(Ou+gt),it.bindTexture(jt,null),wl[gt]=null),it.deleteTexture($e),Le.texture=null,Le.params=null,Le.pixels=null,Le.refCount=0,delete qs[Le.id],ma.textureCount--}v(Yn.prototype,{bind:function(){var Le=this;Le.bindCount+=1;var $e=Le.unit;if($e<0){for(var gt=0;gt0)continue;jt.unit=-1}wl[gt]=Le,$e=gt;break}$e>=pl,_a.profile&&ma.maxTextureUnits<$e+1&&(ma.maxTextureUnits=$e+1),Le.unit=$e,it.activeTexture(Ou+$e),it.bindTexture(Le.target,Le.texture)}return $e},unbind:function(){this.bindCount-=1},decRef:function(){--this.refCount<=0&&ve(this)}});function K(Le,$e){var gt=new Yn(Ta);qs[gt.id]=gt,ma.textureCount++;function jt(pr,yt){var kt=gt.texInfo;fs.call(kt);var Bt=po();return typeof pr=="number"?typeof yt=="number"?Dn(Bt,pr|0,yt|0):Dn(Bt,pr|0,pr|0):pr?(Sl(kt,pr),Zn(Bt,pr)):Dn(Bt,1,1),kt.genMipmaps&&(Bt.mipmask=(Bt.width<<1)-1),gt.mipmask=Bt.mipmask,Ua(gt,Bt),gt.internalformat=Bt.internalformat,jt.width=Bt.width,jt.height=Bt.height,Cl(gt),Ds(Bt,Ta),kl(kt,Ta),Co(),Wl(Bt),_a.profile&&(gt.stats.size=oc(gt.internalformat,gt.type,Bt.width,Bt.height,kt.genMipmaps,!1)),jt.format=Qa[gt.internalformat],jt.type=di[gt.type],jt.mag=Va[kt.magFilter],jt.min=Bi[kt.minFilter],jt.wrapS=Li[kt.wrapS],jt.wrapT=Li[kt.wrapT],jt}function wr(pr,yt,kt,Bt){var nr=yt|0,hr=kt|0,lr=Bt|0,dr=Ii();return Ua(dr,gt),dr.width=0,dr.height=0,xi(dr,pr),dr.width=dr.width||(gt.width>>lr)-nr,dr.height=dr.height||(gt.height>>lr)-hr,Cl(gt),mn(dr,Ta,nr,hr,lr),Co(),an(dr),jt}function Nr(pr,yt){var kt=pr|0,Bt=yt|0||kt;if(kt===gt.width&&Bt===gt.height)return jt;jt.width=gt.width=kt,jt.height=gt.height=Bt,Cl(gt);for(var nr=0;gt.mipmask>>nr;++nr){var hr=kt>>nr,lr=Bt>>nr;if(!hr||!lr)break;it.texImage2D(Ta,nr,gt.format,hr,lr,0,gt.format,gt.type,null)}return Co(),_a.profile&&(gt.stats.size=oc(gt.internalformat,gt.type,kt,Bt,!1,!1)),jt}return jt(Le,$e),jt.subimage=wr,jt.resize=Nr,jt._reglType="texture2d",jt._texture=gt,_a.profile&&(jt.stats=gt.stats),jt.destroy=function(){gt.decRef()},jt}function _e(Le,$e,gt,jt,wr,Nr){var pr=new Yn(Ai);qs[pr.id]=pr,ma.cubeCount++;var yt=new Array(6);function kt(hr,lr,dr,ur,Ht,sr){var Vt,Dr=pr.texInfo;for(fs.call(Dr),Vt=0;Vt<6;++Vt)yt[Vt]=po();if(typeof hr=="number"||!hr){var Jr=hr|0||1;for(Vt=0;Vt<6;++Vt)Dn(yt[Vt],Jr,Jr)}else if(typeof hr=="object")if(lr)Zn(yt[0],hr),Zn(yt[1],lr),Zn(yt[2],dr),Zn(yt[3],ur),Zn(yt[4],Ht),Zn(yt[5],sr);else if(Sl(Dr,hr),Yi(pr,hr),"faces"in hr){var ga=hr.faces;for(Vt=0;Vt<6;++Vt)Ua(yt[Vt],pr),Zn(yt[Vt],ga[Vt])}else for(Vt=0;Vt<6;++Vt)Zn(yt[Vt],hr);for(Ua(pr,yt[0]),Dr.genMipmaps?pr.mipmask=(yt[0].width<<1)-1:pr.mipmask=yt[0].mipmask,pr.internalformat=yt[0].internalformat,kt.width=yt[0].width,kt.height=yt[0].height,Cl(pr),Vt=0;Vt<6;++Vt)Ds(yt[Vt],ki+Vt);for(kl(Dr,Ai),Co(),_a.profile&&(pr.stats.size=oc(pr.internalformat,pr.type,kt.width,kt.height,Dr.genMipmaps,!0)),kt.format=Qa[pr.internalformat],kt.type=di[pr.type],kt.mag=Va[Dr.magFilter],kt.min=Bi[Dr.minFilter],kt.wrapS=Li[Dr.wrapS],kt.wrapT=Li[Dr.wrapT],Vt=0;Vt<6;++Vt)Wl(yt[Vt]);return kt}function Bt(hr,lr,dr,ur,Ht){var sr=dr|0,Vt=ur|0,Dr=Ht|0,Jr=Ii();return Ua(Jr,pr),Jr.width=0,Jr.height=0,xi(Jr,lr),Jr.width=Jr.width||(pr.width>>Dr)-sr,Jr.height=Jr.height||(pr.height>>Dr)-Vt,Cl(pr),mn(Jr,ki+hr,sr,Vt,Dr),Co(),an(Jr),kt}function nr(hr){var lr=hr|0;if(lr!==pr.width){kt.width=pr.width=lr,kt.height=pr.height=lr,Cl(pr);for(var dr=0;dr<6;++dr)for(var ur=0;pr.mipmask>>ur;++ur)it.texImage2D(ki+dr,ur,pr.format,lr>>ur,lr>>ur,0,pr.format,pr.type,null);return Co(),_a.profile&&(pr.stats.size=oc(pr.internalformat,pr.type,kt.width,kt.height,!1,!0)),kt}}return kt(Le,$e,gt,jt,wr,Nr),kt.subimage=Bt,kt.resize=nr,kt._reglType="textureCube",kt._texture=pr,_a.profile&&(kt.stats=pr.stats),kt.destroy=function(){pr.decRef()},kt}function te(){for(var Le=0;Le>jt,gt.height>>jt,0,gt.internalformat,gt.type,null);else for(var wr=0;wr<6;++wr)it.texImage2D(ki+wr,jt,gt.internalformat,gt.width>>jt,gt.height>>jt,0,gt.internalformat,gt.type,null);kl(gt.texInfo,gt.target)})}function Ge(){for(var Le=0;Le=0?Wl=!0:bi.indexOf(fs)>=0&&(Wl=!1))),("depthTexture"in Yn||"depthStencilTexture"in Yn)&&(wl=!!(Yn.depthTexture||Yn.depthStencilTexture)),"depth"in Yn&&(typeof Yn.depth=="boolean"?Ds=Yn.depth:(tu=Yn.depth,bl=!1)),"stencil"in Yn&&(typeof Yn.stencil=="boolean"?bl=Yn.stencil:(qs=Yn.stencil,Ds=!1)),"depthStencil"in Yn&&(typeof Yn.depthStencil=="boolean"?Ds=bl=Yn.depthStencil:(pl=Yn.depthStencil,Ds=!1,bl=!1))}var Co=null,ve=null,K=null,_e=null;if(Array.isArray(po))Co=po.map(Na);else if(po)Co=[Na(po)];else for(Co=new Array(kl),kn=0;kn0&&(an.depth=xi[0].depth,an.stencil=xi[0].stencil,an.depthStencil=xi[0].depthStencil),xi[Ii]?xi[Ii](an):xi[Ii]=Ua(an)}return v(Xi,{width:kn,height:kn,color:fs})}function mn(In){var Ii,an=In|0;if(an===Xi.width)return Xi;var kn=Xi.color;for(Ii=0;Ii=kn.byteLength?Dn.subdata(kn):(Dn.destroy(),Ua.buffers[In]=null)),Ua.buffers[In]||(Dn=Ua.buffers[In]=wa.create(Ii,mf,!1,!0)),an.buffer=wa.getBuffer(Dn),an.size=an.buffer.dimension|0,an.normalized=!1,an.type=an.buffer.dtype,an.offset=0,an.stride=0,an.divisor=0,an.state=1,Xi[In]=1}else wa.getBuffer(Ii)?(an.buffer=wa.getBuffer(Ii),an.size=an.buffer.dimension|0,an.normalized=!1,an.type=an.buffer.dtype,an.offset=0,an.stride=0,an.divisor=0,an.state=1):wa.getBuffer(Ii.buffer)?(an.buffer=wa.getBuffer(Ii.buffer),an.size=(+Ii.size||an.buffer.dimension)|0,an.normalized=!!Ii.normalized||!1,"type"in Ii?an.type=fa[Ii.type]:an.type=an.buffer.dtype,an.offset=(Ii.offset||0)|0,an.stride=(Ii.stride||0)|0,an.divisor=(Ii.divisor||0)|0,an.state=1):"x"in Ii&&(an.x=+Ii.x||0,an.y=+Ii.y||0,an.z=+Ii.z||0,an.w=+Ii.w||0,an.state=2)}for(var Zn=0;Zn1)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(){wa={},ma={};for(var ea=0;ea16&&(fr=Pi(fr,it.length*8));for(var oa=Array(16),wa=Array(16),ma=0;ma<16;ma++)oa[ma]=fr[ma]^909522486,wa[ma]=fr[ma]^1549556828;var _a=Pi(oa.concat(Pc(Zt)),512+Zt.length*8);return Qt(Pi(wa.concat(_a),768))}function xu(it){for(var Zt=Vf?"0123456789ABCDEF":"0123456789abcdef",fr="",oa,wa=0;wa>>4&15)+Zt.charAt(oa&15);return fr}function Lc(it){for(var Zt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",fr="",oa=it.length,wa=0;wait.length*8?fr+=Xu:fr+=Zt.charAt(ma>>>6*(3-_a)&63);return fr}function Jc(it,Zt){var fr=Zt.length,oa=Array(),wa,ma,_a,Ya,bi=Array(Math.ceil(it.length/2));for(wa=0;wa0;){for(Ya=Array(),_a=0,wa=0;wa0||ma>0)&&(Ya[Ya.length]=ma);oa[oa.length]=_a,bi=Ya}var yi="";for(wa=oa.length-1;wa>=0;wa--)yi+=Zt.charAt(oa[wa]);var si=Math.ceil(it.length*8/(Math.log(Zt.length)/Math.log(2)));for(wa=yi.length;wa>>6&31,128|oa&63):oa<=65535?Zt+=String.fromCharCode(224|oa>>>12&15,128|oa>>>6&63,128|oa&63):oa<=2097151&&(Zt+=String.fromCharCode(240|oa>>>18&7,128|oa>>>12&63,128|oa>>>6&63,128|oa&63));return Zt}function Pc(it){for(var Zt=Array(it.length>>2),fr=0;fr>5]|=(it.charCodeAt(fr/8)&255)<<24-fr%32;return Zt}function Qt(it){for(var Zt="",fr=0;fr>5]>>>24-fr%32&255);return Zt}function br(it,Zt){return it>>>Zt|it<<32-Zt}function aa(it,Zt){return it>>>Zt}function $r(it,Zt,fr){return it&Zt^~it&fr}function ka(it,Zt,fr){return it&Zt^it&fr^Zt&fr}function li(it){return br(it,2)^br(it,13)^br(it,22)}function Ci(it){return br(it,6)^br(it,11)^br(it,25)}function Hi(it){return br(it,7)^br(it,18)^aa(it,3)}function Qi(it){return br(it,17)^br(it,19)^aa(it,10)}var dn=new Array(1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998);function Pi(it,Zt){var fr=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),oa=new Array(64),wa,ma,_a,Ya,bi,yi,si,yn,zi,Ei,Na,ea;for(it[Zt>>5]|=128<<24-Zt%32,it[(Zt+64>>9<<4)+15]=Zt,zi=0;zi>16)+(Zt>>16)+(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 Zt=it&&it.cache,fr=0,oa=[],wa=[],ma=[];function _a(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(),yn={};function zi(Na,ea){var Ma=[];function Qa(){var pn="a"+Ma.length;return Ma.push(pn),pn}ea=ea||0;for(var di=0;di":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},Fa={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Xa={cw:et,ccw:mt};function fi(it){return Array.isArray(it)||Sr(it)||Rr(it)}function ni(it){return it.sort(function(Zt,fr){return Zt===Se?-1:fr===Se?1:Zt=1,oa>=2,Zt)}else if(fr===Ss){var wa=it.data;return new La(wa.thisDep,wa.contextDep,wa.propDep,Zt)}else{if(fr===rl)return new La(!1,!1,!1,Zt);if(fr===Os){for(var ma=!1,_a=!1,Ya=!1,bi=0;bi=1&&(_a=!0),si>=2&&(Ya=!0)}else yi.type===Ss&&(ma=ma||yi.data.thisDep,_a=_a||yi.data.contextDep,Ya=Ya||yi.data.propDep)}return new La(ma,_a,Ya,Zt)}else return new La(fr===Ko,fr===yo,fr===un,Zt)}}var Pn=new La(!1,!1,!1,function(){});function Jn(it,Zt,fr,oa,wa,ma,_a,Ya,bi,yi,si,yn,zi,Ei,Na,ea){var Ma=yi.Record,Qa={add:32774,subtract:32778,"reverse subtract":32779};fr.ext_blend_minmax&&(Qa.min=bt,Qa.max=Mt);var di=fr.angle_instanced_arrays,Va=fr.webgl_draw_buffers,Bi=fr.oes_vertex_array_object,Li={dirty:!0,profile:ea.profile},pn={},Ha=[],Ua={},Yi={};function Ri(yt){return yt.replace(".","_")}function Ti(yt,kt,Bt){var nr=Ri(yt);Ha.push(yt),pn[nr]=Li[nr]=!!Bt,Ua[nr]=kt}function xi(yt,kt,Bt){var nr=Ri(yt);Ha.push(yt),Array.isArray(Bt)?(Li[nr]=Bt.slice(),pn[nr]=Bt.slice()):Li[nr]=pn[nr]=Bt,Yi[nr]=kt}function Xi(yt){return!!isNaN(yt)}Ti(el,ci),Ti(bs,za),xi(Fl,"blendColor",[0,0,0,0]),xi(_l,"blendEquationSeparate",[Xr,Xr]),xi(ll,"blendFuncSeparate",[Gr,_r,Gr,_r]),Ti(Un,ji,!0),xi(Lo,"depthFunc",xa),xi(Js,"depthRange",[0,1]),xi(Rs,"depthMask",!0),xi(uu,uu,[!0,!0,!0,!0]),Ti(Iu,Aa),xi(Zu,"cullFace",Fe),xi(Ic,Ic,mt),xi(bu,bu,1),Ti(Rc,Sn),xi(Au,"polygonOffset",[0,0]),Ti(yc,Kn),Ti(ho,Bn),xi(Ro,"sampleCoverage",[1,!1]),Ti(Dc,Vi),xi(lc,"stencilMask",-1),xi(Yu,"stencilFunc",[ar,0,-1]),xi(Ue,"stencilOpSeparate",[de,Ot,Ot,Ot]),xi(I,"stencilOpSeparate",[Fe,Ot,Ot,Ot]),Ti(ie,nn),xi(we,"scissor",[0,0,it.drawingBufferWidth,it.drawingBufferHeight]),xi(Se,Se,[0,0,it.drawingBufferWidth,it.drawingBufferHeight]);var mn={gl:it,context:zi,strings:Zt,next:pn,current:Li,draw:yn,elements:ma,buffer:wa,shader:si,attributes:yi.state,vao:yi,uniforms:bi,framebuffer:Ya,extensions:fr,timer:Ei,isBufferArgs:fi},In={primTypes:Ra,compareFuncs:Sa,blendFuncs:ti,blendEquations:Qa,stencilOps:Fa,glTypes:fa,orientationType:Xa};Va&&(In.backBuffer=[Fe],In.drawBuffer=d(oa.maxDrawbuffers,function(yt){return yt===0?[0]:d(yt,function(kt){return Ja+kt})}));var Ii=0;function an(){var yt=Mn({cache:Na}),kt=yt.link,Bt=yt.global;yt.id=Ii++,yt.batchId="0";var nr=kt(mn),hr=yt.shared={props:"a0"};Object.keys(mn).forEach(function(sr){hr[sr]=Bt.def(nr,".",sr)});var lr=yt.next={},dr=yt.current={};Object.keys(Yi).forEach(function(sr){Array.isArray(Li[sr])&&(lr[sr]=Bt.def(hr.next,".",sr),dr[sr]=Bt.def(hr.current,".",sr))});var ur=yt.constants={};Object.keys(In).forEach(function(sr){ur[sr]=Bt.def(JSON.stringify(In[sr]))}),yt.invoke=function(sr,Vt){switch(Vt.type){case An:var Dr=["this",hr.context,hr.props,yt.batchId];return sr.def(kt(Vt.data),".call(",Dr.slice(0,Math.max(Vt.data.length+1,4)),")");case un:return sr.def(hr.props,Vt.data);case yo:return sr.def(hr.context,Vt.data);case Ko:return sr.def("this",Vt.data);case Ss:return Vt.data.append(yt,sr),Vt.data.ref;case rl:return Vt.data.toString();case Os:return Vt.data.map(function(Jr){return yt.invoke(sr,Jr)})}},yt.attribCache={};var Ht={};return yt.scopeAttrib=function(sr){var Vt=Zt.id(sr);if(Vt in Ht)return Ht[Vt];var Dr=yi.scope[Vt];Dr||(Dr=yi.scope[Vt]=new Ma);var Jr=Ht[Vt]=kt(Dr);return Jr},yt}function kn(yt){var kt=yt.static,Bt=yt.dynamic,nr;if(Be in kt){var hr=!!kt[Be];nr=rn(function(dr,ur){return hr}),nr.enable=hr}else if(Be in Bt){var lr=Bt[Be];nr=vn(lr,function(dr,ur){return dr.invoke(ur,lr)})}return nr}function Dn(yt,kt){var Bt=yt.static,nr=yt.dynamic;if(dt in Bt){var hr=Bt[dt];return hr?(hr=Ya.getFramebuffer(hr),rn(function(dr,ur){var Ht=dr.link(hr),sr=dr.shared;ur.set(sr.framebuffer,".next",Ht);var Vt=sr.context;return ur.set(Vt,"."+vt,Ht+".width"),ur.set(Vt,"."+Lt,Ht+".height"),Ht})):rn(function(dr,ur){var Ht=dr.shared;ur.set(Ht.framebuffer,".next","null");var sr=Ht.context;return ur.set(sr,"."+vt,sr+"."+yr),ur.set(sr,"."+Lt,sr+"."+Er),"null"})}else if(dt in nr){var lr=nr[dt];return vn(lr,function(dr,ur){var Ht=dr.invoke(ur,lr),sr=dr.shared,Vt=sr.framebuffer,Dr=ur.def(Vt,".getFramebuffer(",Ht,")");ur.set(Vt,".next",Dr);var Jr=sr.context;return ur.set(Jr,"."+vt,Dr+"?"+Dr+".width:"+Jr+"."+yr),ur.set(Jr,"."+Lt,Dr+"?"+Dr+".height:"+Jr+"."+Er),Dr})}else return null}function Zn(yt,kt,Bt){var nr=yt.static,hr=yt.dynamic;function lr(Ht){if(Ht in nr){var sr=nr[Ht],Vt=!0,Dr=sr.x|0,Jr=sr.y|0,ga,vi;return"width"in sr?ga=sr.width|0:Vt=!1,"height"in sr?vi=sr.height|0:Vt=!1,new La(!Vt&&kt&&kt.thisDep,!Vt&&kt&&kt.contextDep,!Vt&&kt&&kt.propDep,function(Zi,Fi){var ui=Zi.shared.context,_i=ga;"width"in sr||(_i=Fi.def(ui,".",vt,"-",Dr));var Si=vi;return"height"in sr||(Si=Fi.def(ui,".",Lt,"-",Jr)),[Dr,Jr,_i,Si]})}else if(Ht in hr){var Ga=hr[Ht],ai=vn(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,".",vt,"-",Si,")"),_o=Fi.def('"height" in ',ui,"?",ui,".height|0:","(",_i,".",Lt,"-",Ui,")");return[Si,Ui,fn,_o]});return kt&&(ai.thisDep=ai.thisDep||kt.thisDep,ai.contextDep=ai.contextDep||kt.contextDep,ai.propDep=ai.propDep||kt.propDep),ai}else return kt?new La(kt.thisDep,kt.contextDep,kt.propDep,function(Zi,Fi){var ui=Zi.shared.context;return[0,0,Fi.def(ui,".",vt),Fi.def(ui,".",Lt)]}):null}var dr=lr(Se);if(dr){var ur=dr;dr=new La(dr.thisDep,dr.contextDep,dr.propDep,function(Ht,sr){var Vt=ur.append(Ht,sr),Dr=Ht.shared.context;return sr.set(Dr,"."+At,Vt[2]),sr.set(Dr,"."+zt,Vt[3]),Vt})}return{viewport:dr,scissor_box:lr(we)}}function Ds(yt,kt){var Bt=yt.static,nr=typeof Bt[Nt]=="string"&&typeof Bt[St]=="string";if(nr){if(Object.keys(kt.dynamic).length>0)return null;var hr=kt.static,lr=Object.keys(hr);if(lr.length>0&&typeof hr[lr[0]]=="number"){for(var dr=[],ur=0;ur"+Si+"?"+Vt+".constant["+Si+"]:0;"}).join(""),"}}else{","if(",ga,"(",Vt,".buffer)){",Zi,"=",vi,".createStream(",Qr,",",Vt,".buffer);","}else{",Zi,"=",vi,".getBuffer(",Vt,".buffer);","}",Fi,'="type" in ',Vt,"?",Jr.glTypes,"[",Vt,".type]:",Zi,".dtype;",Ga.normalized,"=!!",Vt,".normalized;");function ui(_i){sr(Ga[_i],"=",Vt,".",_i,"|0;")}return ui("size"),ui("offset"),ui("stride"),ui("divisor"),sr("}}"),sr.exit("if(",Ga.isStream,"){",vi,".destroyStream(",Zi,");","}"),Ga}hr[lr]=vn(dr,ur)}),hr}function kl(yt){var kt=yt.static,Bt=yt.dynamic,nr={};return Object.keys(kt).forEach(function(hr){var lr=kt[hr];nr[hr]=rn(function(dr,ur){return typeof lr=="number"||typeof lr=="boolean"?""+lr:dr.link(lr)})}),Object.keys(Bt).forEach(function(hr){var lr=Bt[hr];nr[hr]=vn(lr,function(dr,ur){return dr.invoke(ur,lr)})}),nr}function tu(yt,kt,Bt,nr,hr){var lr=yt.static,dr=yt.dynamic,ur=Ds(yt,kt),Ht=Dn(yt,hr),sr=Zn(yt,Ht,hr),Vt=po(yt,hr),Dr=Wl(yt,hr),Jr=bl(yt,hr,ur);function ga(ui){var _i=sr[ui];_i&&(Dr[ui]=_i)}ga(Se),ga(Ri(we));var vi=Object.keys(Dr).length>0,Ga={framebuffer:Ht,draw:Vt,shader:Jr,state:Dr,dirty:vi,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(Ga.profile=kn(yt,hr),Ga.uniforms=fs(Bt,hr),Ga.drawVAO=Ga.scopeVAO=Vt.vao,!Ga.drawVAO&&Jr.program&&!ur&&fr.angle_instanced_arrays&&Vt.static.elements){var ai=!0,Zi=Jr.program.attributes.map(function(ui){var _i=kt.static[ui];return ai=ai&&!!_i,_i});if(ai&&Zi.length>0){var Fi=yi.getVAO(yi.createVAO({attributes:Zi,elements:Vt.static.elements}));Ga.drawVAO=new La(null,null,null,function(ui,_i){return ui.link(Fi)}),Ga.useVAO=!0}}return ur?Ga.useVAO=!0:Ga.attributes=Sl(kt,hr),Ga.context=kl(nr,hr),Ga}function qs(yt,kt,Bt){var nr=yt.shared,hr=nr.context,lr=yt.scope();Object.keys(Bt).forEach(function(dr){kt.save(hr,"."+dr);var ur=Bt[dr],Ht=ur.append(yt,kt);Array.isArray(Ht)?lr(hr,".",dr,"=[",Ht.join(),"];"):lr(hr,".",dr,"=",Ht,";")}),kt(lr)}function pl(yt,kt,Bt,nr){var hr=yt.shared,lr=hr.gl,dr=hr.framebuffer,ur;Va&&(ur=kt.def(hr.extensions,".webgl_draw_buffers"));var Ht=yt.constants,sr=Ht.drawBuffer,Vt=Ht.backBuffer,Dr;Bt?Dr=Bt.append(yt,kt):Dr=kt.def(dr,".next"),nr||kt("if(",Dr,"!==",dr,".cur){"),kt("if(",Dr,"){",lr,".bindFramebuffer(",da,",",Dr,".framebuffer);"),Va&&kt(ur,".drawBuffersWEBGL(",sr,"[",Dr,".colorAttachments.length]);"),kt("}else{",lr,".bindFramebuffer(",da,",null);"),Va&&kt(ur,".drawBuffersWEBGL(",Vt,");"),kt("}",dr,".cur=",Dr,";"),nr||kt("}")}function wl(yt,kt,Bt){var nr=yt.shared,hr=nr.gl,lr=yt.current,dr=yt.next,ur=nr.current,Ht=nr.next,sr=yt.cond(ur,".dirty");Ha.forEach(function(Vt){var Dr=Ri(Vt);if(!(Dr in Bt.state)){var Jr,ga;if(Dr in dr){Jr=dr[Dr],ga=lr[Dr];var vi=d(Li[Dr].length,function(ai){return sr.def(Jr,"[",ai,"]")});sr(yt.cond(vi.map(function(ai,Zi){return ai+"!=="+ga+"["+Zi+"]"}).join("||")).then(hr,".",Yi[Dr],"(",vi,");",vi.map(function(ai,Zi){return ga+"["+Zi+"]="+ai}).join(";"),";"))}else{Jr=sr.def(Ht,".",Dr);var Ga=yt.cond(Jr,"!==",ur,".",Dr);sr(Ga),Dr in Ua?Ga(yt.cond(Jr).then(hr,".enable(",Ua[Dr],");").else(hr,".disable(",Ua[Dr],");"),ur,".",Dr,"=",Jr,";"):Ga(hr,".",Yi[Dr],"(",Jr,");",ur,".",Dr,"=",Jr,";")}}}),Object.keys(Bt.state).length===0&&sr(ur,".dirty=false;"),kt(sr)}function Yn(yt,kt,Bt,nr){var hr=yt.shared,lr=yt.current,dr=hr.current,ur=hr.gl,Ht;ni(Object.keys(Bt)).forEach(function(sr){var Vt=Bt[sr];if(!(nr&&!nr(Vt))){var Dr=Vt.append(yt,kt);if(Ua[sr]){var Jr=Ua[sr];sn(Vt)?(Ht=yt.link(Dr,{stable:!0}),kt(yt.cond(Ht).then(ur,".enable(",Jr,");").else(ur,".disable(",Jr,");")),kt(dr,".",sr,"=",Ht,";")):(kt(yt.cond(Dr).then(ur,".enable(",Jr,");").else(ur,".disable(",Jr,");")),kt(dr,".",sr,"=",Dr,";"))}else if(ya(Dr)){var ga=lr[sr];kt(ur,".",Yi[sr],"(",Dr,");",Dr.map(function(vi,Ga){return ga+"["+Ga+"]="+vi}).join(";"),";")}else sn(Vt)?(Ht=yt.link(Dr,{stable:!0}),kt(ur,".",Yi[sr],"(",Ht,");",dr,".",sr,"=",Ht,";")):kt(ur,".",Yi[sr],"(",Dr,");",dr,".",sr,"=",Dr,";")}})}function Cl(yt,kt){di&&(yt.instancing=kt.def(yt.shared.extensions,".angle_instanced_arrays"))}function Co(yt,kt,Bt,nr,hr){var lr=yt.shared,dr=yt.stats,ur=lr.current,Ht=lr.timer,sr=Bt.profile;function Vt(){return typeof performance>"u"?"Date.now()":"performance.now()"}var Dr,Jr;function ga(ui){Dr=kt.def(),ui(Dr,"=",Vt(),";"),typeof hr=="string"?ui(dr,".count+=",hr,";"):ui(dr,".count++;"),Ei&&(nr?(Jr=kt.def(),ui(Jr,"=",Ht,".getNumPendingQueries();")):ui(Ht,".beginQuery(",dr,");"))}function vi(ui){ui(dr,".cpuTime+=",Vt(),"-",Dr,";"),Ei&&(nr?ui(Ht,".pushScopeStats(",Jr,",",Ht,".getNumPendingQueries(),",dr,");"):ui(Ht,".endQuery();"))}function Ga(ui){var _i=kt.def(ur,".profile");kt(ur,".profile=",ui,";"),kt.exit(ur,".profile=",_i,";")}var ai;if(sr){if(sn(sr)){sr.enable?(ga(kt),vi(kt.exit),Ga("true")):Ga("false");return}ai=sr.append(yt,kt),Ga(ai)}else ai=kt.def(ur,".profile");var Zi=yt.block();ga(Zi),kt("if(",ai,"){",Zi,"}");var Fi=yt.block();vi(Fi),kt.exit("if(",ai,"){",Fi,"}")}function ve(yt,kt,Bt,nr,hr){var lr=yt.shared;function dr(Ht){switch(Ht){case is:case ul:case Il:return 2;case Ao:case tl:case eu:return 3;case Zo:case Jo:case Ru:return 4;default:return 1}}function ur(Ht,sr,Vt){var Dr=lr.gl,Jr=kt.def(Ht,".location"),ga=kt.def(lr.attributes,"[",Jr,"]"),vi=Vt.state,Ga=Vt.buffer,ai=[Vt.x,Vt.y,Vt.z,Vt.w],Zi=["buffer","normalized","offset","stride"];function Fi(){kt("if(!",ga,".buffer){",Dr,".enableVertexAttribArray(",Jr,");}");var _i=Vt.type,Si;if(Vt.size?Si=kt.def(Vt.size,"||",sr):Si=sr,kt("if(",ga,".type!==",_i,"||",ga,".size!==",Si,"||",Zi.map(function(fn){return ga+"."+fn+"!=="+Vt[fn]}).join("||"),"){",Dr,".bindBuffer(",Qr,",",Ga,".buffer);",Dr,".vertexAttribPointer(",[Jr,Si,_i,Vt.normalized,Vt.stride,Vt.offset],");",ga,".type=",_i,";",ga,".size=",Si,";",Zi.map(function(fn){return ga+"."+fn+"="+Vt[fn]+";"}).join(""),"}"),di){var Ui=Vt.divisor;kt("if(",ga,".divisor!==",Ui,"){",yt.instancing,".vertexAttribDivisorANGLE(",[Jr,Ui],");",ga,".divisor=",Ui,";}")}}function ui(){kt("if(",ga,".buffer){",Dr,".disableVertexAttribArray(",Jr,");",ga,".buffer=null;","}if(",Qn.map(function(_i,Si){return ga+"."+_i+"!=="+ai[Si]}).join("||"),"){",Dr,".vertexAttrib4f(",Jr,",",ai,");",Qn.map(function(_i,Si){return ga+"."+_i+"="+ai[Si]+";"}).join(""),"}")}vi===eo?Fi():vi===fo?ui():(kt("if(",vi,"===",eo,"){"),Fi(),kt("}else{"),ui(),kt("}"))}nr.forEach(function(Ht){var sr=Ht.name,Vt=Bt.attributes[sr],Dr;if(Vt){if(!hr(Vt))return;Dr=Vt.append(yt,kt)}else{if(!hr(Pn))return;var Jr=yt.scopeAttrib(sr);Dr={},Object.keys(new Ma).forEach(function(ga){Dr[ga]=kt.def(Jr,".",ga)})}ur(yt.link(Ht),dr(Ht.info.type),Dr)})}function K(yt,kt,Bt,nr,hr,lr){for(var dr=yt.shared,ur=dr.gl,Ht,sr=0;sr1){for(var Bo=[],Ps=[],Do=0;Do>1)",Ga],");")}function Ui(){Bt(ai,".drawArraysInstancedANGLE(",[Jr,ga,vi,Ga],");")}Vt&&Vt!=="null"?Fi?Si():(Bt("if(",Vt,"){"),Si(),Bt("}else{"),Ui(),Bt("}")):Ui()}function _i(){function Si(){Bt(lr+".drawElements("+[Jr,vi,Zi,ga+"<<(("+Zi+"-"+ao+")>>1)"]+");")}function Ui(){Bt(lr+".drawArrays("+[Jr,ga,vi]+");")}Vt&&Vt!=="null"?Fi?Si():(Bt("if(",Vt,"){"),Si(),Bt("}else{"),Ui(),Bt("}")):Ui()}di&&(typeof Ga!="number"||Ga>=0)?typeof Ga=="string"?(Bt("if(",Ga,">0){"),ui(),Bt("}else if(",Ga,"<0){"),_i(),Bt("}")):ui():_i()}function te(yt,kt,Bt,nr,hr){var lr=an(),dr=lr.proc("body",hr);return di&&(lr.instancing=dr.def(lr.shared.extensions,".angle_instanced_arrays")),yt(lr,dr,Bt,nr),lr.compile().body}function me(yt,kt,Bt,nr){Cl(yt,kt),Bt.useVAO?Bt.drawVAO?kt(yt.shared.vao,".setVAO(",Bt.drawVAO.append(yt,kt),");"):kt(yt.shared.vao,".setVAO(",yt.shared.vao,".targetVAO);"):(kt(yt.shared.vao,".setVAO(null);"),ve(yt,kt,Bt,nr.attributes,function(){return!0})),K(yt,kt,Bt,nr.uniforms,function(){return!0},!1),_e(yt,kt,kt,Bt)}function Ge(yt,kt){var Bt=yt.proc("draw",1);Cl(yt,Bt),qs(yt,Bt,kt.context),pl(yt,Bt,kt.framebuffer),wl(yt,Bt,kt),Yn(yt,Bt,kt.state),Co(yt,Bt,kt,!1,!0);var nr=kt.shader.progVar.append(yt,Bt);if(Bt(yt.shared.gl,".useProgram(",nr,".program);"),kt.shader.program)me(yt,Bt,kt,kt.shader.program);else{Bt(yt.shared.vao,".setVAO(null);");var hr=yt.global.def("{}"),lr=Bt.def(nr,".id"),dr=Bt.def(hr,"[",lr,"]");Bt(yt.cond(dr).then(dr,".call(this,a0);").else(dr,"=",hr,"[",lr,"]=",yt.link(function(ur){return te(me,yt,kt,ur,1)}),"(",nr,");",dr,".call(this,a0);"))}Object.keys(kt.state).length>0&&Bt(yt.shared.current,".dirty=true;"),yt.shared.vao&&Bt(yt.shared.vao,".setVAO(null);")}function Le(yt,kt,Bt,nr){yt.batchId="a1",Cl(yt,kt);function hr(){return!0}ve(yt,kt,Bt,nr.attributes,hr),K(yt,kt,Bt,nr.uniforms,hr,!1),_e(yt,kt,kt,Bt)}function $e(yt,kt,Bt,nr){Cl(yt,kt);var hr=Bt.contextDep,lr=kt.def(),dr="a0",ur="a1",Ht=kt.def();yt.shared.props=Ht,yt.batchId=lr;var sr=yt.scope(),Vt=yt.scope();kt(sr.entry,"for(",lr,"=0;",lr,"<",ur,";++",lr,"){",Ht,"=",dr,"[",lr,"];",Vt,"}",sr.exit);function Dr(Zi){return Zi.contextDep&&hr||Zi.propDep}function Jr(Zi){return!Dr(Zi)}if(Bt.needsContext&&qs(yt,Vt,Bt.context),Bt.needsFramebuffer&&pl(yt,Vt,Bt.framebuffer),Yn(yt,Vt,Bt.state,Dr),Bt.profile&&Dr(Bt.profile)&&Co(yt,Vt,Bt,!1,!0),nr)Bt.useVAO?Bt.drawVAO?Dr(Bt.drawVAO)?Vt(yt.shared.vao,".setVAO(",Bt.drawVAO.append(yt,Vt),");"):sr(yt.shared.vao,".setVAO(",Bt.drawVAO.append(yt,sr),");"):sr(yt.shared.vao,".setVAO(",yt.shared.vao,".targetVAO);"):(sr(yt.shared.vao,".setVAO(null);"),ve(yt,sr,Bt,nr.attributes,Jr),ve(yt,Vt,Bt,nr.attributes,Dr)),K(yt,sr,Bt,nr.uniforms,Jr,!1),K(yt,Vt,Bt,nr.uniforms,Dr,!0),_e(yt,sr,Vt,Bt);else{var ga=yt.global.def("{}"),vi=Bt.shader.progVar.append(yt,Vt),Ga=Vt.def(vi,".id"),ai=Vt.def(ga,"[",Ga,"]");Vt(yt.shared.gl,".useProgram(",vi,".program);","if(!",ai,"){",ai,"=",ga,"[",Ga,"]=",yt.link(function(Zi){return te(Le,yt,Bt,Zi,2)}),"(",vi,");}",ai,".call(this,a0[",lr,"],",lr,");")}}function gt(yt,kt){var Bt=yt.proc("batch",2);yt.batchId="0",Cl(yt,Bt);var nr=!1,hr=!0;Object.keys(kt.context).forEach(function(ga){nr=nr||kt.context[ga].propDep}),nr||(qs(yt,Bt,kt.context),hr=!1);var lr=kt.framebuffer,dr=!1;lr?(lr.propDep?nr=dr=!0:lr.contextDep&&nr&&(dr=!0),dr||pl(yt,Bt,lr)):pl(yt,Bt,null),kt.state.viewport&&kt.state.viewport.propDep&&(nr=!0);function ur(ga){return ga.contextDep&&nr||ga.propDep}wl(yt,Bt,kt),Yn(yt,Bt,kt.state,function(ga){return!ur(ga)}),(!kt.profile||!ur(kt.profile))&&Co(yt,Bt,kt,!1,"a1"),kt.contextDep=nr,kt.needsContext=hr,kt.needsFramebuffer=dr;var Ht=kt.shader.progVar;if(Ht.contextDep&&nr||Ht.propDep)$e(yt,Bt,kt,null);else{var sr=Ht.append(yt,Bt);if(Bt(yt.shared.gl,".useProgram(",sr,".program);"),kt.shader.program)$e(yt,Bt,kt,kt.shader.program);else{Bt(yt.shared.vao,".setVAO(null);");var Vt=yt.global.def("{}"),Dr=Bt.def(sr,".id"),Jr=Bt.def(Vt,"[",Dr,"]");Bt(yt.cond(Jr).then(Jr,".call(this,a0,a1);").else(Jr,"=",Vt,"[",Dr,"]=",yt.link(function(ga){return te($e,yt,kt,ga,2)}),"(",sr,");",Jr,".call(this,a0,a1);"))}}Object.keys(kt.state).length>0&&Bt(yt.shared.current,".dirty=true;"),yt.shared.vao&&Bt(yt.shared.vao,".setVAO(null);")}function jt(yt,kt){var Bt=yt.proc("scope",3);yt.batchId="a2";var nr=yt.shared,hr=nr.current;if(qs(yt,Bt,kt.context),kt.framebuffer&&kt.framebuffer.append(yt,Bt),ni(Object.keys(kt.state)).forEach(function(ur){var Ht=kt.state[ur],sr=Ht.append(yt,Bt);ya(sr)?sr.forEach(function(Vt,Dr){Xi(Vt)?Bt.set(yt.next[ur],"["+Dr+"]",Vt):Bt.set(yt.next[ur],"["+Dr+"]",yt.link(Vt,{stable:!0}))}):sn(Ht)?Bt.set(nr.next,"."+ur,yt.link(sr,{stable:!0})):Bt.set(nr.next,"."+ur,sr)}),Co(yt,Bt,kt,!0,!0),[$t,Kr,Ar,na,Tr].forEach(function(ur){var Ht=kt.draw[ur];if(Ht){var sr=Ht.append(yt,Bt);Xi(sr)?Bt.set(nr.draw,"."+ur,sr):Bt.set(nr.draw,"."+ur,yt.link(sr),{stable:!0})}}),Object.keys(kt.uniforms).forEach(function(ur){var Ht=kt.uniforms[ur].append(yt,Bt);Array.isArray(Ht)&&(Ht="["+Ht.map(function(sr){return Xi(sr)?sr:yt.link(sr,{stable:!0})})+"]"),Bt.set(nr.uniforms,"["+yt.link(Zt.id(ur),{stable:!0})+"]",Ht)}),Object.keys(kt.attributes).forEach(function(ur){var Ht=kt.attributes[ur].append(yt,Bt),sr=yt.scopeAttrib(ur);Object.keys(new Ma).forEach(function(Vt){Bt.set(sr,"."+Vt,Ht[Vt])})}),kt.scopeVAO){var lr=kt.scopeVAO.append(yt,Bt);Xi(lr)?Bt.set(nr.vao,".targetVAO",lr):Bt.set(nr.vao,".targetVAO",yt.link(lr,{stable:!0}))}function dr(ur){var Ht=kt.shader[ur];if(Ht){var sr=Ht.append(yt,Bt);Xi(sr)?Bt.set(nr.shader,"."+ur,sr):Bt.set(nr.shader,"."+ur,yt.link(sr,{stable:!0}))}}dr(St),dr(Nt),Object.keys(kt.state).length>0&&(Bt(hr,".dirty=true;"),Bt.exit(hr,".dirty=true;")),Bt("a1(",yt.shared.context,",a0,",yt.batchId,");")}function wr(yt){if(!(typeof yt!="object"||ya(yt))){for(var kt=Object.keys(yt),Bt=0;Bt=0;--te){var me=mn[te];me&&me(Na,null,0)}fr.flush(),si&&si.update()}function Zn(){!kn&&mn.length>0&&(kn=c.next(Dn))}function Ds(){kn&&(c.cancel(Dn),kn=null)}function bl(te){te.preventDefault(),wa=!0,Ds(),In.forEach(function(me){me()})}function po(te){fr.getError(),wa=!1,ma.restore(),pn.restore(),di.restore(),Ha.restore(),Ua.restore(),Yi.restore(),Bi.restore(),si&&si.restore(),Ri.procs.refresh(),Zn(),Ii.forEach(function(me){me()})}Xi&&(Xi.addEventListener(cs,bl,!1),Xi.addEventListener(ms,po,!1));function Wl(){mn.length=0,Ds(),Xi&&(Xi.removeEventListener(cs,bl),Xi.removeEventListener(ms,po)),pn.clear(),Yi.clear(),Ua.clear(),Bi.clear(),Ha.clear(),Va.clear(),di.clear(),si&&si.clear(),an.forEach(function(te){te()})}function fs(te){function me(lr){var dr=v({},lr);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 ur(Ht){if(Ht in dr){var sr=dr[Ht];delete dr[Ht],Object.keys(sr).forEach(function(Vt){dr[Ht+"."+Vt]=sr[Vt]})}}return ur("blend"),ur("depth"),ur("cull"),ur("stencil"),ur("polygonOffset"),ur("scissor"),ur("sample"),"vao"in lr&&(dr.vao=lr.vao),dr}function Ge(lr,dr){var ur={},Ht={};return Object.keys(lr).forEach(function(sr){var Vt=lr[sr];if(h.isDynamic(Vt)){Ht[sr]=h.unbox(Vt,sr);return}else if(dr&&Array.isArray(Vt)){for(var Dr=0;Dr0)return yt.call(this,nr(lr|0),lr|0)}else if(Array.isArray(lr)){if(lr.length)return yt.call(this,lr,lr.length)}else return pr.call(this,lr)}return v(hr,{stats:wr,destroy:function(){Nr.destroy()}})}var Sl=Yi.setFBO=fs({framebuffer:h.define.call(null,Al,"framebuffer")});function kl(te,me){var Ge=0;Ri.procs.poll();var Le=me.color;Le&&(fr.clearColor(+Le[0]||0,+Le[1]||0,+Le[2]||0,+Le[3]||0),Ge|=al),"depth"in me&&(fr.clearDepth(+me.depth),Ge|=xl),"stencil"in me&&(fr.clearStencil(me.stencil|0),Ge|=gn),fr.clear(Ge)}function tu(te){if("framebuffer"in te)if(te.framebuffer&&te.framebuffer_reglType==="framebufferCube")for(var me=0;me<6;++me)Sl(v({framebuffer:te.framebuffer.faces[me]},te),kl);else Sl(te,kl);else kl(null,te)}function qs(te){mn.push(te);function me(){var Ge=Rl(mn,te);function Le(){var $e=Rl(mn,Le);mn[$e]=mn[mn.length-1],mn.length-=1,mn.length<=0&&Ds()}mn[Ge]=Le}return Zn(),{cancel:me}}function pl(){var te=xi.viewport,me=xi.scissor_box;te[0]=te[1]=me[0]=me[1]=0,Na.viewportWidth=Na.framebufferWidth=Na.drawingBufferWidth=te[2]=me[2]=fr.drawingBufferWidth,Na.viewportHeight=Na.framebufferHeight=Na.drawingBufferHeight=te[3]=me[3]=fr.drawingBufferHeight}function wl(){Na.tick+=1,Na.time=Cl(),pl(),Ri.procs.poll()}function Yn(){Ha.refresh(),pl(),Ri.procs.refresh(),si&&si.update()}function Cl(){return(m()-yn)/1e3}Yn();function Co(te,me){var Ge;switch(te){case"frame":return qs(me);case"lost":Ge=In;break;case"restore":Ge=Ii;break;case"destroy":Ge=an;break;default:}return Ge.push(me),{cancel:function(){for(var Le=0;Le=0},read:Ti,destroy:Wl,_gl:fr,_refresh:Yn,poll:function(){wl(),si&&si.update()},now:Cl,stats:Ya,getCachedCode:ve,preloadCachedCode:K});return Zt.onDone(null,_e),_e}return _c})}}),xq=Xe({"node_modules/gl-util/context.js"(Z,G){"use strict";var v=Ev();G.exports=function(o){if(o?typeof o=="string"&&(o={container:o}):o={},S(o)?o={container:o}:E(o)?o={container:o}:e(o)?o={gl:o}:o=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),x(o))}else if(!o.canvas)if(typeof document<"u")o.container=document.body||document.documentElement,o.canvas=t(),o.container.appendChild(o.canvas),x(o);else throw Error("Not DOM environment. Use headless-gl.");return o.gl||["webgl","experimental-webgl","webgl-experimental"].some(function(n){try{o.gl=o.canvas.getContext(n,o.attrs)}catch{}return o.gl}),o.gl};function x(r){if(r.container)if(r.container==document.body)document.body.style.width||(r.canvas.width=r.width||r.pixelRatio*window.innerWidth),document.body.style.height||(r.canvas.height=r.height||r.pixelRatio*window.innerHeight);else{var o=r.container.getBoundingClientRect();r.canvas.width=r.width||o.right-o.left,r.canvas.height=r.height||o.bottom-o.top}}function S(r){return typeof r.getContext=="function"&&"width"in r&&"height"in r}function E(r){return typeof r.nodeName=="string"&&typeof r.appendChild=="function"&&typeof r.getBoundingClientRect=="function"}function e(r){return typeof r.drawArrays=="function"||typeof r.drawElements=="function"}function t(){var r=document.createElement("canvas");return r.style.position="absolute",r.style.top=0,r.style.left=0,r}}}),bq=Xe({"node_modules/font-atlas/index.js"(Z,G){"use strict";var v=c6(),x=[32,126];G.exports=S;function S(E){E=E||{};var e=E.shape?E.shape:E.canvas?[E.canvas.width,E.canvas.height]:[512,512],t=E.canvas||document.createElement("canvas"),r=E.font,o=typeof E.step=="number"?[E.step,E.step]:E.step||[32,32],a=E.chars||x;if(r&&typeof r!="string"&&(r=v(r)),!Array.isArray(a))a=String(a).split("");else if(a.length===2&&typeof a[0]=="number"&&typeof a[1]=="number"){for(var n=[],i=a[0],s=0;i<=a[1];i++)n[s++]=String.fromCharCode(i);a=n}e=e.slice(),t.width=e[0],t.height=e[1];var h=t.getContext("2d");h.fillStyle="#000",h.fillRect(0,0,t.width,t.height),h.font=r,h.textAlign="center",h.textBaseline="middle",h.fillStyle="#fff";for(var c=o[0]/2,m=o[1]/2,i=0;ie[0]-o[0]/2&&(c=o[0]/2,m+=o[1]);return t}}}),f6=Xe({"node_modules/bit-twiddle/twiddle.js"(Z){"use strict";"use restrict";var G=32;Z.INT_BITS=G,Z.INT_MAX=2147483647,Z.INT_MIN=-1<0)-(S<0)},Z.abs=function(S){var E=S>>G-1;return(S^E)-E},Z.min=function(S,E){return E^(S^E)&-(S65535)<<4,S>>>=E,e=(S>255)<<3,S>>>=e,E|=e,e=(S>15)<<2,S>>>=e,E|=e,e=(S>3)<<1,S>>>=e,E|=e,E|S>>1},Z.log10=function(S){return S>=1e9?9:S>=1e8?8:S>=1e7?7:S>=1e6?6:S>=1e5?5:S>=1e4?4:S>=1e3?3:S>=100?2:S>=10?1:0},Z.popCount=function(S){return S=S-(S>>>1&1431655765),S=(S&858993459)+(S>>>2&858993459),(S+(S>>>4)&252645135)*16843009>>>24};function v(S){var E=32;return S&=-S,S&&E--,S&65535&&(E-=16),S&16711935&&(E-=8),S&252645135&&(E-=4),S&858993459&&(E-=2),S&1431655765&&(E-=1),E}Z.countTrailingZeros=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 x=new Array(256);(function(S){for(var E=0;E<256;++E){var e=E,t=E,r=7;for(e>>>=1;e;e>>>=1)t<<=1,t|=e&1,--r;S[E]=t<>>8&255]<<16|x[S>>>16&255]<<8|x[S>>>24&255]},Z.interleave2=function(S,E){return S&=65535,S=(S|S<<8)&16711935,S=(S|S<<4)&252645135,S=(S|S<<2)&858993459,S=(S|S<<1)&1431655765,E&=65535,E=(E|E<<8)&16711935,E=(E|E<<4)&252645135,E=(E|E<<2)&858993459,E=(E|E<<1)&1431655765,S|E<<1},Z.deinterleave2=function(S,E){return S=S>>>E&1431655765,S=(S|S>>>1)&858993459,S=(S|S>>>2)&252645135,S=(S|S>>>4)&16711935,S=(S|S>>>16)&65535,S<<16>>16},Z.interleave3=function(S,E,e){return S&=1023,S=(S|S<<16)&4278190335,S=(S|S<<8)&251719695,S=(S|S<<4)&3272356035,S=(S|S<<2)&1227133513,E&=1023,E=(E|E<<16)&4278190335,E=(E|E<<8)&251719695,E=(E|E<<4)&3272356035,E=(E|E<<2)&1227133513,S|=E<<1,e&=1023,e=(e|e<<16)&4278190335,e=(e|e<<8)&251719695,e=(e|e<<4)&3272356035,e=(e|e<<2)&1227133513,S|e<<2},Z.deinterleave3=function(S,E){return S=S>>>E&1227133513,S=(S|S>>>2)&3272356035,S=(S|S>>>4)&251719695,S=(S|S>>>8)&4278190335,S=(S|S>>>16)&1023,S<<22>>22},Z.nextCombination=function(S){var E=S|S-1;return E+1|(~E&-~E)-1>>>v(S)+1}}}),wq=Xe({"node_modules/dup/dup.js"(Z,G){"use strict";function v(E,e,t){var r=E[t]|0;if(r<=0)return[];var o=new Array(r),a;if(t===E.length-1)for(a=0;a"u"&&(e=0),typeof E){case"number":if(E>0)return x(E|0,e);break;case"object":if(typeof E.length=="number")return v(E,e,0);break}return[]}G.exports=S}}),Tq=Xe({"node_modules/typedarray-pool/pool.js"(Z){"use strict";var G=f6(),v=wq(),x=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",E=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(x.isBuffer(u))o[G.log2(u.length)].push(u);else{if(Object.prototype.toString.call(u)!=="[object ArrayBuffer]"&&(u=u.buffer),!u)return;var y=u.length||u.byteLength,f=G.log2(y)|0;r[f].push(u)}};function a(d){if(d){var u=d.length||d.byteLength,y=G.log2(u);r[y].push(d)}}function n(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=n,Z.freeArrayBuffer=a,Z.freeBuffer=function(u){o[G.log2(u.length)].push(u)},Z.malloc=function(u,y){if(y===void 0||y==="arraybuffer")return i(u);switch(y){case"uint8":return s(u);case"uint16":return h(u);case"uint32":return c(u);case"int8":return m(u);case"int16":return p(u);case"int32":return T(u);case"float":case"float32":return l(u);case"double":case"float64":return _(u);case"uint8_clamped":return w(u);case"bigint64":return M(u);case"biguint64":return A(u);case"buffer":return b(u);case"data":case"dataview":return g(u);default:return null}return null};function i(u){var u=G.nextPow2(u),y=G.log2(u),f=r[y];return f.length>0?f.pop():new ArrayBuffer(u)}Z.mallocArrayBuffer=i;function s(d){return new Uint8Array(i(d),0,d)}Z.mallocUint8=s;function h(d){return new Uint16Array(i(2*d),0,d)}Z.mallocUint16=h;function c(d){return new Uint32Array(i(4*d),0,d)}Z.mallocUint32=c;function m(d){return new Int8Array(i(d),0,d)}Z.mallocInt8=m;function p(d){return new Int16Array(i(2*d),0,d)}Z.mallocInt16=p;function T(d){return new Int32Array(i(4*d),0,d)}Z.mallocInt32=T;function l(d){return new Float32Array(i(4*d),0,d)}Z.mallocFloat32=Z.mallocFloat=l;function _(d){return new Float64Array(i(8*d),0,d)}Z.mallocFloat64=Z.mallocDouble=_;function w(d){return S?new Uint8ClampedArray(i(d),0,d):s(d)}Z.mallocUint8Clamped=w;function A(d){return E?new BigUint64Array(i(8*d),0,d):null}Z.mallocBigUint64=A;function M(d){return e?new BigInt64Array(i(8*d),0,d):null}Z.mallocBigInt64=M;function g(d){return new DataView(i(d),0,d)}Z.mallocDataView=g;function b(d){d=G.nextPow2(d);var u=G.log2(d),y=o[u];return y.length>0?y.pop():new x(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}}}),Aq=Xe({"node_modules/is-plain-obj/index.js"(Z,G){"use strict";var v=Object.prototype.toString;G.exports=function(x){var S;return v.call(x)==="[object Object]"&&(S=Object.getPrototypeOf(x),S===null||S===Object.getPrototypeOf({}))}}}),h6=Xe({"node_modules/parse-unit/index.js"(Z,G){G.exports=function(x,S){S||(S=[0,""]),x=String(x);var E=parseFloat(x,10);return S[0]=E,S[1]=x.match(/[\d.\-\+]*\s*(.*)/)[1]||"",S}}}),Sq=Xe({"node_modules/to-px/topx.js"(Z,G){"use strict";var v=h6();G.exports=e;var x=96;function S(t,r){var o=v(getComputedStyle(t).getPropertyValue(r));return o[0]*e(o[1],t)}function E(t,r){var o=document.createElement("div");o.style["font-size"]="128"+t,r.appendChild(o);var a=S(o,"font-size")/128;return r.removeChild(o),a}function e(t,r){switch(r=r||document.body,t=(t||"px").trim().toLowerCase(),(r===window||r===document)&&(r=document.body),t){case"%":return r.clientHeight/100;case"ch":case"ex":return E(t,r);case"em":return S(r,"font-size");case"rem":return S(document.body,"font-size");case"vw":return window.innerWidth/100;case"vh":return window.innerHeight/100;case"vmin":return Math.min(window.innerWidth,window.innerHeight)/100;case"vmax":return Math.max(window.innerWidth,window.innerHeight)/100;case"in":return x;case"cm":return x/2.54;case"mm":return x/25.4;case"pt":return x/72;case"pc":return x/6}return 1}}}),Mq=Xe({"node_modules/detect-kerning/index.js"(Z,G){"use strict";G.exports=E;var v=E.canvas=document.createElement("canvas"),x=v.getContext("2d"),S=e([32,126]);E.createPairs=e,E.ascii=S;function E(t,r){Array.isArray(t)&&(t=t.join(", "));var o={},a,n=16,i=.05;r&&(r.length===2&&typeof r[0]=="number"?a=e(r):Array.isArray(r)?a=r:(r.o?a=e(r.o):r.pairs&&(a=r.pairs),r.fontSize&&(n=r.fontSize),r.threshold!=null&&(i=r.threshold))),a||(a=S),x.font=n+"px "+t;for(var s=0;sn*i){var p=(m-c)/n;o[h]=p*1e3}}return o}function e(t){for(var r=[],o=t[0];o<=t[1];o++)for(var a=String.fromCharCode(o),n=t[0];n0;o-=4)if(r[o]!==0)return Math.floor((o-3)*.25/t)}}}),kq=Xe({"node_modules/gl-text/dist.js"(Z,G){"use strict";var v=yq(),x=Ev(),S=_q(),E=xq(),e=r6(),t=d0(),r=bq(),o=Tq(),a=C1(),n=Aq(),i=h6(),s=Sq(),h=Mq(),c=ch(),m=Eq(),p=gg(),T=f6(),l=T.nextPow2,_=new e,w=!1;document.body&&(A=document.body.appendChild(document.createElement("div")),A.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(A).fontStretch&&(w=!0),document.body.removeChild(A));var A,M=function(d){g(d)?(d={regl:d},this.gl=d.regl._gl):this.gl=E(d),this.shader=_.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(),_.set(this.gl,this.shader)),this.batch=[],this.fontSize=[],this.font=[],this.fontAtlas=[],this.draw=this.shader.draw.bind(this),this.render=function(){this.regl._refresh(),this.draw(this.batch)},this.canvas=this.gl.canvas,this.update(n(d)?d:{})};M.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(f,R){return[R.atlas.width,R.atlas.height]},atlasDim:function(f,R){return[R.atlas.cols,R.atlas.rows]},atlas:function(f,R){return R.atlas.texture},charStep:function(f,R){return R.atlas.step},em:function(f,R){return R.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; uniform float fontSize, charStep, em, align, baseline; uniform vec4 viewport; uniform vec4 color; uniform vec2 atlasSize, atlasDim, scale, translate, positionOffset; varying vec2 charCoord, charId; varying float charWidth; varying vec4 fontColor; void main () { vec2 offset = floor(em * (vec2(align + charOffset, baseline) + vec2(positionOffset.x, -positionOffset.y))) / (viewport.zw * scale.xy); vec2 position = (position + translate) * scale; position += offset * scale; charCoord = position * viewport.zw + viewport.xy; gl_Position = vec4(position * 2. - 1., 0, 1); gl_PointSize = charStep; charId.x = mod(char, atlasDim.x); charId.y = floor(char / atlasDim.x); charWidth = width * em; fontColor = color / 255.; }`,frag:` precision highp float; uniform float fontSize, charStep, opacity; uniform vec2 atlasSize; uniform vec4 viewport; uniform sampler2D atlas; varying vec4 fontColor; varying vec2 charCoord, charId; varying float charWidth; float lightness(vec4 color) { return color.r * 0.299 + color.g * 0.587 + color.b * 0.114; } void main () { vec2 uv = gl_FragCoord.xy - charCoord + charStep * .5; float halfCharStep = floor(charStep * .5 + .5); // invert y and shift by 1px (FF expecially needs that) uv.y = charStep - uv.y; // ignore points outside of character bounding box float halfCharWidth = ceil(charWidth * .5); if (floor(uv.x) > halfCharStep + halfCharWidth || floor(uv.x) < halfCharStep - halfCharWidth) return; uv += charId * charStep; uv = uv / atlasSize; vec4 color = fontColor; vec4 mask = texture2D(atlas, uv); float maskY = lightness(mask); // float colorY = lightness(color); color.a *= maskY; color.a *= opacity; // color.a += .1; // antialiasing, see yiq color space y-channel formula // color.rgb += (1. - color.rgb) * (1. - mask.rgb); gl_FragColor = color; }`}),y={};return{regl:d,draw:u,atlas:y}},M.prototype.update=function(d){var u=this;if(typeof d=="string")d={text:d};else if(!d)return;d=x(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(he){return parseFloat(he)}):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=p(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=M.baseFontSize+"px sans-serif");var y=!1,f=!1;if(d.font&&(Array.isArray(d.font)?d.font:[d.font]).forEach(function(he,Oe){if(typeof he=="string")try{he=v.parse(he)}catch{he=v.parse(M.baseFontSize+"px "+he)}else{var tt=he.style,ot=he.weight,Qe=he.stretch,Pt=he.variant;he=v.parse(v.stringify(he)),tt&&(he.style=tt),ot&&(he.weight=ot),Qe&&(he.stretch=Qe),Pt&&(he.variant=Pt)}var It=v.stringify({size:M.baseFontSize,family:he.family,stretch:w?he.stretch:void 0,variant:he.variant,weight:he.weight,style:he.style}),qt=i(he.size),Wt=Math.round(qt[0]*s(qt[1]));if(Wt!==u.fontSize[Oe]&&(f=!0,u.fontSize[Oe]=Wt),(!u.font[Oe]||It!=u.font[Oe].baseString)&&(y=!0,u.font[Oe]=M.fonts[It],!u.font[Oe])){var kr=he.family.join(", "),mr=[he.style];he.style!=he.variant&&mr.push(he.variant),he.variant!=he.weight&&mr.push(he.weight),w&&he.weight!=he.stretch&&mr.push(he.stretch),u.font[Oe]={baseString:It,family:kr,weight:he.weight,stretch:he.stretch,style:he.style,variant:he.variant,width:{},kerning:{},metrics:m(kr,{origin:"top",fontSize:M.baseFontSize,fontStyle:mr.join(" ")})},M.fonts[It]=u.font[Oe]}}),(y||f)&&this.font.forEach(function(he,Oe){var tt=v.stringify({size:u.fontSize[Oe],family:he.family,stretch:w?he.stretch:void 0,variant:he.variant,weight:he.weight,style:he.style});if(u.fontAtlas[Oe]=u.shader.atlas[tt],!u.fontAtlas[Oe]){var ot=he.metrics;u.shader.atlas[tt]=u.fontAtlas[Oe]={fontString:tt,step:Math.ceil(u.fontSize[Oe]*ot.bottom*.5)*2,em:u.fontSize[Oe],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 R=Array(d.position.length*.5),L=0;L2){for(var N=!d.position[0].length,O=o.mallocFloat(this.count*2),P=0,U=0;P1?u.align[Oe]:u.align[0]:u.align;if(typeof tt=="number")return tt;switch(tt){case"right":case"end":return-he;case"center":case"centre":case"middle":return-he*.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(he,Oe){var tt=(u.font[Oe]||u.font[0]).metrics,ot=0;return ot+=tt.bottom*.5,typeof he=="number"?ot+=he-tt.baseline:ot+=-tt[he],ot*=-1,ot})),d.color!=null)if(d.color||(d.color="transparent"),typeof d.color=="string"||!isNaN(d.color))this.color=t(d.color,"uint8");else{var De;if(typeof d.color[0]=="number"&&d.color.length>this.counts.length){var ze=d.color.length;De=o.mallocUint8(ze);for(var Ze=(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(st){var Me=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(Me);for(var ye=0;ye1?this.counts[ye]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[ye]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(ye*4,ye*4+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[ye]:this.opacity,baseline:this.baselineOffset[ye]!=null?this.baselineOffset[ye]:this.baselineOffset[0],align:this.align?this.alignOffset[ye]!=null?this.alignOffset[ye]:this.alignOffset[0]:0,atlas:this.fontAtlas[ye]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(ye*2,ye*2+2):this.positionOffset}}else this.count?this.batch=[{count:this.count,offset:0,color:this.color||[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[0]:this.opacity,baseline:this.baselineOffset[0],align:this.alignOffset?this.alignOffset[0]:0,atlas:this.fontAtlas[0],positionOffset:this.positionOffset}]:this.batch=[]}},M.prototype.destroy=function(){},M.prototype.kerning=!0,M.prototype.position={constant:new Float32Array(2)},M.prototype.translate=null,M.prototype.scale=null,M.prototype.font=null,M.prototype.text="",M.prototype.positionOffset=[0,0],M.prototype.opacity=1,M.prototype.color=new Uint8Array([0,0,0,255]),M.prototype.alignOffset=[0,0],M.maxAtlasSize=1024,M.atlasCanvas=document.createElement("canvas"),M.atlasContext=M.atlasCanvas.getContext("2d",{alpha:!1}),M.baseFontSize=64,M.fonts={};function g(b){return typeof b=="function"&&b._gl&&b.prop&&b.texture&&b.buffer}G.exports=M}}),Cq=Xe({"node_modules/@plotly/regl/dist/regl.unchecked.js"(Z,G){(function(v,x){typeof Z=="object"&&typeof G<"u"?G.exports=x():v.createREGL=x()})(Z,function(){"use strict";var v=function(it,Zt){for(var fr=Object.keys(Zt),oa=0;oa1&&Zt===fr&&(Zt==='"'||Zt==="'"))return['"'+r(it.substr(1,it.length-2))+'"'];var oa=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(it);if(oa)return o(it.substr(0,oa.index)).concat(o(oa[1])).concat(o(it.substr(oa.index+oa[0].length)));var wa=it.split(".");if(wa.length===1)return['"'+r(it)+'"'];for(var ma=[],_a=0;_a"u"?1:window.devicePixelRatio,si=!1,yn={},zi=function(ea){},Ei=function(){};if(typeof Zt=="string"?fr=document.querySelector(Zt):typeof Zt=="object"&&(_(Zt)?fr=Zt:w(Zt)?(ma=Zt,wa=ma.canvas):("gl"in Zt?ma=Zt.gl:"canvas"in Zt?wa=M(Zt.canvas):"container"in Zt&&(oa=M(Zt.container)),"attributes"in Zt&&(_a=Zt.attributes),"extensions"in Zt&&(Ya=A(Zt.extensions)),"optionalExtensions"in Zt&&(bi=A(Zt.optionalExtensions)),"onDone"in Zt&&(zi=Zt.onDone),"profile"in Zt&&(si=!!Zt.profile),"pixelRatio"in Zt&&(yi=+Zt.pixelRatio),"cachedCode"in Zt&&(yn=Zt.cachedCode))),fr&&(fr.nodeName.toLowerCase()==="canvas"?wa=fr:oa=fr),!ma){if(!wa){var Na=T(oa||document.body,zi,yi);if(!Na)return null;wa=Na.canvas,Ei=Na.onDestroy}_a.premultipliedAlpha===void 0&&(_a.premultipliedAlpha=!0),ma=l(wa,_a)}return ma?{gl:ma,canvas:wa,container:oa,extensions:Ya,optionalExtensions:bi,pixelRatio:yi,profile:si,cachedCode:yn,onDone:zi,onDestroy:Ei}:(Ei(),zi("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function b(it,Zt){var fr={};function oa(_a){var Ya=_a.toLowerCase(),bi;try{bi=fr[Ya]=it.getExtension(Ya)}catch{}return!!bi}for(var wa=0;wa65535)<<4,it>>>=Zt,fr=(it>255)<<3,it>>>=fr,Zt|=fr,fr=(it>15)<<2,it>>>=fr,Zt|=fr,fr=(it>3)<<1,it>>>=fr,Zt|=fr,Zt|it>>1}function P(){var it=d(8,function(){return[]});function Zt(ma){var _a=N(ma),Ya=it[O(_a)>>2];return Ya.length>0?Ya.pop():new ArrayBuffer(_a)}function fr(ma){it[O(ma.byteLength)>>2].push(ma)}function oa(ma,_a){var Ya=null;switch(ma){case u:Ya=new Int8Array(Zt(_a),0,_a);break;case y:Ya=new Uint8Array(Zt(_a),0,_a);break;case f:Ya=new Int16Array(Zt(2*_a),0,_a);break;case R:Ya=new Uint16Array(Zt(2*_a),0,_a);break;case L:Ya=new Int32Array(Zt(4*_a),0,_a);break;case z:Ya=new Uint32Array(Zt(4*_a),0,_a);break;case F:Ya=new Float32Array(Zt(4*_a),0,_a);break;default:return null}return Ya.length!==_a?Ya.subarray(0,_a):Ya}function wa(ma){fr(ma.buffer)}return{alloc:Zt,free:fr,allocType:oa,freeType:wa}}var U=P();U.zero=P();var B=3408,X=3410,$=3411,se=3412,le=3413,fe=3414,V=3415,Y=33901,ee=33902,q=3379,oe=3386,ae=34921,j=36347,Q=36348,re=35661,ce=35660,be=34930,Ae=36349,De=34076,ze=34024,Ze=7936,at=7937,nt=7938,rt=35724,st=34047,Me=36063,ye=34852,he=3553,Oe=34067,tt=34069,ot=33984,Qe=6408,Pt=5126,It=5121,qt=36160,Wt=36053,kr=36064,mr=16384,qr=function(it,Zt){var fr=1;Zt.ext_texture_filter_anisotropic&&(fr=it.getParameter(st));var oa=1,wa=1;Zt.webgl_draw_buffers&&(oa=it.getParameter(ye),wa=it.getParameter(Me));var ma=!!Zt.oes_texture_float;if(ma){var _a=it.createTexture();it.bindTexture(he,_a),it.texImage2D(he,0,Qe,1,1,0,Qe,Pt,null);var Ya=it.createFramebuffer();if(it.bindFramebuffer(qt,Ya),it.framebufferTexture2D(qt,kr,he,_a,0),it.bindTexture(he,null),it.checkFramebufferStatus(qt)!==Wt)ma=!1;else{it.viewport(0,0,1,1),it.clearColor(1,0,0,1),it.clear(mr);var bi=U.allocType(Pt,4);it.readPixels(0,0,1,1,Qe,Pt,bi),it.getError()?ma=!1:(it.deleteFramebuffer(Ya),it.deleteTexture(_a),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 yn=it.createTexture(),zi=U.allocType(It,36);it.activeTexture(ot),it.bindTexture(Oe,yn),it.texImage2D(tt,0,Qe,3,3,0,Qe,It,zi),U.freeType(zi),it.bindTexture(Oe,null),it.deleteTexture(yn),si=!it.getError()}return{colorBits:[it.getParameter(X),it.getParameter($),it.getParameter(se),it.getParameter(le)],depthBits:it.getParameter(fe),stencilBits:it.getParameter(V),subpixelBits:it.getParameter(B),extensions:Object.keys(Zt).filter(function(Ei){return!!Zt[Ei]}),maxAnisotropic:fr,maxDrawbuffers:oa,maxColorAttachments:wa,pointSizeDims:it.getParameter(Y),lineWidthDims:it.getParameter(ee),maxViewportDims:it.getParameter(oe),maxCombinedTextureUnits:it.getParameter(re),maxCubeMapSize:it.getParameter(De),maxRenderbufferSize:it.getParameter(ze),maxTextureUnits:it.getParameter(be),maxTextureSize:it.getParameter(q),maxAttributes:it.getParameter(ae),maxVertexUniforms:it.getParameter(j),maxVertexTextureUnits:it.getParameter(ce),maxVaryingVectors:it.getParameter(Q),maxFragmentUniforms:it.getParameter(Ae),glsl:it.getParameter(rt),renderer:it.getParameter(at),vendor:it.getParameter(Ze),version:it.getParameter(nt),readFloat:ma,npotTextureCube:si}},Sr=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 Rr(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)||Sr(it.data))}var wt=function(it){return Object.keys(it).map(function(Zt){return it[Zt]})},Ne={shape:Ee,flatten:Ce};function Ke(it,Zt,fr){for(var oa=0;oa0){var pn;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])||Sr(Ha[0])){Ri=Ca(Ha);var xi=Wa(Ha,Ri,Va.dtype);Li(xi,Yi),U.freeType(xi)}}}else if(Rr(Ha)){Ri=Ha.shape;var Xi=Ha.stride,mn=0,In=0,Ii=0,an=0;Ri.length===1?(mn=Ri[0],In=1,Ii=Xi[0],an=0):Ri.length===2&&(mn=Ri[0],In=Ri[1],Ii=Xi[0],an=Xi[1]);var kn=Array.isArray(Ha.data)?Va.dtype:Jt(Ha.data),Dn=U.allocType(kn,mn*In);ta(Dn,Ha.data,mn,In,Ii,an,Ha.offset),Li(Dn,Yi),U.freeType(Dn)}return Bi}return Qa||Bi(ea),Bi._reglType="buffer",Bi._buffer=Va,Bi.subdata=pn,fr.profile&&(Bi.stats=Va.stats),Bi.destroy=function(){zi(Va)},Bi}function Na(){wt(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&&(Zt.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(){wt(ma).forEach(zi),Ya.forEach(zi)},getBuffer:function(ea){return ea&&ea._buffer instanceof _a?ea._buffer:null},restore:Na,_initBuffer:yn}}var ca=0,Ba=0,$a=1,Za=1,ri=4,pi=4,Ra={points:ca,point:Ba,lines:$a,line:Za,triangles:ri,triangle:pi,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},tn=0,on=1,hn=4,Tt=5120,ut=5121,Br=5122,Cr=5123,xr=5124,Ir=5125,Ur=34963,Hr=35040,xt=35044;function Xt(it,Zt,fr,oa){var wa={},ma=0,_a={uint8:ut,uint16:Cr};Zt.oes_element_index_uint&&(_a.uint32=Ir);function Ya(Na){this.id=ma++,wa[this.id]=this,this.buffer=Na,this.primType=hn,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,Ur,!0,!1)._buffer)),yn(ea,Na,Hr,-1,-1,0,0),ea}function si(Na){bi.push(Na)}function yn(Na,ea,Ma,Qa,di,Va,Bi){Na.buffer.bind();var Li;if(ea){var pn=Bi;!Bi&&(!Sr(ea)||Rr(ea)&&!Sr(ea.data))&&(pn=Zt.oes_element_index_uint?Ir:Cr),fr._initBuffer(Na.buffer,ea,Ma,pn,3)}else it.bufferData(Ur,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 Tt:Li=ut;break;case Cr:case Br:Li=Cr;break;case Ir:case xr:Li=Ir;break;default:}Na.buffer.dtype=Li}Na.type=Li;var Ha=di;Ha<0&&(Ha=Na.buffer.byteLength,Li===Cr?Ha>>=1:Li===Ir&&(Ha>>=2)),Na.vertCount=Ha;var Ua=Qa;if(Qa<0){Ua=hn;var Yi=Na.buffer.dimension;Yi===1&&(Ua=tn),Yi===2&&(Ua=on),Yi===3&&(Ua=hn)}Na.primType=Ua}function zi(Na){oa.elementsCount--,delete wa[Na.id],Na.buffer.destroy(),Na.buffer=null}function Ei(Na,ea){var Ma=fr.create(null,Ur,!0),Qa=new Ya(Ma._buffer);oa.elementsCount++;function di(Va){if(!Va)Ma(),Qa.primType=hn,Qa.vertCount=0,Qa.type=ut;else if(typeof Va=="number")Ma(Va),Qa.primType=hn,Qa.vertCount=Va|0,Qa.type=ut;else{var Bi=null,Li=xt,pn=-1,Ha=-1,Ua=0,Yi=0;Array.isArray(Va)||Sr(Va)||Rr(Va)?Bi=Va:("data"in Va&&(Bi=Va.data),"usage"in Va&&(Li=qa[Va.usage]),"primitive"in Va&&(pn=Ra[Va.primitive]),"count"in Va&&(Ha=Va.count|0),"type"in Va&&(Yi=_a[Va.type]),"length"in Va?Ua=Va.length|0:(Ua=Ha,Yi===Cr||Yi===Br?Ua*=2:(Yi===Ir||Yi===xr)&&(Ua*=4))),yn(Qa,Bi,Li,pn,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(){wt(wa).forEach(zi)}}}var vr=new Float32Array(1),Or=new Uint32Array(vr.buffer),ba=5123;function Pa(it){for(var Zt=U.allocType(ba,it.length),fr=0;fr>>31<<15,ma=(oa<<1>>>24)-127,_a=oa>>13&1023;if(ma<-24)Zt[fr]=wa;else if(ma<-14){var Ya=-14-ma;Zt[fr]=wa+(_a+1024>>Ya)}else ma>15?Zt[fr]=wa+31744:Zt[fr]=wa+(ma+15<<10)+_a}return Zt}function ya(it){return Array.isArray(it)||Sr(it)}var la=34467,Ta=3553,Ai=34067,ki=34069,Ki=6408,_n=6406,Rn=6407,En=6409,On=6410,no=32854,cn=32855,lo=36194,Wo=32819,hs=32820,Oo=33635,Wn=34042,No=6402,as=34041,Ns=35904,ss=35906,uo=36193,jn=33776,Xn=33777,ls=33778,Cs=33779,Ks=35986,Xo=35987,Gi=34798,Ln=35840,Us=35841,_s=35842,Gn=35843,zs=36196,vs=5121,Ws=5123,il=5125,xn=5126,ko=10242,bo=10243,Is=10497,pu=33071,co=33648,Vs=10240,vl=10241,Ts=9728,js=9729,us=9984,As=9985,Nl=9986,su=9987,Tc=33170,du=4352,Sf=4353,Uc=4354,Fs=34046,dc=3317,Hc=37440,lu=37441,Pl=37443,ic=37444,Ou=33984,nl=[us,Nl,As,su],ml=[0,En,On,Rn,Ki],xs={};xs[En]=xs[_n]=xs[No]=1,xs[as]=xs[On]=2,xs[Rn]=xs[Ns]=3,xs[Ki]=xs[ss]=4;function Xs(it){return"[object "+it+"]"}var nc=Xs("HTMLCanvasElement"),Ul=Xs("OffscreenCanvas"),qu=Xs("CanvasRenderingContext2D"),fl=Xs("ImageBitmap"),xh=Xs("HTMLImageElement"),ns=Xs("HTMLVideoElement"),bh=Object.keys(Pe).concat([nc,Ul,qu,fl,xh,ns]),Es=[];Es[vs]=1,Es[xn]=4,Es[uo]=2,Es[Ws]=2,Es[il]=4;var to=[];to[no]=2,to[cn]=2,to[lo]=2,to[as]=4,to[jn]=.5,to[Xn]=.5,to[ls]=1,to[Cs]=1,to[Ks]=.5,to[Xo]=1,to[Gi]=1,to[Ln]=.5,to[Us]=.25,to[_s]=.5,to[Gn]=.25,to[zs]=.5;function Wc(it){return Array.isArray(it)&&(it.length===0||typeof it[0]=="number")}function Vu(it){if(!Array.isArray(it))return!1;var Zt=it.length;return!(Zt===0||!ya(it[0]))}function jl(it){return Object.prototype.toString.call(it)}function Mf(it){return jl(it)===nc}function Ac(it){return jl(it)===Ul}function nf(it){return jl(it)===qu}function $l(it){return jl(it)===fl}function Jf(it){return jl(it)===xh}function Of(it){return jl(it)===ns}function of(it){if(!it)return!1;var Zt=jl(it);return bh.indexOf(Zt)>=0?!0:Wc(it)||Vu(it)||Rr(it)}function jc(it){return Pe[Object.prototype.toString.call(it)]|0}function Bf(it,Zt){var fr=Zt.length;switch(it.type){case vs:case Ws:case il:case xn:var oa=U.allocType(it.type,fr);oa.set(Zt),it.data=oa;break;case uo:it.data=Pa(Zt);break;default:}}function Nf(it,Zt){return U.allocType(it.type===uo?xn:it.type,Zt)}function Gu(it,Zt){it.type===uo?(it.data=Pa(Zt),U.freeType(Zt)):it.data=Zt}function Ef(it,Zt,fr,oa,wa,ma){for(var _a=it.width,Ya=it.height,bi=it.channels,yi=_a*Ya*bi,si=Nf(it,yi),yn=0,zi=0;zi=1;)Ya+=_a*bi*bi,bi/=2;return Ya}else return _a*fr*oa}function Xc(it,Zt,fr,oa,wa,ma,_a){var Ya={"don't care":du,"dont care":du,nice:Uc,fast:Sf},bi={repeat:Is,clamp:pu,mirror:co},yi={nearest:Ts,linear:js},si=v({mipmap:su,"nearest mipmap nearest":us,"linear mipmap nearest":As,"nearest mipmap linear":Nl,"linear mipmap linear":su},yi),yn={none:0,browser:ic},zi={uint8:vs,rgba4:Wo,rgb565:Oo,"rgb5 a1":hs},Ei={alpha:_n,luminance:En,"luminance alpha":On,rgb:Rn,rgba:Ki,rgba4:no,"rgb5 a1":cn,rgb565:lo},Na={};Zt.ext_srgb&&(Ei.srgb=Ns,Ei.srgba=ss),Zt.oes_texture_float&&(zi.float32=zi.float=xn),Zt.oes_texture_half_float&&(zi.float16=zi["half float"]=uo),Zt.webgl_depth_texture&&(v(Ei,{depth:No,"depth stencil":as}),v(zi,{uint16:Ws,uint32:il,"depth stencil":Wn})),Zt.webgl_compressed_texture_s3tc&&v(Na,{"rgb s3tc dxt1":jn,"rgba s3tc dxt1":Xn,"rgba s3tc dxt3":ls,"rgba s3tc dxt5":Cs}),Zt.webgl_compressed_texture_atc&&v(Na,{"rgb atc":Ks,"rgba atc explicit alpha":Xo,"rgba atc interpolated alpha":Gi}),Zt.webgl_compressed_texture_pvrtc&&v(Na,{"rgb pvrtc 4bppv1":Ln,"rgb pvrtc 2bppv1":Us,"rgba pvrtc 4bppv1":_s,"rgba pvrtc 2bppv1":Gn}),Zt.webgl_compressed_texture_etc1&&(Na["rgb etc1"]=zs);var ea=Array.prototype.slice.call(it.getParameter(la));Object.keys(Na).forEach(function(Le){var $e=Na[Le];ea.indexOf($e)>=0&&(Ei[Le]=$e)});var Ma=Object.keys(Ei);fr.textureFormats=Ma;var Qa=[];Object.keys(Ei).forEach(function(Le){var $e=Ei[Le];Qa[$e]=Le});var di=[];Object.keys(zi).forEach(function(Le){var $e=zi[Le];di[$e]=Le});var Va=[];Object.keys(yi).forEach(function(Le){var $e=yi[Le];Va[$e]=Le});var Bi=[];Object.keys(si).forEach(function(Le){var $e=si[Le];Bi[$e]=Le});var Li=[];Object.keys(bi).forEach(function(Le){var $e=bi[Le];Li[$e]=Le});var pn=Ma.reduce(function(Le,$e){var gt=Ei[$e];return gt===En||gt===_n||gt===En||gt===On||gt===No||gt===as||Zt.ext_srgb&&(gt===Ns||gt===ss)?Le[gt]=gt:gt===cn||$e.indexOf("rgba")>=0?Le[gt]=Ki:Le[gt]=Rn,Le},{});function Ha(){this.internalformat=Ki,this.format=Ki,this.type=vs,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(Le,$e){Le.internalformat=$e.internalformat,Le.format=$e.format,Le.type=$e.type,Le.compressed=$e.compressed,Le.premultiplyAlpha=$e.premultiplyAlpha,Le.flipY=$e.flipY,Le.unpackAlignment=$e.unpackAlignment,Le.colorSpace=$e.colorSpace,Le.width=$e.width,Le.height=$e.height,Le.channels=$e.channels}function Yi(Le,$e){if(!(typeof $e!="object"||!$e)){if("premultiplyAlpha"in $e&&(Le.premultiplyAlpha=$e.premultiplyAlpha),"flipY"in $e&&(Le.flipY=$e.flipY),"alignment"in $e&&(Le.unpackAlignment=$e.alignment),"colorSpace"in $e&&(Le.colorSpace=yn[$e.colorSpace]),"type"in $e){var gt=$e.type;Le.type=zi[gt]}var jt=Le.width,wr=Le.height,Nr=Le.channels,pr=!1;"shape"in $e?(jt=$e.shape[0],wr=$e.shape[1],$e.shape.length===3&&(Nr=$e.shape[2],pr=!0)):("radius"in $e&&(jt=wr=$e.radius),"width"in $e&&(jt=$e.width),"height"in $e&&(wr=$e.height),"channels"in $e&&(Nr=$e.channels,pr=!0)),Le.width=jt|0,Le.height=wr|0,Le.channels=Nr|0;var yt=!1;if("format"in $e){var kt=$e.format,Bt=Le.internalformat=Ei[kt];Le.format=pn[Bt],kt in zi&&("type"in $e||(Le.type=zi[kt])),kt in Na&&(Le.compressed=!0),yt=!0}!pr&&yt?Le.channels=xs[Le.format]:pr&&!yt&&Le.channels!==ml[Le.format]&&(Le.format=Le.internalformat=ml[Le.channels])}}function Ri(Le){it.pixelStorei(Hc,Le.flipY),it.pixelStorei(lu,Le.premultiplyAlpha),it.pixelStorei(Pl,Le.colorSpace),it.pixelStorei(dc,Le.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(Le,$e){var gt=null;if(of($e)?gt=$e:$e&&(Yi(Le,$e),"x"in $e&&(Le.xOffset=$e.x|0),"y"in $e&&(Le.yOffset=$e.y|0),of($e.data)&&(gt=$e.data)),$e.copy){var jt=wa.viewportWidth,wr=wa.viewportHeight;Le.width=Le.width||jt-Le.xOffset,Le.height=Le.height||wr-Le.yOffset,Le.needsCopy=!0}else if(!gt)Le.width=Le.width||1,Le.height=Le.height||1,Le.channels=Le.channels||4;else if(Sr(gt))Le.channels=Le.channels||4,Le.data=gt,!("type"in $e)&&Le.type===vs&&(Le.type=jc(gt));else if(Wc(gt))Le.channels=Le.channels||4,Bf(Le,gt),Le.alignment=1,Le.needsFree=!0;else if(Rr(gt)){var Nr=gt.data;!Array.isArray(Nr)&&Le.type===vs&&(Le.type=jc(Nr));var pr=gt.shape,yt=gt.stride,kt,Bt,nr,hr,lr,dr;pr.length===3?(nr=pr[2],dr=yt[2]):(nr=1,dr=1),kt=pr[0],Bt=pr[1],hr=yt[0],lr=yt[1],Le.alignment=1,Le.width=kt,Le.height=Bt,Le.channels=nr,Le.format=Le.internalformat=ml[nr],Le.needsFree=!0,Ef(Le,Nr,hr,lr,dr,gt.offset)}else if(Mf(gt)||Ac(gt)||nf(gt))Mf(gt)||Ac(gt)?Le.element=gt:Le.element=gt.canvas,Le.width=Le.element.width,Le.height=Le.element.height,Le.channels=4;else if($l(gt))Le.element=gt,Le.width=gt.width,Le.height=gt.height,Le.channels=4;else if(Jf(gt))Le.element=gt,Le.width=gt.naturalWidth,Le.height=gt.naturalHeight,Le.channels=4;else if(Of(gt))Le.element=gt,Le.width=gt.videoWidth,Le.height=gt.videoHeight,Le.channels=4;else if(Vu(gt)){var ur=Le.width||gt[0].length,Ht=Le.height||gt.length,sr=Le.channels;ya(gt[0][0])?sr=sr||gt[0][0].length:sr=sr||1;for(var Vt=Ne.shape(gt),Dr=1,Jr=0;Jr>=wr,gt.height>>=wr,xi(gt,jt[wr]),Le.mipmask|=1<=0&&!("faces"in $e)&&(Le.genMipmaps=!0)}if("mag"in $e){var jt=$e.mag;Le.magFilter=yi[jt]}var wr=Le.wrapS,Nr=Le.wrapT;if("wrap"in $e){var pr=$e.wrap;typeof pr=="string"?wr=Nr=bi[pr]:Array.isArray(pr)&&(wr=bi[pr[0]],Nr=bi[pr[1]])}else{if("wrapS"in $e){var yt=$e.wrapS;wr=bi[yt]}if("wrapT"in $e){var kt=$e.wrapT;Nr=bi[kt]}}if(Le.wrapS=wr,Le.wrapT=Nr,"anisotropic"in $e){var Bt=$e.anisotropic;Le.anisotropic=$e.anisotropic}if("mipmap"in $e){var nr=!1;switch(typeof $e.mipmap){case"string":Le.mipmapHint=Ya[$e.mipmap],Le.genMipmaps=!0,nr=!0;break;case"boolean":nr=Le.genMipmaps=$e.mipmap;break;case"object":Le.genMipmaps=!1,nr=!0;break;default:}nr&&!("min"in $e)&&(Le.minFilter=us)}}function kl(Le,$e){it.texParameteri($e,vl,Le.minFilter),it.texParameteri($e,Vs,Le.magFilter),it.texParameteri($e,ko,Le.wrapS),it.texParameteri($e,bo,Le.wrapT),Zt.ext_texture_filter_anisotropic&&it.texParameteri($e,Fs,Le.anisotropic),Le.genMipmaps&&(it.hint(Tc,Le.mipmapHint),it.generateMipmap($e))}var tu=0,qs={},pl=fr.maxTextureUnits,wl=Array(pl).map(function(){return null});function Yn(Le){Ha.call(this),this.mipmask=0,this.internalformat=Ki,this.id=tu++,this.refCount=1,this.target=Le,this.texture=it.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new fs,_a.profile&&(this.stats={size:0})}function Cl(Le){it.activeTexture(Ou),it.bindTexture(Le.target,Le.texture)}function Co(){var Le=wl[0];Le?it.bindTexture(Le.target,Le.texture):it.bindTexture(Ta,null)}function ve(Le){var $e=Le.texture,gt=Le.unit,jt=Le.target;gt>=0&&(it.activeTexture(Ou+gt),it.bindTexture(jt,null),wl[gt]=null),it.deleteTexture($e),Le.texture=null,Le.params=null,Le.pixels=null,Le.refCount=0,delete qs[Le.id],ma.textureCount--}v(Yn.prototype,{bind:function(){var Le=this;Le.bindCount+=1;var $e=Le.unit;if($e<0){for(var gt=0;gt0)continue;jt.unit=-1}wl[gt]=Le,$e=gt;break}$e>=pl,_a.profile&&ma.maxTextureUnits<$e+1&&(ma.maxTextureUnits=$e+1),Le.unit=$e,it.activeTexture(Ou+$e),it.bindTexture(Le.target,Le.texture)}return $e},unbind:function(){this.bindCount-=1},decRef:function(){--this.refCount<=0&&ve(this)}});function K(Le,$e){var gt=new Yn(Ta);qs[gt.id]=gt,ma.textureCount++;function jt(pr,yt){var kt=gt.texInfo;fs.call(kt);var Bt=po();return typeof pr=="number"?typeof yt=="number"?Dn(Bt,pr|0,yt|0):Dn(Bt,pr|0,pr|0):pr?(Sl(kt,pr),Zn(Bt,pr)):Dn(Bt,1,1),kt.genMipmaps&&(Bt.mipmask=(Bt.width<<1)-1),gt.mipmask=Bt.mipmask,Ua(gt,Bt),gt.internalformat=Bt.internalformat,jt.width=Bt.width,jt.height=Bt.height,Cl(gt),Ds(Bt,Ta),kl(kt,Ta),Co(),Wl(Bt),_a.profile&&(gt.stats.size=oc(gt.internalformat,gt.type,Bt.width,Bt.height,kt.genMipmaps,!1)),jt.format=Qa[gt.internalformat],jt.type=di[gt.type],jt.mag=Va[kt.magFilter],jt.min=Bi[kt.minFilter],jt.wrapS=Li[kt.wrapS],jt.wrapT=Li[kt.wrapT],jt}function wr(pr,yt,kt,Bt){var nr=yt|0,hr=kt|0,lr=Bt|0,dr=Ii();return Ua(dr,gt),dr.width=0,dr.height=0,xi(dr,pr),dr.width=dr.width||(gt.width>>lr)-nr,dr.height=dr.height||(gt.height>>lr)-hr,Cl(gt),mn(dr,Ta,nr,hr,lr),Co(),an(dr),jt}function Nr(pr,yt){var kt=pr|0,Bt=yt|0||kt;if(kt===gt.width&&Bt===gt.height)return jt;jt.width=gt.width=kt,jt.height=gt.height=Bt,Cl(gt);for(var nr=0;gt.mipmask>>nr;++nr){var hr=kt>>nr,lr=Bt>>nr;if(!hr||!lr)break;it.texImage2D(Ta,nr,gt.format,hr,lr,0,gt.format,gt.type,null)}return Co(),_a.profile&&(gt.stats.size=oc(gt.internalformat,gt.type,kt,Bt,!1,!1)),jt}return jt(Le,$e),jt.subimage=wr,jt.resize=Nr,jt._reglType="texture2d",jt._texture=gt,_a.profile&&(jt.stats=gt.stats),jt.destroy=function(){gt.decRef()},jt}function _e(Le,$e,gt,jt,wr,Nr){var pr=new Yn(Ai);qs[pr.id]=pr,ma.cubeCount++;var yt=new Array(6);function kt(hr,lr,dr,ur,Ht,sr){var Vt,Dr=pr.texInfo;for(fs.call(Dr),Vt=0;Vt<6;++Vt)yt[Vt]=po();if(typeof hr=="number"||!hr){var Jr=hr|0||1;for(Vt=0;Vt<6;++Vt)Dn(yt[Vt],Jr,Jr)}else if(typeof hr=="object")if(lr)Zn(yt[0],hr),Zn(yt[1],lr),Zn(yt[2],dr),Zn(yt[3],ur),Zn(yt[4],Ht),Zn(yt[5],sr);else if(Sl(Dr,hr),Yi(pr,hr),"faces"in hr){var ga=hr.faces;for(Vt=0;Vt<6;++Vt)Ua(yt[Vt],pr),Zn(yt[Vt],ga[Vt])}else for(Vt=0;Vt<6;++Vt)Zn(yt[Vt],hr);for(Ua(pr,yt[0]),Dr.genMipmaps?pr.mipmask=(yt[0].width<<1)-1:pr.mipmask=yt[0].mipmask,pr.internalformat=yt[0].internalformat,kt.width=yt[0].width,kt.height=yt[0].height,Cl(pr),Vt=0;Vt<6;++Vt)Ds(yt[Vt],ki+Vt);for(kl(Dr,Ai),Co(),_a.profile&&(pr.stats.size=oc(pr.internalformat,pr.type,kt.width,kt.height,Dr.genMipmaps,!0)),kt.format=Qa[pr.internalformat],kt.type=di[pr.type],kt.mag=Va[Dr.magFilter],kt.min=Bi[Dr.minFilter],kt.wrapS=Li[Dr.wrapS],kt.wrapT=Li[Dr.wrapT],Vt=0;Vt<6;++Vt)Wl(yt[Vt]);return kt}function Bt(hr,lr,dr,ur,Ht){var sr=dr|0,Vt=ur|0,Dr=Ht|0,Jr=Ii();return Ua(Jr,pr),Jr.width=0,Jr.height=0,xi(Jr,lr),Jr.width=Jr.width||(pr.width>>Dr)-sr,Jr.height=Jr.height||(pr.height>>Dr)-Vt,Cl(pr),mn(Jr,ki+hr,sr,Vt,Dr),Co(),an(Jr),kt}function nr(hr){var lr=hr|0;if(lr!==pr.width){kt.width=pr.width=lr,kt.height=pr.height=lr,Cl(pr);for(var dr=0;dr<6;++dr)for(var ur=0;pr.mipmask>>ur;++ur)it.texImage2D(ki+dr,ur,pr.format,lr>>ur,lr>>ur,0,pr.format,pr.type,null);return Co(),_a.profile&&(pr.stats.size=oc(pr.internalformat,pr.type,kt.width,kt.height,!1,!0)),kt}}return kt(Le,$e,gt,jt,wr,Nr),kt.subimage=Bt,kt.resize=nr,kt._reglType="textureCube",kt._texture=pr,_a.profile&&(kt.stats=pr.stats),kt.destroy=function(){pr.decRef()},kt}function te(){for(var Le=0;Le>jt,gt.height>>jt,0,gt.internalformat,gt.type,null);else for(var wr=0;wr<6;++wr)it.texImage2D(ki+wr,jt,gt.internalformat,gt.width>>jt,gt.height>>jt,0,gt.internalformat,gt.type,null);kl(gt.texInfo,gt.target)})}function Ge(){for(var Le=0;Le=0?Wl=!0:bi.indexOf(fs)>=0&&(Wl=!1))),("depthTexture"in Yn||"depthStencilTexture"in Yn)&&(wl=!!(Yn.depthTexture||Yn.depthStencilTexture)),"depth"in Yn&&(typeof Yn.depth=="boolean"?Ds=Yn.depth:(tu=Yn.depth,bl=!1)),"stencil"in Yn&&(typeof Yn.stencil=="boolean"?bl=Yn.stencil:(qs=Yn.stencil,Ds=!1)),"depthStencil"in Yn&&(typeof Yn.depthStencil=="boolean"?Ds=bl=Yn.depthStencil:(pl=Yn.depthStencil,Ds=!1,bl=!1))}var Co=null,ve=null,K=null,_e=null;if(Array.isArray(po))Co=po.map(Na);else if(po)Co=[Na(po)];else for(Co=new Array(kl),kn=0;kn0&&(an.depth=xi[0].depth,an.stencil=xi[0].stencil,an.depthStencil=xi[0].depthStencil),xi[Ii]?xi[Ii](an):xi[Ii]=Ua(an)}return v(Xi,{width:kn,height:kn,color:fs})}function mn(In){var Ii,an=In|0;if(an===Xi.width)return Xi;var kn=Xi.color;for(Ii=0;Ii=kn.byteLength?Dn.subdata(kn):(Dn.destroy(),Ua.buffers[In]=null)),Ua.buffers[In]||(Dn=Ua.buffers[In]=wa.create(Ii,mf,!1,!0)),an.buffer=wa.getBuffer(Dn),an.size=an.buffer.dimension|0,an.normalized=!1,an.type=an.buffer.dtype,an.offset=0,an.stride=0,an.divisor=0,an.state=1,Xi[In]=1}else wa.getBuffer(Ii)?(an.buffer=wa.getBuffer(Ii),an.size=an.buffer.dimension|0,an.normalized=!1,an.type=an.buffer.dtype,an.offset=0,an.stride=0,an.divisor=0,an.state=1):wa.getBuffer(Ii.buffer)?(an.buffer=wa.getBuffer(Ii.buffer),an.size=(+Ii.size||an.buffer.dimension)|0,an.normalized=!!Ii.normalized||!1,"type"in Ii?an.type=fa[Ii.type]:an.type=an.buffer.dtype,an.offset=(Ii.offset||0)|0,an.stride=(Ii.stride||0)|0,an.divisor=(Ii.divisor||0)|0,an.state=1):"x"in Ii&&(an.x=+Ii.x||0,an.y=+Ii.y||0,an.z=+Ii.z||0,an.w=+Ii.w||0,an.state=2)}for(var Zn=0;Zn1)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(){wa={},ma={};for(var ea=0;ea16&&(fr=Pi(fr,it.length*8));for(var oa=Array(16),wa=Array(16),ma=0;ma<16;ma++)oa[ma]=fr[ma]^909522486,wa[ma]=fr[ma]^1549556828;var _a=Pi(oa.concat(Pc(Zt)),512+Zt.length*8);return Qt(Pi(wa.concat(_a),768))}function xu(it){for(var Zt=Vf?"0123456789ABCDEF":"0123456789abcdef",fr="",oa,wa=0;wa>>4&15)+Zt.charAt(oa&15);return fr}function Lc(it){for(var Zt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",fr="",oa=it.length,wa=0;wait.length*8?fr+=Xu:fr+=Zt.charAt(ma>>>6*(3-_a)&63);return fr}function Jc(it,Zt){var fr=Zt.length,oa=Array(),wa,ma,_a,Ya,bi=Array(Math.ceil(it.length/2));for(wa=0;wa0;){for(Ya=Array(),_a=0,wa=0;wa0||ma>0)&&(Ya[Ya.length]=ma);oa[oa.length]=_a,bi=Ya}var yi="";for(wa=oa.length-1;wa>=0;wa--)yi+=Zt.charAt(oa[wa]);var si=Math.ceil(it.length*8/(Math.log(Zt.length)/Math.log(2)));for(wa=yi.length;wa>>6&31,128|oa&63):oa<=65535?Zt+=String.fromCharCode(224|oa>>>12&15,128|oa>>>6&63,128|oa&63):oa<=2097151&&(Zt+=String.fromCharCode(240|oa>>>18&7,128|oa>>>12&63,128|oa>>>6&63,128|oa&63));return Zt}function Pc(it){for(var Zt=Array(it.length>>2),fr=0;fr>5]|=(it.charCodeAt(fr/8)&255)<<24-fr%32;return Zt}function Qt(it){for(var Zt="",fr=0;fr>5]>>>24-fr%32&255);return Zt}function br(it,Zt){return it>>>Zt|it<<32-Zt}function aa(it,Zt){return it>>>Zt}function $r(it,Zt,fr){return it&Zt^~it&fr}function ka(it,Zt,fr){return it&Zt^it&fr^Zt&fr}function li(it){return br(it,2)^br(it,13)^br(it,22)}function Ci(it){return br(it,6)^br(it,11)^br(it,25)}function Hi(it){return br(it,7)^br(it,18)^aa(it,3)}function Qi(it){return br(it,17)^br(it,19)^aa(it,10)}var dn=new Array(1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998);function Pi(it,Zt){var fr=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),oa=new Array(64),wa,ma,_a,Ya,bi,yi,si,yn,zi,Ei,Na,ea;for(it[Zt>>5]|=128<<24-Zt%32,it[(Zt+64>>9<<4)+15]=Zt,zi=0;zi>16)+(Zt>>16)+(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 Zt=it&&it.cache,fr=0,oa=[],wa=[],ma=[];function _a(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(),yn={};function zi(Na,ea){var Ma=[];function Qa(){var pn="a"+Ma.length;return Ma.push(pn),pn}ea=ea||0;for(var di=0;di":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},Fa={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Xa={cw:et,ccw:mt};function fi(it){return Array.isArray(it)||Sr(it)||Rr(it)}function ni(it){return it.sort(function(Zt,fr){return Zt===Se?-1:fr===Se?1:Zt=1,oa>=2,Zt)}else if(fr===Ss){var wa=it.data;return new La(wa.thisDep,wa.contextDep,wa.propDep,Zt)}else{if(fr===rl)return new La(!1,!1,!1,Zt);if(fr===Os){for(var ma=!1,_a=!1,Ya=!1,bi=0;bi=1&&(_a=!0),si>=2&&(Ya=!0)}else yi.type===Ss&&(ma=ma||yi.data.thisDep,_a=_a||yi.data.contextDep,Ya=Ya||yi.data.propDep)}return new La(ma,_a,Ya,Zt)}else return new La(fr===Ko,fr===yo,fr===un,Zt)}}var Pn=new La(!1,!1,!1,function(){});function Jn(it,Zt,fr,oa,wa,ma,_a,Ya,bi,yi,si,yn,zi,Ei,Na,ea){var Ma=yi.Record,Qa={add:32774,subtract:32778,"reverse subtract":32779};fr.ext_blend_minmax&&(Qa.min=bt,Qa.max=Mt);var di=fr.angle_instanced_arrays,Va=fr.webgl_draw_buffers,Bi=fr.oes_vertex_array_object,Li={dirty:!0,profile:ea.profile},pn={},Ha=[],Ua={},Yi={};function Ri(yt){return yt.replace(".","_")}function Ti(yt,kt,Bt){var nr=Ri(yt);Ha.push(yt),pn[nr]=Li[nr]=!!Bt,Ua[nr]=kt}function xi(yt,kt,Bt){var nr=Ri(yt);Ha.push(yt),Array.isArray(Bt)?(Li[nr]=Bt.slice(),pn[nr]=Bt.slice()):Li[nr]=pn[nr]=Bt,Yi[nr]=kt}function Xi(yt){return!!isNaN(yt)}Ti(el,ci),Ti(bs,za),xi(Fl,"blendColor",[0,0,0,0]),xi(_l,"blendEquationSeparate",[Xr,Xr]),xi(ll,"blendFuncSeparate",[Gr,_r,Gr,_r]),Ti(Un,ji,!0),xi(Lo,"depthFunc",xa),xi(Js,"depthRange",[0,1]),xi(Rs,"depthMask",!0),xi(uu,uu,[!0,!0,!0,!0]),Ti(Iu,Aa),xi(Zu,"cullFace",Fe),xi(Ic,Ic,mt),xi(bu,bu,1),Ti(Rc,Sn),xi(Au,"polygonOffset",[0,0]),Ti(yc,Kn),Ti(ho,Bn),xi(Ro,"sampleCoverage",[1,!1]),Ti(Dc,Vi),xi(lc,"stencilMask",-1),xi(Yu,"stencilFunc",[ar,0,-1]),xi(Ue,"stencilOpSeparate",[de,Ot,Ot,Ot]),xi(I,"stencilOpSeparate",[Fe,Ot,Ot,Ot]),Ti(ie,nn),xi(we,"scissor",[0,0,it.drawingBufferWidth,it.drawingBufferHeight]),xi(Se,Se,[0,0,it.drawingBufferWidth,it.drawingBufferHeight]);var mn={gl:it,context:zi,strings:Zt,next:pn,current:Li,draw:yn,elements:ma,buffer:wa,shader:si,attributes:yi.state,vao:yi,uniforms:bi,framebuffer:Ya,extensions:fr,timer:Ei,isBufferArgs:fi},In={primTypes:Ra,compareFuncs:Sa,blendFuncs:ti,blendEquations:Qa,stencilOps:Fa,glTypes:fa,orientationType:Xa};Va&&(In.backBuffer=[Fe],In.drawBuffer=d(oa.maxDrawbuffers,function(yt){return yt===0?[0]:d(yt,function(kt){return Ja+kt})}));var Ii=0;function an(){var yt=Mn({cache:Na}),kt=yt.link,Bt=yt.global;yt.id=Ii++,yt.batchId="0";var nr=kt(mn),hr=yt.shared={props:"a0"};Object.keys(mn).forEach(function(sr){hr[sr]=Bt.def(nr,".",sr)});var lr=yt.next={},dr=yt.current={};Object.keys(Yi).forEach(function(sr){Array.isArray(Li[sr])&&(lr[sr]=Bt.def(hr.next,".",sr),dr[sr]=Bt.def(hr.current,".",sr))});var ur=yt.constants={};Object.keys(In).forEach(function(sr){ur[sr]=Bt.def(JSON.stringify(In[sr]))}),yt.invoke=function(sr,Vt){switch(Vt.type){case An:var Dr=["this",hr.context,hr.props,yt.batchId];return sr.def(kt(Vt.data),".call(",Dr.slice(0,Math.max(Vt.data.length+1,4)),")");case un:return sr.def(hr.props,Vt.data);case yo:return sr.def(hr.context,Vt.data);case Ko:return sr.def("this",Vt.data);case Ss:return Vt.data.append(yt,sr),Vt.data.ref;case rl:return Vt.data.toString();case Os:return Vt.data.map(function(Jr){return yt.invoke(sr,Jr)})}},yt.attribCache={};var Ht={};return yt.scopeAttrib=function(sr){var Vt=Zt.id(sr);if(Vt in Ht)return Ht[Vt];var Dr=yi.scope[Vt];Dr||(Dr=yi.scope[Vt]=new Ma);var Jr=Ht[Vt]=kt(Dr);return Jr},yt}function kn(yt){var kt=yt.static,Bt=yt.dynamic,nr;if(Be in kt){var hr=!!kt[Be];nr=rn(function(dr,ur){return hr}),nr.enable=hr}else if(Be in Bt){var lr=Bt[Be];nr=vn(lr,function(dr,ur){return dr.invoke(ur,lr)})}return nr}function Dn(yt,kt){var Bt=yt.static,nr=yt.dynamic;if(dt in Bt){var hr=Bt[dt];return hr?(hr=Ya.getFramebuffer(hr),rn(function(dr,ur){var Ht=dr.link(hr),sr=dr.shared;ur.set(sr.framebuffer,".next",Ht);var Vt=sr.context;return ur.set(Vt,"."+vt,Ht+".width"),ur.set(Vt,"."+Lt,Ht+".height"),Ht})):rn(function(dr,ur){var Ht=dr.shared;ur.set(Ht.framebuffer,".next","null");var sr=Ht.context;return ur.set(sr,"."+vt,sr+"."+yr),ur.set(sr,"."+Lt,sr+"."+Er),"null"})}else if(dt in nr){var lr=nr[dt];return vn(lr,function(dr,ur){var Ht=dr.invoke(ur,lr),sr=dr.shared,Vt=sr.framebuffer,Dr=ur.def(Vt,".getFramebuffer(",Ht,")");ur.set(Vt,".next",Dr);var Jr=sr.context;return ur.set(Jr,"."+vt,Dr+"?"+Dr+".width:"+Jr+"."+yr),ur.set(Jr,"."+Lt,Dr+"?"+Dr+".height:"+Jr+"."+Er),Dr})}else return null}function Zn(yt,kt,Bt){var nr=yt.static,hr=yt.dynamic;function lr(Ht){if(Ht in nr){var sr=nr[Ht],Vt=!0,Dr=sr.x|0,Jr=sr.y|0,ga,vi;return"width"in sr?ga=sr.width|0:Vt=!1,"height"in sr?vi=sr.height|0:Vt=!1,new La(!Vt&&kt&&kt.thisDep,!Vt&&kt&&kt.contextDep,!Vt&&kt&&kt.propDep,function(Zi,Fi){var ui=Zi.shared.context,_i=ga;"width"in sr||(_i=Fi.def(ui,".",vt,"-",Dr));var Si=vi;return"height"in sr||(Si=Fi.def(ui,".",Lt,"-",Jr)),[Dr,Jr,_i,Si]})}else if(Ht in hr){var Ga=hr[Ht],ai=vn(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,".",vt,"-",Si,")"),_o=Fi.def('"height" in ',ui,"?",ui,".height|0:","(",_i,".",Lt,"-",Ui,")");return[Si,Ui,fn,_o]});return kt&&(ai.thisDep=ai.thisDep||kt.thisDep,ai.contextDep=ai.contextDep||kt.contextDep,ai.propDep=ai.propDep||kt.propDep),ai}else return kt?new La(kt.thisDep,kt.contextDep,kt.propDep,function(Zi,Fi){var ui=Zi.shared.context;return[0,0,Fi.def(ui,".",vt),Fi.def(ui,".",Lt)]}):null}var dr=lr(Se);if(dr){var ur=dr;dr=new La(dr.thisDep,dr.contextDep,dr.propDep,function(Ht,sr){var Vt=ur.append(Ht,sr),Dr=Ht.shared.context;return sr.set(Dr,"."+At,Vt[2]),sr.set(Dr,"."+zt,Vt[3]),Vt})}return{viewport:dr,scissor_box:lr(we)}}function Ds(yt,kt){var Bt=yt.static,nr=typeof Bt[Nt]=="string"&&typeof Bt[St]=="string";if(nr){if(Object.keys(kt.dynamic).length>0)return null;var hr=kt.static,lr=Object.keys(hr);if(lr.length>0&&typeof hr[lr[0]]=="number"){for(var dr=[],ur=0;ur"+Si+"?"+Vt+".constant["+Si+"]:0;"}).join(""),"}}else{","if(",ga,"(",Vt,".buffer)){",Zi,"=",vi,".createStream(",Qr,",",Vt,".buffer);","}else{",Zi,"=",vi,".getBuffer(",Vt,".buffer);","}",Fi,'="type" in ',Vt,"?",Jr.glTypes,"[",Vt,".type]:",Zi,".dtype;",Ga.normalized,"=!!",Vt,".normalized;");function ui(_i){sr(Ga[_i],"=",Vt,".",_i,"|0;")}return ui("size"),ui("offset"),ui("stride"),ui("divisor"),sr("}}"),sr.exit("if(",Ga.isStream,"){",vi,".destroyStream(",Zi,");","}"),Ga}hr[lr]=vn(dr,ur)}),hr}function kl(yt){var kt=yt.static,Bt=yt.dynamic,nr={};return Object.keys(kt).forEach(function(hr){var lr=kt[hr];nr[hr]=rn(function(dr,ur){return typeof lr=="number"||typeof lr=="boolean"?""+lr:dr.link(lr)})}),Object.keys(Bt).forEach(function(hr){var lr=Bt[hr];nr[hr]=vn(lr,function(dr,ur){return dr.invoke(ur,lr)})}),nr}function tu(yt,kt,Bt,nr,hr){var lr=yt.static,dr=yt.dynamic,ur=Ds(yt,kt),Ht=Dn(yt,hr),sr=Zn(yt,Ht,hr),Vt=po(yt,hr),Dr=Wl(yt,hr),Jr=bl(yt,hr,ur);function ga(ui){var _i=sr[ui];_i&&(Dr[ui]=_i)}ga(Se),ga(Ri(we));var vi=Object.keys(Dr).length>0,Ga={framebuffer:Ht,draw:Vt,shader:Jr,state:Dr,dirty:vi,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(Ga.profile=kn(yt,hr),Ga.uniforms=fs(Bt,hr),Ga.drawVAO=Ga.scopeVAO=Vt.vao,!Ga.drawVAO&&Jr.program&&!ur&&fr.angle_instanced_arrays&&Vt.static.elements){var ai=!0,Zi=Jr.program.attributes.map(function(ui){var _i=kt.static[ui];return ai=ai&&!!_i,_i});if(ai&&Zi.length>0){var Fi=yi.getVAO(yi.createVAO({attributes:Zi,elements:Vt.static.elements}));Ga.drawVAO=new La(null,null,null,function(ui,_i){return ui.link(Fi)}),Ga.useVAO=!0}}return ur?Ga.useVAO=!0:Ga.attributes=Sl(kt,hr),Ga.context=kl(nr,hr),Ga}function qs(yt,kt,Bt){var nr=yt.shared,hr=nr.context,lr=yt.scope();Object.keys(Bt).forEach(function(dr){kt.save(hr,"."+dr);var ur=Bt[dr],Ht=ur.append(yt,kt);Array.isArray(Ht)?lr(hr,".",dr,"=[",Ht.join(),"];"):lr(hr,".",dr,"=",Ht,";")}),kt(lr)}function pl(yt,kt,Bt,nr){var hr=yt.shared,lr=hr.gl,dr=hr.framebuffer,ur;Va&&(ur=kt.def(hr.extensions,".webgl_draw_buffers"));var Ht=yt.constants,sr=Ht.drawBuffer,Vt=Ht.backBuffer,Dr;Bt?Dr=Bt.append(yt,kt):Dr=kt.def(dr,".next"),nr||kt("if(",Dr,"!==",dr,".cur){"),kt("if(",Dr,"){",lr,".bindFramebuffer(",da,",",Dr,".framebuffer);"),Va&&kt(ur,".drawBuffersWEBGL(",sr,"[",Dr,".colorAttachments.length]);"),kt("}else{",lr,".bindFramebuffer(",da,",null);"),Va&&kt(ur,".drawBuffersWEBGL(",Vt,");"),kt("}",dr,".cur=",Dr,";"),nr||kt("}")}function wl(yt,kt,Bt){var nr=yt.shared,hr=nr.gl,lr=yt.current,dr=yt.next,ur=nr.current,Ht=nr.next,sr=yt.cond(ur,".dirty");Ha.forEach(function(Vt){var Dr=Ri(Vt);if(!(Dr in Bt.state)){var Jr,ga;if(Dr in dr){Jr=dr[Dr],ga=lr[Dr];var vi=d(Li[Dr].length,function(ai){return sr.def(Jr,"[",ai,"]")});sr(yt.cond(vi.map(function(ai,Zi){return ai+"!=="+ga+"["+Zi+"]"}).join("||")).then(hr,".",Yi[Dr],"(",vi,");",vi.map(function(ai,Zi){return ga+"["+Zi+"]="+ai}).join(";"),";"))}else{Jr=sr.def(Ht,".",Dr);var Ga=yt.cond(Jr,"!==",ur,".",Dr);sr(Ga),Dr in Ua?Ga(yt.cond(Jr).then(hr,".enable(",Ua[Dr],");").else(hr,".disable(",Ua[Dr],");"),ur,".",Dr,"=",Jr,";"):Ga(hr,".",Yi[Dr],"(",Jr,");",ur,".",Dr,"=",Jr,";")}}}),Object.keys(Bt.state).length===0&&sr(ur,".dirty=false;"),kt(sr)}function Yn(yt,kt,Bt,nr){var hr=yt.shared,lr=yt.current,dr=hr.current,ur=hr.gl,Ht;ni(Object.keys(Bt)).forEach(function(sr){var Vt=Bt[sr];if(!(nr&&!nr(Vt))){var Dr=Vt.append(yt,kt);if(Ua[sr]){var Jr=Ua[sr];sn(Vt)?(Ht=yt.link(Dr,{stable:!0}),kt(yt.cond(Ht).then(ur,".enable(",Jr,");").else(ur,".disable(",Jr,");")),kt(dr,".",sr,"=",Ht,";")):(kt(yt.cond(Dr).then(ur,".enable(",Jr,");").else(ur,".disable(",Jr,");")),kt(dr,".",sr,"=",Dr,";"))}else if(ya(Dr)){var ga=lr[sr];kt(ur,".",Yi[sr],"(",Dr,");",Dr.map(function(vi,Ga){return ga+"["+Ga+"]="+vi}).join(";"),";")}else sn(Vt)?(Ht=yt.link(Dr,{stable:!0}),kt(ur,".",Yi[sr],"(",Ht,");",dr,".",sr,"=",Ht,";")):kt(ur,".",Yi[sr],"(",Dr,");",dr,".",sr,"=",Dr,";")}})}function Cl(yt,kt){di&&(yt.instancing=kt.def(yt.shared.extensions,".angle_instanced_arrays"))}function Co(yt,kt,Bt,nr,hr){var lr=yt.shared,dr=yt.stats,ur=lr.current,Ht=lr.timer,sr=Bt.profile;function Vt(){return typeof performance>"u"?"Date.now()":"performance.now()"}var Dr,Jr;function ga(ui){Dr=kt.def(),ui(Dr,"=",Vt(),";"),typeof hr=="string"?ui(dr,".count+=",hr,";"):ui(dr,".count++;"),Ei&&(nr?(Jr=kt.def(),ui(Jr,"=",Ht,".getNumPendingQueries();")):ui(Ht,".beginQuery(",dr,");"))}function vi(ui){ui(dr,".cpuTime+=",Vt(),"-",Dr,";"),Ei&&(nr?ui(Ht,".pushScopeStats(",Jr,",",Ht,".getNumPendingQueries(),",dr,");"):ui(Ht,".endQuery();"))}function Ga(ui){var _i=kt.def(ur,".profile");kt(ur,".profile=",ui,";"),kt.exit(ur,".profile=",_i,";")}var ai;if(sr){if(sn(sr)){sr.enable?(ga(kt),vi(kt.exit),Ga("true")):Ga("false");return}ai=sr.append(yt,kt),Ga(ai)}else ai=kt.def(ur,".profile");var Zi=yt.block();ga(Zi),kt("if(",ai,"){",Zi,"}");var Fi=yt.block();vi(Fi),kt.exit("if(",ai,"){",Fi,"}")}function ve(yt,kt,Bt,nr,hr){var lr=yt.shared;function dr(Ht){switch(Ht){case is:case ul:case Il:return 2;case Ao:case tl:case eu:return 3;case Zo:case Jo:case Ru:return 4;default:return 1}}function ur(Ht,sr,Vt){var Dr=lr.gl,Jr=kt.def(Ht,".location"),ga=kt.def(lr.attributes,"[",Jr,"]"),vi=Vt.state,Ga=Vt.buffer,ai=[Vt.x,Vt.y,Vt.z,Vt.w],Zi=["buffer","normalized","offset","stride"];function Fi(){kt("if(!",ga,".buffer){",Dr,".enableVertexAttribArray(",Jr,");}");var _i=Vt.type,Si;if(Vt.size?Si=kt.def(Vt.size,"||",sr):Si=sr,kt("if(",ga,".type!==",_i,"||",ga,".size!==",Si,"||",Zi.map(function(fn){return ga+"."+fn+"!=="+Vt[fn]}).join("||"),"){",Dr,".bindBuffer(",Qr,",",Ga,".buffer);",Dr,".vertexAttribPointer(",[Jr,Si,_i,Vt.normalized,Vt.stride,Vt.offset],");",ga,".type=",_i,";",ga,".size=",Si,";",Zi.map(function(fn){return ga+"."+fn+"="+Vt[fn]+";"}).join(""),"}"),di){var Ui=Vt.divisor;kt("if(",ga,".divisor!==",Ui,"){",yt.instancing,".vertexAttribDivisorANGLE(",[Jr,Ui],");",ga,".divisor=",Ui,";}")}}function ui(){kt("if(",ga,".buffer){",Dr,".disableVertexAttribArray(",Jr,");",ga,".buffer=null;","}if(",Qn.map(function(_i,Si){return ga+"."+_i+"!=="+ai[Si]}).join("||"),"){",Dr,".vertexAttrib4f(",Jr,",",ai,");",Qn.map(function(_i,Si){return ga+"."+_i+"="+ai[Si]+";"}).join(""),"}")}vi===eo?Fi():vi===fo?ui():(kt("if(",vi,"===",eo,"){"),Fi(),kt("}else{"),ui(),kt("}"))}nr.forEach(function(Ht){var sr=Ht.name,Vt=Bt.attributes[sr],Dr;if(Vt){if(!hr(Vt))return;Dr=Vt.append(yt,kt)}else{if(!hr(Pn))return;var Jr=yt.scopeAttrib(sr);Dr={},Object.keys(new Ma).forEach(function(ga){Dr[ga]=kt.def(Jr,".",ga)})}ur(yt.link(Ht),dr(Ht.info.type),Dr)})}function K(yt,kt,Bt,nr,hr,lr){for(var dr=yt.shared,ur=dr.gl,Ht,sr=0;sr1){for(var Bo=[],Ps=[],Do=0;Do>1)",Ga],");")}function Ui(){Bt(ai,".drawArraysInstancedANGLE(",[Jr,ga,vi,Ga],");")}Vt&&Vt!=="null"?Fi?Si():(Bt("if(",Vt,"){"),Si(),Bt("}else{"),Ui(),Bt("}")):Ui()}function _i(){function Si(){Bt(lr+".drawElements("+[Jr,vi,Zi,ga+"<<(("+Zi+"-"+ao+")>>1)"]+");")}function Ui(){Bt(lr+".drawArrays("+[Jr,ga,vi]+");")}Vt&&Vt!=="null"?Fi?Si():(Bt("if(",Vt,"){"),Si(),Bt("}else{"),Ui(),Bt("}")):Ui()}di&&(typeof Ga!="number"||Ga>=0)?typeof Ga=="string"?(Bt("if(",Ga,">0){"),ui(),Bt("}else if(",Ga,"<0){"),_i(),Bt("}")):ui():_i()}function te(yt,kt,Bt,nr,hr){var lr=an(),dr=lr.proc("body",hr);return di&&(lr.instancing=dr.def(lr.shared.extensions,".angle_instanced_arrays")),yt(lr,dr,Bt,nr),lr.compile().body}function me(yt,kt,Bt,nr){Cl(yt,kt),Bt.useVAO?Bt.drawVAO?kt(yt.shared.vao,".setVAO(",Bt.drawVAO.append(yt,kt),");"):kt(yt.shared.vao,".setVAO(",yt.shared.vao,".targetVAO);"):(kt(yt.shared.vao,".setVAO(null);"),ve(yt,kt,Bt,nr.attributes,function(){return!0})),K(yt,kt,Bt,nr.uniforms,function(){return!0},!1),_e(yt,kt,kt,Bt)}function Ge(yt,kt){var Bt=yt.proc("draw",1);Cl(yt,Bt),qs(yt,Bt,kt.context),pl(yt,Bt,kt.framebuffer),wl(yt,Bt,kt),Yn(yt,Bt,kt.state),Co(yt,Bt,kt,!1,!0);var nr=kt.shader.progVar.append(yt,Bt);if(Bt(yt.shared.gl,".useProgram(",nr,".program);"),kt.shader.program)me(yt,Bt,kt,kt.shader.program);else{Bt(yt.shared.vao,".setVAO(null);");var hr=yt.global.def("{}"),lr=Bt.def(nr,".id"),dr=Bt.def(hr,"[",lr,"]");Bt(yt.cond(dr).then(dr,".call(this,a0);").else(dr,"=",hr,"[",lr,"]=",yt.link(function(ur){return te(me,yt,kt,ur,1)}),"(",nr,");",dr,".call(this,a0);"))}Object.keys(kt.state).length>0&&Bt(yt.shared.current,".dirty=true;"),yt.shared.vao&&Bt(yt.shared.vao,".setVAO(null);")}function Le(yt,kt,Bt,nr){yt.batchId="a1",Cl(yt,kt);function hr(){return!0}ve(yt,kt,Bt,nr.attributes,hr),K(yt,kt,Bt,nr.uniforms,hr,!1),_e(yt,kt,kt,Bt)}function $e(yt,kt,Bt,nr){Cl(yt,kt);var hr=Bt.contextDep,lr=kt.def(),dr="a0",ur="a1",Ht=kt.def();yt.shared.props=Ht,yt.batchId=lr;var sr=yt.scope(),Vt=yt.scope();kt(sr.entry,"for(",lr,"=0;",lr,"<",ur,";++",lr,"){",Ht,"=",dr,"[",lr,"];",Vt,"}",sr.exit);function Dr(Zi){return Zi.contextDep&&hr||Zi.propDep}function Jr(Zi){return!Dr(Zi)}if(Bt.needsContext&&qs(yt,Vt,Bt.context),Bt.needsFramebuffer&&pl(yt,Vt,Bt.framebuffer),Yn(yt,Vt,Bt.state,Dr),Bt.profile&&Dr(Bt.profile)&&Co(yt,Vt,Bt,!1,!0),nr)Bt.useVAO?Bt.drawVAO?Dr(Bt.drawVAO)?Vt(yt.shared.vao,".setVAO(",Bt.drawVAO.append(yt,Vt),");"):sr(yt.shared.vao,".setVAO(",Bt.drawVAO.append(yt,sr),");"):sr(yt.shared.vao,".setVAO(",yt.shared.vao,".targetVAO);"):(sr(yt.shared.vao,".setVAO(null);"),ve(yt,sr,Bt,nr.attributes,Jr),ve(yt,Vt,Bt,nr.attributes,Dr)),K(yt,sr,Bt,nr.uniforms,Jr,!1),K(yt,Vt,Bt,nr.uniforms,Dr,!0),_e(yt,sr,Vt,Bt);else{var ga=yt.global.def("{}"),vi=Bt.shader.progVar.append(yt,Vt),Ga=Vt.def(vi,".id"),ai=Vt.def(ga,"[",Ga,"]");Vt(yt.shared.gl,".useProgram(",vi,".program);","if(!",ai,"){",ai,"=",ga,"[",Ga,"]=",yt.link(function(Zi){return te(Le,yt,Bt,Zi,2)}),"(",vi,");}",ai,".call(this,a0[",lr,"],",lr,");")}}function gt(yt,kt){var Bt=yt.proc("batch",2);yt.batchId="0",Cl(yt,Bt);var nr=!1,hr=!0;Object.keys(kt.context).forEach(function(ga){nr=nr||kt.context[ga].propDep}),nr||(qs(yt,Bt,kt.context),hr=!1);var lr=kt.framebuffer,dr=!1;lr?(lr.propDep?nr=dr=!0:lr.contextDep&&nr&&(dr=!0),dr||pl(yt,Bt,lr)):pl(yt,Bt,null),kt.state.viewport&&kt.state.viewport.propDep&&(nr=!0);function ur(ga){return ga.contextDep&&nr||ga.propDep}wl(yt,Bt,kt),Yn(yt,Bt,kt.state,function(ga){return!ur(ga)}),(!kt.profile||!ur(kt.profile))&&Co(yt,Bt,kt,!1,"a1"),kt.contextDep=nr,kt.needsContext=hr,kt.needsFramebuffer=dr;var Ht=kt.shader.progVar;if(Ht.contextDep&&nr||Ht.propDep)$e(yt,Bt,kt,null);else{var sr=Ht.append(yt,Bt);if(Bt(yt.shared.gl,".useProgram(",sr,".program);"),kt.shader.program)$e(yt,Bt,kt,kt.shader.program);else{Bt(yt.shared.vao,".setVAO(null);");var Vt=yt.global.def("{}"),Dr=Bt.def(sr,".id"),Jr=Bt.def(Vt,"[",Dr,"]");Bt(yt.cond(Jr).then(Jr,".call(this,a0,a1);").else(Jr,"=",Vt,"[",Dr,"]=",yt.link(function(ga){return te($e,yt,kt,ga,2)}),"(",sr,");",Jr,".call(this,a0,a1);"))}}Object.keys(kt.state).length>0&&Bt(yt.shared.current,".dirty=true;"),yt.shared.vao&&Bt(yt.shared.vao,".setVAO(null);")}function jt(yt,kt){var Bt=yt.proc("scope",3);yt.batchId="a2";var nr=yt.shared,hr=nr.current;if(qs(yt,Bt,kt.context),kt.framebuffer&&kt.framebuffer.append(yt,Bt),ni(Object.keys(kt.state)).forEach(function(ur){var Ht=kt.state[ur],sr=Ht.append(yt,Bt);ya(sr)?sr.forEach(function(Vt,Dr){Xi(Vt)?Bt.set(yt.next[ur],"["+Dr+"]",Vt):Bt.set(yt.next[ur],"["+Dr+"]",yt.link(Vt,{stable:!0}))}):sn(Ht)?Bt.set(nr.next,"."+ur,yt.link(sr,{stable:!0})):Bt.set(nr.next,"."+ur,sr)}),Co(yt,Bt,kt,!0,!0),[$t,Kr,Ar,na,Tr].forEach(function(ur){var Ht=kt.draw[ur];if(Ht){var sr=Ht.append(yt,Bt);Xi(sr)?Bt.set(nr.draw,"."+ur,sr):Bt.set(nr.draw,"."+ur,yt.link(sr),{stable:!0})}}),Object.keys(kt.uniforms).forEach(function(ur){var Ht=kt.uniforms[ur].append(yt,Bt);Array.isArray(Ht)&&(Ht="["+Ht.map(function(sr){return Xi(sr)?sr:yt.link(sr,{stable:!0})})+"]"),Bt.set(nr.uniforms,"["+yt.link(Zt.id(ur),{stable:!0})+"]",Ht)}),Object.keys(kt.attributes).forEach(function(ur){var Ht=kt.attributes[ur].append(yt,Bt),sr=yt.scopeAttrib(ur);Object.keys(new Ma).forEach(function(Vt){Bt.set(sr,"."+Vt,Ht[Vt])})}),kt.scopeVAO){var lr=kt.scopeVAO.append(yt,Bt);Xi(lr)?Bt.set(nr.vao,".targetVAO",lr):Bt.set(nr.vao,".targetVAO",yt.link(lr,{stable:!0}))}function dr(ur){var Ht=kt.shader[ur];if(Ht){var sr=Ht.append(yt,Bt);Xi(sr)?Bt.set(nr.shader,"."+ur,sr):Bt.set(nr.shader,"."+ur,yt.link(sr,{stable:!0}))}}dr(St),dr(Nt),Object.keys(kt.state).length>0&&(Bt(hr,".dirty=true;"),Bt.exit(hr,".dirty=true;")),Bt("a1(",yt.shared.context,",a0,",yt.batchId,");")}function wr(yt){if(!(typeof yt!="object"||ya(yt))){for(var kt=Object.keys(yt),Bt=0;Bt=0;--te){var me=mn[te];me&&me(Na,null,0)}fr.flush(),si&&si.update()}function Zn(){!kn&&mn.length>0&&(kn=c.next(Dn))}function Ds(){kn&&(c.cancel(Dn),kn=null)}function bl(te){te.preventDefault(),wa=!0,Ds(),In.forEach(function(me){me()})}function po(te){fr.getError(),wa=!1,ma.restore(),pn.restore(),di.restore(),Ha.restore(),Ua.restore(),Yi.restore(),Bi.restore(),si&&si.restore(),Ri.procs.refresh(),Zn(),Ii.forEach(function(me){me()})}Xi&&(Xi.addEventListener(cs,bl,!1),Xi.addEventListener(ms,po,!1));function Wl(){mn.length=0,Ds(),Xi&&(Xi.removeEventListener(cs,bl),Xi.removeEventListener(ms,po)),pn.clear(),Yi.clear(),Ua.clear(),Bi.clear(),Ha.clear(),Va.clear(),di.clear(),si&&si.clear(),an.forEach(function(te){te()})}function fs(te){function me(lr){var dr=v({},lr);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 ur(Ht){if(Ht in dr){var sr=dr[Ht];delete dr[Ht],Object.keys(sr).forEach(function(Vt){dr[Ht+"."+Vt]=sr[Vt]})}}return ur("blend"),ur("depth"),ur("cull"),ur("stencil"),ur("polygonOffset"),ur("scissor"),ur("sample"),"vao"in lr&&(dr.vao=lr.vao),dr}function Ge(lr,dr){var ur={},Ht={};return Object.keys(lr).forEach(function(sr){var Vt=lr[sr];if(h.isDynamic(Vt)){Ht[sr]=h.unbox(Vt,sr);return}else if(dr&&Array.isArray(Vt)){for(var Dr=0;Dr0)return yt.call(this,nr(lr|0),lr|0)}else if(Array.isArray(lr)){if(lr.length)return yt.call(this,lr,lr.length)}else return pr.call(this,lr)}return v(hr,{stats:wr,destroy:function(){Nr.destroy()}})}var Sl=Yi.setFBO=fs({framebuffer:h.define.call(null,Al,"framebuffer")});function kl(te,me){var Ge=0;Ri.procs.poll();var Le=me.color;Le&&(fr.clearColor(+Le[0]||0,+Le[1]||0,+Le[2]||0,+Le[3]||0),Ge|=al),"depth"in me&&(fr.clearDepth(+me.depth),Ge|=xl),"stencil"in me&&(fr.clearStencil(me.stencil|0),Ge|=gn),fr.clear(Ge)}function tu(te){if("framebuffer"in te)if(te.framebuffer&&te.framebuffer_reglType==="framebufferCube")for(var me=0;me<6;++me)Sl(v({framebuffer:te.framebuffer.faces[me]},te),kl);else Sl(te,kl);else kl(null,te)}function qs(te){mn.push(te);function me(){var Ge=Rl(mn,te);function Le(){var $e=Rl(mn,Le);mn[$e]=mn[mn.length-1],mn.length-=1,mn.length<=0&&Ds()}mn[Ge]=Le}return Zn(),{cancel:me}}function pl(){var te=xi.viewport,me=xi.scissor_box;te[0]=te[1]=me[0]=me[1]=0,Na.viewportWidth=Na.framebufferWidth=Na.drawingBufferWidth=te[2]=me[2]=fr.drawingBufferWidth,Na.viewportHeight=Na.framebufferHeight=Na.drawingBufferHeight=te[3]=me[3]=fr.drawingBufferHeight}function wl(){Na.tick+=1,Na.time=Cl(),pl(),Ri.procs.poll()}function Yn(){Ha.refresh(),pl(),Ri.procs.refresh(),si&&si.update()}function Cl(){return(m()-yn)/1e3}Yn();function Co(te,me){var Ge;switch(te){case"frame":return qs(me);case"lost":Ge=In;break;case"restore":Ge=Ii;break;case"destroy":Ge=an;break;default:}return Ge.push(me),{cancel:function(){for(var Le=0;Le=0},read:Ti,destroy:Wl,_gl:fr,_refresh:Yn,poll:function(){wl(),si&&si.update()},now:Cl,stats:Ya,getCachedCode:ve,preloadCachedCode:K});return Zt.onDone(null,_e),_e}return _c})}}),xT=Xe({"src/lib/prepare_regl.js"(Z,G){"use strict";var v=TE(),x=Cq();G.exports=function(E,e,t){var r=E._fullLayout,o=!0;return r._glcanvas.each(function(a){if(a.regl){a.regl.preloadCachedCode(t);return}if(!(a.pick&&!r._has("parcoords"))){try{a.regl=x({canvas:this,attributes:{antialias:!a.pick,preserveDrawingBuffer:!0},pixelRatio:E._context.plotGlPixelRatio||window.devicePixelRatio,extensions:e||[],cachedCode:t||{}})}catch{o=!1}a.regl||(o=!1),o&&this.addEventListener("webglcontextlost",function(n){E&&E.emit&&E.emit("plotly_webglcontextlost",{event:n,layer:a.key})},!1)}}),o||v({container:r._glcontainer.node()}),o}}}),p6=Xe({"src/traces/scattergl/plot.js"(h,G){"use strict";var v=HE(),x=a6(),S=hq(),E=kq(),e=sa(),t=Jd().selectMode,r=xT(),o=Fu(),a=O5(),n=qE().styleTextSelection,i={};function s(c,m,p,T){var l=c._size,_=c.width*T,w=c.height*T,A=l.l*T,M=l.b*T,g=l.r*T,b=l.t*T,d=l.w*T,u=l.h*T;return[A+m.domain[0]*d,M+p.domain[0]*u,_-g-(1-m.domain[1])*d,w-b-(1-p.domain[1])*u]}var h=G.exports=function(m,p,T){if(T.length){var l=m._fullLayout,_=p._scene,w=p.xaxis,A=p.yaxis,M,g;if(_){var b=r(m,["ANGLE_instanced_arrays","OES_element_index_uint"],i);if(!b){_.init();return}var d=_.count,u=l._glcanvas.data()[0].regl;if(a(m,p,T),_.dirty){if((_.line2d||_.error2d)&&!(_.scatter2d||_.fill2d||_.glText)&&u.clear({color:!0,depth:!0}),_.error2d===!0&&(_.error2d=S(u)),_.line2d===!0&&(_.line2d=x(u)),_.scatter2d===!0&&(_.scatter2d=v(u)),_.fill2d===!0&&(_.fill2d=x(u)),_.glText===!0)for(_.glText=new Array(d),M=0;M_.glText.length){var y=d-_.glText.length;for(M=0;MQ&&(isNaN(j[re])||isNaN(j[re+1]));)re-=2;ae.positions=j.slice(Q,re+2)}return ae}),_.line2d.update(_.lineOptions)),_.error2d){var L=(_.errorXOptions||[]).concat(_.errorYOptions||[]);_.error2d.update(L)}_.scatter2d&&_.scatter2d.update(_.markerOptions),_.fillOrder=e.repeat(null,d),_.fill2d&&(_.fillOptions=_.fillOptions.map(function(ae,j){var Q=T[j];if(!(!ae||!Q||!Q[0]||!Q[0].trace)){var re=Q[0],ce=re.trace,be=re.t,Ae=_.lineOptions[j],De,ze,Ze=[];ce._ownfill&&Ze.push(j),ce._nexttrace&&Ze.push(j+1),Ze.length&&(_.fillOrder[j]=Ze);var at=[],nt=Ae&&Ae.positions||be.positions,rt,st;if(ce.fill==="tozeroy"){for(rt=0;rtrt&&isNaN(nt[st+1]);)st-=2;nt[rt+1]!==0&&(at=[nt[rt],0]),at=at.concat(nt.slice(rt,st+2)),nt[st+1]!==0&&(at=at.concat([nt[st],0]))}else if(ce.fill==="tozerox"){for(rt=0;rtrt&&isNaN(nt[st]);)st-=2;nt[rt]!==0&&(at=[0,nt[rt+1]]),at=at.concat(nt.slice(rt,st+2)),nt[st]!==0&&(at=at.concat([0,nt[st+1]]))}else if(ce.fill==="toself"||ce.fill==="tonext"){for(at=[],De=0,ae.splitNull=!0,ze=0;ze-1;for(let[ae]of T)if(ae){var O=ae.trace,P=ae.t,U=P.index,B=O._length,X=P.x,$=P.y;if(O.selectedpoints||F||N){if(F||(F=!0),O.selectedpoints){var se=_.selectBatch[U]=e.selIndices2selPoints(O),le={};for(g=0;gw&&p||_n,f;for(y?f=p.sizeAvg||Math.max(p.size,3):f=S(h,m),A=0;A<_.length;A++)w=_[A],M=c[w],g=x.getFromId(s,h._diag[w][0])||{},b=x.getFromId(s,h._diag[w][1])||{},E(s,h,g,b,T[A],T[A],f);var R=o(s,h);return R.matrix||(R.matrix=!0),R.matrixOptions=p,R.selectedOptions=t(s,h,h.selected),R.unselectedOptions=t(s,h,h.unselected),[{x:!1,y:!1,t:{},trace:h}]}}}),zq=Xe({"node_modules/performance-now/lib/performance-now.js"(Z,G){(function(){var v,x,S,E,e,t;typeof performance<"u"&&performance!==null&&performance.now?G.exports=function(){return performance.now()}:typeof process<"u"&&process!==null&&process.hrtime?(G.exports=function(){return(v()-e)/1e6},x=process.hrtime,v=function(){var r;return r=x(),r[0]*1e9+r[1]},E=v(),t=process.uptime()*1e9,e=E-t):Date.now?(G.exports=function(){return Date.now()-S},S=Date.now()):(G.exports=function(){return new Date().getTime()-S},S=new Date().getTime())}).call(Z)}}),Fq=Xe({"node_modules/raf/index.js"(Z,G){var v=zq(),x=window,S=["moz","webkit"],E="AnimationFrame",e=x["request"+E],t=x["cancel"+E]||x["cancelRequest"+E];for(r=0;!e&&r{this.draw(),this.dirty=!0,this.planned=null})):(this.draw(),this.dirty=!0,E(()=>{this.dirty=!1})),this)},o.prototype.update=function(...s){if(!s.length)return;for(let m=0;mf||!p.lower&&y{h[T+_]=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,c){let m=s.id!=null?s.id:s,p=h,T=c;return m<<16|(p&255)<<8|T&255}function n(s,h,c){let m,p,T,l,_,w,A,M,g=s[h],b=s[c];return g.length>2?(m=g[0],T=g[2],p=g[1],l=g[3]):g.length?(m=p=g[0],T=l=g[1]):(m=g.x,p=g.y,T=g.x+g.width,l=g.y+g.height),b.length>2?(_=b[0],A=b[2],w=b[1],M=b[3]):b.length?(_=w=b[0],A=M=b[1]):(_=b.x,w=b.y,A=b.x+b.width,M=b.y+b.height),[_,p,A,l]}function i(s){if(typeof s=="number")return[s,s,s,s];if(s.length===2)return[s[0],s[1],s[0],s[1]];{let h=t(s);return[h.x,h.y,h.x+h.width,h.y+h.height]}}}}),Nq=Xe({"src/traces/splom/plot.js"(Z,G){"use strict";var v=Bq(),x=sa(),S=ef(),E=Jd().selectMode;G.exports=function(r,o,a){if(a.length)for(var n=0;n-1,N=E(p)||!!n.selectedpoints||F,O=!0;if(N){var P=n._length;if(n.selectedpoints){s.selectBatch=n.selectedpoints;var U=n.selectedpoints,B={};for(_=0;_=X[$][0]&&B<=X[$][1])return!0;return!1}function h(B){B.attr("x",-v.bar.captureWidth/2).attr("width",v.bar.captureWidth)}function c(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 X=p(B.brush.filter.getConsolidated(),B.height),$=[0],se,le,fe,V=X.length?X[0][0]:null,Y=0;YB[1]+$||X=.9*B[1]+.1*B[0]?"n":X<=.9*B[0]+.1*B[1]?"s":"ns"}function l(){x.select(document.body).style("cursor",null)}function _(B){B.attr("stroke-dasharray",m)}function w(B,X){var $=x.select(B).selectAll(".highlight, .highlight-shadow"),se=X?$.transition().duration(v.bar.snapDuration).each("end",X):$;_(se)}function A(B,X){var $=B.brush,se=$.filterSpecified,le=NaN,fe={},V;if(se){var Y=B.height,ee=$.filter.getConsolidated(),q=p(ee,Y),oe=NaN,ae=NaN,j=NaN;for(V=0;V<=q.length;V++){var Q=q[V];if(Q&&Q[0]<=X&&X<=Q[1]){oe=V;break}else if(ae=V?V-1:NaN,Q&&Q[0]>X){j=V;break}}if(le=oe,isNaN(le)&&(isNaN(ae)||isNaN(j)?le=isNaN(ae)?j:ae:le=X-q[ae][1]=De[0]&&Ae<=De[1]){fe.clickableOrdinalRange=De;break}}}return fe}function M(B,X){x.event.sourceEvent.stopPropagation();var $=X.height-x.mouse(B)[1]-2*v.verticalPadding,se=X.unitToPaddedPx.invert($),le=X.brush,fe=A(X,$),V=fe.interval,Y=le.svgBrush;if(Y.wasDragged=!1,Y.grabbingBar=fe.region==="ns",Y.grabbingBar){var ee=V.map(X.unitToPaddedPx);Y.grabPoint=$-ee[0]-v.verticalPadding,Y.barLength=ee[1]-ee[0]}Y.clickableOrdinalRange=fe.clickableOrdinalRange,Y.stayingIntervals=X.multiselect&&le.filterSpecified?le.filter.getConsolidated():[],V&&(Y.stayingIntervals=Y.stayingIntervals.filter(function(q){return q[0]!==V[0]&&q[1]!==V[1]})),Y.startExtent=fe.region?V[fe.region==="s"?1:0]:se,X.parent.inBrushDrag=!0,Y.brushStartCallback()}function g(B,X){x.event.sourceEvent.stopPropagation();var $=X.height-x.mouse(B)[1]-2*v.verticalPadding,se=X.brush.svgBrush;se.wasDragged=!0,se._dragging=!0,se.grabbingBar?se.newExtent=[$-se.grabPoint,$+se.barLength-se.grabPoint].map(X.unitToPaddedPx.invert):se.newExtent=[se.startExtent,X.unitToPaddedPx.invert($)].sort(e),X.brush.filterSpecified=!0,se.extent=se.stayingIntervals.concat([se.newExtent]),se.brushCallback(X),w(B.parentNode)}function b(B,X){var $=X.brush,se=$.filter,le=$.svgBrush;le._dragging||(d(B,X),g(B,X),X.brush.svgBrush.wasDragged=!1),le._dragging=!1;var fe=x.event;fe.sourceEvent.stopPropagation();var V=le.grabbingBar;if(le.grabbingBar=!1,le.grabLocation=void 0,X.parent.inBrushDrag=!1,l(),!le.wasDragged){le.wasDragged=void 0,le.clickableOrdinalRange?$.filterSpecified&&X.multiselect?le.extent.push(le.clickableOrdinalRange):(le.extent=[le.clickableOrdinalRange],$.filterSpecified=!0):V?(le.extent=le.stayingIntervals,le.extent.length===0&&z($)):z($),le.brushCallback(X),w(B.parentNode),le.brushEndCallback($.filterSpecified?se.getConsolidated():[]);return}var Y=function(){se.set(se.getConsolidated())};if(X.ordinal){var ee=X.unitTickvals;ee[ee.length-1]le.newExtent[0];le.extent=le.stayingIntervals.concat(q?[le.newExtent]:[]),le.extent.length||z($),le.brushCallback(X),q?w(B.parentNode,Y):(Y(),w(B.parentNode))}else Y();le.brushEndCallback($.filterSpecified?se.getConsolidated():[])}function d(B,X){var $=X.height-x.mouse(B)[1]-2*v.verticalPadding,se=A(X,$),le="crosshair";se.clickableOrdinalRange?le="pointer":se.region&&(le=se.region+"-resize"),x.select(document.body).style("cursor",le)}function u(B){B.on("mousemove",function(X){x.event.preventDefault(),X.parent.inBrushDrag||d(this,X)}).on("mouseleave",function(X){X.parent.inBrushDrag||l()}).call(x.behavior.drag().on("dragstart",function(X){M(this,X)}).on("drag",function(X){g(this,X)}).on("dragend",function(X){b(this,X)}))}function y(B,X){return B[0]-X[0]}function f(B,X,$){var se=$._context.staticPlot,le=B.selectAll(".background").data(E);le.enter().append("rect").classed("background",!0).call(h).call(c).style("pointer-events",se?"none":"auto").attr("transform",t(0,v.verticalPadding)),le.call(u).attr("height",function(Y){return Y.height-v.verticalPadding});var fe=B.selectAll(".highlight-shadow").data(E);fe.enter().append("line").classed("highlight-shadow",!0).attr("x",-v.bar.width/2).attr("stroke-width",v.bar.width+v.bar.strokeWidth).attr("stroke",X).attr("opacity",v.bar.strokeOpacity).attr("stroke-linecap","butt"),fe.attr("y1",function(Y){return Y.height}).call(_);var V=B.selectAll(".highlight").data(E);V.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"),V.attr("y1",function(Y){return Y.height}).call(_)}function R(B,X,$){var se=B.selectAll("."+v.cn.axisBrush).data(E,S);se.enter().append("g").classed(v.cn.axisBrush,!0),f(se,X,$)}function L(B){return B.svgBrush.extent.map(function(X){return X.slice()})}function z(B){B.filterSpecified=!1,B.svgBrush.extent=[[-1/0,1/0]]}function F(B){return function($){var se=$.brush,le=L(se),fe=le.slice();se.filter.set(fe),B()}}function N(B){for(var X=B.slice(),$=[],se,le=X.shift();le;){for(se=le.slice();(le=X.shift())&&le[0]<=se[1];)se[1]=Math.max(se[1],le[1]);$.push(se)}return $.length===1&&$[0][0]>$[0][1]&&($=[]),$}function O(){var B=[],X,$;return{set:function(se){B=se.map(function(le){return le.slice().sort(e)}).sort(y),B.length===1&&B[0][0]===-1/0&&B[0][1]===1/0&&(B=[[0,-1]]),X=N(B),$=B.reduce(function(le,fe){return[Math.min(le[0],fe[0]),Math.max(le[1],fe[1])]},[1/0,-1/0])},get:function(){return B.slice()},getConsolidated:function(){return X},getBounds:function(){return $}}}function P(B,X,$,se,le,fe){var V=O();return V.set($),{filter:V,filterSpecified:X,svgBrush:{extent:[],brushStartCallback:se,brushCallback:F(le),brushEndCallback:fe}}}function U(B,X){if(Array.isArray(B[0])?(B=B.map(function(se){return se.sort(e)}),X.multiselect?B=N(B.sort(y)):B=[B[0]]):B=[B.sort(e)],X.tickvals){var $=X.tickvals.slice().sort(e);if(B=B.map(function(se){var le=[i(0,$,se[0],[]),i(1,$,se[1],[])];if(le[1]>le[0])return le}).filter(function(se){return se}),!B.length)return}return B.length>1?B:B[0]}G.exports={makeBrush:P,ensureAxisBrush:R,cleanRanges:U}}}),Xq=Xe({"src/traces/parcoords/defaults.js"(Z,G){"use strict";var v=sa(),x=wp().hasColorscale,S=_h(),E=wc().defaults,e=hp(),t=Go(),r=m6(),o=g6(),a=Ax().maxDimensionCount,n=bT();function i(h,c,m,p,T){var l=T("line.color",m);if(x(h,"line")&&v.isArrayOrTypedArray(l)){if(l.length)return T("line.colorscale"),S(h,c,p,T,{prefix:"line.",cLetter:"c"}),l.length;c.line.color=m}return 1/0}function s(h,c,m,p){function T(M,g){return v.coerce(h,c,r.dimensions,M,g)}var l=T("values"),_=T("visible");if(l&&l.length||(_=c.visible=!1),_){T("label"),T("tickvals"),T("ticktext"),T("tickformat");var w=T("range");c._ax={_id:"y",type:"linear",showexponent:"all",exponentformat:"B",range:w},t.setConvert(c._ax,p.layout),T("multiselect");var A=T("constraintrange");A&&(c.constraintrange=o.cleanRanges(A,c))}}G.exports=function(c,m,p,T){function l(g,b){return v.coerce(c,m,r,g,b)}var _=c.dimensions;Array.isArray(_)&&_.length>a&&(v.log("parcoords traces support up to "+a+" dimensions at the moment"),_.splice(a));var w=e(c,m,{name:"dimensions",layout:T,handleItemDefaults:s}),A=i(c,m,p,T,l);E(m,T,l),(!Array.isArray(w)||!w.length)&&(m.visible=!1),n(m,w,"values",A);var M=v.extendFlat({},T.font,{size:Math.round(T.font.size/1.2)});v.coerceFont(l,"labelfont",M),v.coerceFont(l,"tickfont",M,{autoShadowDflt:!0}),v.coerceFont(l,"rangefont",M),l("labelangle"),l("labelside"),l("unselected.line.color"),l("unselected.line.opacity")}}}),Zq=Xe({"src/traces/parcoords/calc.js"(Z,G){"use strict";var v=sa().isArrayOrTypedArray,x=rc(),S=kv().wrap;G.exports=function(t,r){var o,a;return x.hasColorscale(r,"line")&&v(r.line.color)?(o=r.line.color,a=x.extractOpts(r.line).colorscale,x.calc(t,r,{vals:o,containerStr:"line",cLetter:"c"})):(o=E(r._length),a=[[0,r.line.color],[1,r.line.color]]),S({lineColor:o,cscale:a})};function E(e){for(var t=new Array(e),r=0;r>>16,(Z&65280)>>>8,Z&255],alpha:1};if(typeof Z=="number")return{space:"rgb",values:[Z>>>16,(Z&65280)>>>8,Z&255],alpha:1};if(Z=String(Z).toLowerCase(),wT.default[Z])S=wT.default[Z].slice(),e="rgb";else if(Z==="transparent")E=0,e="rgb",S=[0,0,0];else if(Z[0]==="#"){var t=Z.slice(1),r=t.length,o=r<=4;E=1,o?(S=[parseInt(t[0]+t[0],16),parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16)],r===4&&(E=parseInt(t[3]+t[3],16)/255)):(S=[parseInt(t[0]+t[1],16),parseInt(t[2]+t[3],16),parseInt(t[4]+t[5],16)],r===8&&(E=parseInt(t[6]+t[7],16)/255)),S[0]||(S[0]=0),S[1]||(S[1]=0),S[2]||(S[2]=0),e="rgb"}else if(x=/^((?:rgba?|hs[lvb]a?|hwba?|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms|oklch|oklab|color))\s*\(([^\)]*)\)/.exec(Z)){var a=x[1];e=a.replace(/a$/,"");var n=e==="cmyk"?4:e==="gray"?1:3;S=x[2].trim().split(/\s*[,\/]\s*|\s+/),e==="color"&&(e=S.shift()),S=S.map(function(i,s){if(i[i.length-1]==="%")return i=parseFloat(i)/100,s===3?i:e==="rgb"?i*255:e[0]==="h"||e[0]==="l"&&!s?i*100:e==="lab"?i*125:e==="lch"?s<2?i*150:i*360:e[0]==="o"&&!s?i:e==="oklab"?i*.4:e==="oklch"?s<2?i*.4:i*360:i;if(e[s]==="h"||s===2&&e[e.length-1]==="h"){if(TT[i]!==void 0)return TT[i];if(i.endsWith("deg"))return parseFloat(i);if(i.endsWith("turn"))return parseFloat(i)*360;if(i.endsWith("grad"))return parseFloat(i)*360/400;if(i.endsWith("rad"))return parseFloat(i)*180/Math.PI}return i==="none"?0:parseFloat(i)}),E=S.length>n?S.pop():1}else/[0-9](?:\s|\/|,)/.test(Z)&&(S=Z.match(/([0-9]+)/g).map(function(i){return parseFloat(i)}),e=((v=(G=Z.match(/([a-z])/ig))==null?void 0:G.join(""))==null?void 0:v.toLowerCase())||"rgb");return{space:e,values:S,alpha:E}}var wT,y6,TT,Kq=Vo({"node_modules/color-parse/index.js"(){wT=jp(xE(),1),y6=Yq,TT={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}}}),Sx,_6=Vo({"node_modules/color-space/rgb.js"(){Sx={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}}}),Mx,Jq=Vo({"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 G=Z[0]/360,v=Z[1]/100,x=Z[2]/100,S,E,e,t,r,o=0;if(v===0)return r=x*255,[r,r,r];for(E=x<.5?x*(1+v):x+v-x*v,S=2*x-E,t=[0,0,0];o<3;)e=G+1/3*-(o-1),e<0?e++:e>1&&e--,r=6*e<1?S+(E-S)*6*e:2*e<1?E:3*e<2?S+(E-S)*(2/3-e)*6:S,t[o++]=r*255;return t}},Sx.hsl=function(Z){var G=Z[0]/255,v=Z[1]/255,x=Z[2]/255,S=Math.min(G,v,x),E=Math.max(G,v,x),e=E-S,t,r,o;return E===S?t=0:G===E?t=(v-x)/e:v===E?t=2+(x-G)/e:x===E&&(t=4+(G-v)/e),t=Math.min(t*60,360),t<0&&(t+=360),o=(S+E)/2,E===S?r=0:o<=.5?r=e/(E+S):r=e/(2-E-S),[t,r*100,o*100]}}}),x6={};Kl(x6,{default:()=>$q});function $q(Z){Array.isArray(Z)&&Z.raw&&(Z=String.raw(...arguments)),Z instanceof Number&&(Z=+Z);var G,v,x,S=y6(Z);if(!S.space)return[];let E=S.space[0]==="h"?Mx.min:Sx.min,e=S.space[0]==="h"?Mx.max:Sx.max;return G=Array(3),G[0]=Math.min(Math.max(S.values[0],E[0]),e[0]),G[1]=Math.min(Math.max(S.values[1],E[1]),e[1]),G[2]=Math.min(Math.max(S.values[2],E[2]),e[2]),S.space[0]==="h"&&(G=Mx.rgb(G)),G.push(Math.min(Math.max(S.alpha,0),1)),G}var Qq=Vo({"node_modules/color-rgba/index.js"(){Kq(),_6(),Jq()}}),b6=Xe({"src/traces/parcoords/helpers.js"(Z){"use strict";var G=sa().isTypedArray;Z.convertTypedArray=function(v){return G(v)?Array.prototype.slice.call(v):v},Z.isOrdinal=function(v){return!!v.tickvals},Z.isVisible=function(v){return v.visible||!("visible"in v)}}}),eV=Xe({"src/traces/parcoords/lines.js"(Z,G){"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(` `),x=["precision highp float;","","varying vec4 fragColor;","","void main() {"," gl_FragColor = fragColor;","}"].join(` `),S=Ax().maxDimensionCount,E=sa(),e=1e-6,t=2048,r=new Uint8Array(4),o=new Uint8Array(4),a={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function n(b){b.read({x:0,y:0,width:1,height:1,data:r})}function i(b,d,u,y,f){var R=b._gl;R.enable(R.SCISSOR_TEST),R.scissor(d,u,y,f),b.clear({color:[0,0,0,0],depth:1})}function s(b,d,u,y,f,R){var L=R.key;function z(F){var N=Math.min(y,f-F*y);F===0&&(window.cancelAnimationFrame(u.currentRafs[L]),delete u.currentRafs[L],i(b,R.scissorX,R.scissorY,R.scissorWidth,R.viewBoxSize[1])),!u.clearOnly&&(R.count=2*N,R.offset=2*F*y,d(R),F*y+N>>8*d)%256/255}function p(b,d,u){for(var y=new Array(b*(S+4)),f=0,R=0;Rze&&(ze=ae[ce].dim1.canvasX,Ae=ce);re===0&&i(f,0,0,N.canvasWidth,N.canvasHeight);var Ze=V(u);for(ce=0;cece._length&&(st=st.slice(0,ce._length));var Me=ce.tickvals,ye;function he(Pt,It){return{val:Pt,text:ye[It]}}function Oe(Pt,It){return Pt.val-It.val}if(S(Me)&&Me.length){x.isTypedArray(Me)&&(Me=Array.from(Me)),ye=ce.ticktext,!S(ye)||!ye.length?ye=Me.map(E(ce.tickformat)):ye.length>Me.length?ye=ye.slice(0,Me.length):Me.length>ye.length&&(Me=Me.slice(0,ye.length));for(var tt=1;tt=It||mr>=qt)return;var qr=Qe.lineLayer.readPixel(kr,qt-1-mr),Sr=qr[3]!==0,Rr=Sr?qr[2]+256*(qr[1]+256*qr[0]):null,wt={x:kr,y:mr,clientX:Pt.clientX,clientY:Pt.clientY,dataIndex:Qe.model.key,curveNumber:Rr};Rr!==Ae&&(Sr?Y.hover(wt):Y.unhover&&Y.unhover(wt),Ae=Rr)}}),be.style("opacity",function(Qe){return Qe.pick?0:1}),oe.style("background","rgba(255, 255, 255, 0)");var ze=oe.selectAll("."+T.cn.parcoords).data(ce,h);ze.exit().remove(),ze.enter().append("g").classed(T.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),ze.attr("transform",function(Qe){return o(Qe.model.translateX,Qe.model.translateY)});var Ze=ze.selectAll("."+T.cn.parcoordsControlView).data(c,h);Ze.enter().append("g").classed(T.cn.parcoordsControlView,!0),Ze.attr("transform",function(Qe){return o(Qe.model.pad.l,Qe.model.pad.t)});var at=Ze.selectAll("."+T.cn.yAxis).data(function(Qe){return Qe.dimensions},h);at.enter().append("g").classed(T.cn.yAxis,!0),Ze.each(function(Qe){U(at,Qe,j)}),be.each(function(Qe){if(Qe.viewModel){!Qe.lineLayer||Y?Qe.lineLayer=_(this,Qe):Qe.lineLayer.update(Qe),(Qe.key||Qe.key===0)&&(Qe.viewModel[Qe.key]=Qe.lineLayer);var Pt=!Qe.context||Y;Qe.lineLayer.render(Qe.viewModel.panels,Pt)}}),at.attr("transform",function(Qe){return o(Qe.xScale(Qe.xIndex),0)}),at.call(v.behavior.drag().origin(function(Qe){return Qe}).on("drag",function(Qe){var Pt=Qe.parent;re.linePickActive(!1),Qe.x=Math.max(-T.overdrag,Math.min(Qe.model.width+T.overdrag,v.event.x)),Qe.canvasX=Qe.x*Qe.model.canvasPixelRatio,at.sort(function(It,qt){return It.x-qt.x}).each(function(It,qt){It.xIndex=qt,It.x=Qe===It?It.x:It.xScale(It.xIndex),It.canvasX=It.x*It.model.canvasPixelRatio}),U(at,Pt,j),at.filter(function(It){return Math.abs(Qe.xIndex-It.xIndex)!==0}).attr("transform",function(It){return o(It.xScale(It.xIndex),0)}),v.select(this).attr("transform",o(Qe.x,0)),at.each(function(It,qt,Wt){Wt===Qe.parent.key&&(Pt.dimensions[qt]=It)}),Pt.contextLayer&&Pt.contextLayer.render(Pt.panels,!1,!L(Pt)),Pt.focusLayer.render&&Pt.focusLayer.render(Pt.panels)}).on("dragend",function(Qe){var Pt=Qe.parent;Qe.x=Qe.xScale(Qe.xIndex),Qe.canvasX=Qe.x*Qe.model.canvasPixelRatio,U(at,Pt,j),v.select(this).attr("transform",function(It){return o(It.x,0)}),Pt.contextLayer&&Pt.contextLayer.render(Pt.panels,!1,!L(Pt)),Pt.focusLayer&&Pt.focusLayer.render(Pt.panels),Pt.pickLayer&&Pt.pickLayer.render(Pt.panels,!0),re.linePickActive(!0),Y&&Y.axesMoved&&Y.axesMoved(Pt.key,Pt.dimensions.map(function(It){return It.crossfilterDimensionIndex}))})),at.exit().remove();var nt=at.selectAll("."+T.cn.axisOverlays).data(c,h);nt.enter().append("g").classed(T.cn.axisOverlays,!0),nt.selectAll("."+T.cn.axis).remove();var rt=nt.selectAll("."+T.cn.axis).data(c,h);rt.enter().append("g").classed(T.cn.axis,!0),rt.each(function(Qe){var Pt=Qe.model.height/Qe.model.tickDistance,It=Qe.domainScale,qt=It.domain();v.select(this).call(v.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(Pt,Qe.tickFormat).tickValues(Qe.ordinal?qt:null).tickFormat(function(Wt){return p.isOrdinal(Qe)?Wt:X(Qe.model.dimensions[Qe.visibleIndex],Wt)}).scale(It)),n.font(rt.selectAll("text"),Qe.model.tickFont)}),rt.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),rt.selectAll("text").style("cursor","default");var st=nt.selectAll("."+T.cn.axisHeading).data(c,h);st.enter().append("g").classed(T.cn.axisHeading,!0);var Me=st.selectAll("."+T.cn.axisTitle).data(c,h);Me.enter().append("text").classed(T.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events",ee?"none":"auto"),Me.text(function(Qe){return Qe.label}).each(function(Qe){var Pt=v.select(this);n.font(Pt,Qe.model.labelFont),a.convertToTspans(Pt,le)}).attr("transform",function(Qe){var Pt=P(Qe.model.labelAngle,Qe.model.labelSide),It=T.axisTitleOffset;return(Pt.dir>0?"":o(0,2*It+Qe.model.height))+r(Pt.degrees)+o(-It*Pt.dx,-It*Pt.dy)}).attr("text-anchor",function(Qe){var Pt=P(Qe.model.labelAngle,Qe.model.labelSide),It=Math.abs(Pt.dx),qt=Math.abs(Pt.dy);return 2*It>qt?Pt.dir*Pt.dx<0?"start":"end":"middle"});var ye=nt.selectAll("."+T.cn.axisExtent).data(c,h);ye.enter().append("g").classed(T.cn.axisExtent,!0);var he=ye.selectAll("."+T.cn.axisExtentTop).data(c,h);he.enter().append("g").classed(T.cn.axisExtentTop,!0),he.attr("transform",o(0,-T.axisExtentOffset));var Oe=he.selectAll("."+T.cn.axisExtentTopText).data(c,h);Oe.enter().append("text").classed(T.cn.axisExtentTopText,!0).call(N),Oe.text(function(Qe){return $(Qe,!0)}).each(function(Qe){n.font(v.select(this),Qe.model.rangeFont)});var tt=ye.selectAll("."+T.cn.axisExtentBottom).data(c,h);tt.enter().append("g").classed(T.cn.axisExtentBottom,!0),tt.attr("transform",function(Qe){return o(0,Qe.model.height+T.axisExtentOffset)});var ot=tt.selectAll("."+T.cn.axisExtentBottomText).data(c,h);ot.enter().append("text").classed(T.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(N),ot.text(function(Qe){return $(Qe,!1)}).each(function(Qe){n.font(v.select(this),Qe.model.rangeFont)}),l.ensureAxisBrush(nt,Q,le)}}}),w6=Xe({"src/traces/parcoords/plot.js"(r,G){"use strict";var v=tV(),x=xT(),S=b6().isVisible,E={};function e(o,a,n){var i=a.indexOf(n),s=o.indexOf(i);return s===-1&&(s+=a.length),s}function t(o,a){return function(i,s){return e(o,a,i)-e(o,a,s)}}var r=G.exports=function(a,n){var i=a._fullLayout,s=x(a,[],E);if(s){var h={},c={},m={},p={},T=i._size;n.forEach(function(M,g){var b=M[0].trace;m[g]=b.index;var d=p[g]=b.index;h[g]=a.data[d].dimensions,c[g]=a.data[d].dimensions.slice()});var l=function(M,g,b){var d=c[M][g],u=b.map(function(F){return F.slice()}),y="dimensions["+g+"].constraintrange",f=i._tracePreGUI[a._fullData[m[M]]._fullInput.uid];if(f[y]===void 0){var R=d.constraintrange;f[y]=R||null}var L=a._fullData[m[M]].dimensions[g];u.length?(u.length===1&&(u=u[0]),d.constraintrange=u,L.constraintrange=u.slice(),u=[u]):(delete d.constraintrange,delete L.constraintrange,u=null);var z={};z[y]=u,a.emit("plotly_restyle",[z,[p[M]]])},_=function(M){a.emit("plotly_hover",M)},w=function(M){a.emit("plotly_unhover",M)},A=function(M,g){var b=t(g,c[M].filter(S));h[M].sort(b),c[M].filter(function(d){return!S(d)}).sort(function(d){return c[M].indexOf(d)}).forEach(function(d){h[M].splice(h[M].indexOf(d),1),h[M].splice(c[M].indexOf(d),0,d)}),a.emit("plotly_restyle",[{dimensions:[h[M]]},[p[M]]])};v(a,n,{width:T.w,height:T.h,margin:{t:T.t,r:T.r,b:T.b,l:T.l}},{filterChanged:l,hover:_,unhover:w,axesMoved:A})}};r.reglPrecompiled=E}}),rV=Xe({"src/traces/parcoords/base_plot.js"(Z){"use strict";var G=Hn(),v=Hh().getModuleCalcData,x=w6(),S=vd();Z.name="parcoords",Z.plot=function(E){var e=v(E.calcdata,"parcoords")[0];e.length&&x(E,e)},Z.clean=function(E,e,t,r){var o=r._has&&r._has("parcoords"),a=e._has&&e._has("parcoords");o&&!a&&(r._paperdiv.selectAll(".parcoords").remove(),r._glimages.selectAll("*").remove())},Z.toSVG=function(E){var e=E._fullLayout._glimages,t=G.select(E).selectAll(".svg-container"),r=t.filter(function(a,n){return n===t.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus");function o(){var a=this,n=a.toDataURL("image/png"),i=e.append("svg:image");i.attr({xmlns:S.svg,"xlink:href":n,preserveAspectRatio:"none",x:0,y:0,width:a.style.width,height:a.style.height})}r.each(o),window.setTimeout(function(){G.selectAll("#filterBarPattern").attr("id","filterBarPattern")},60)}}}),aV=Xe({"src/traces/parcoords/base_index.js"(Z,G){"use strict";G.exports={attributes:m6(),supplyDefaults:Xq(),calc:Zq(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:rV(),categories:["gl","regl","noOpacity","noHover"],meta:{}}}}),iV=Xe({"src/traces/parcoords/index.js"(Z,G){"use strict";var v=aV();v.plot=w6(),G.exports=v}}),nV=Xe({"lib/parcoords.js"(Z,G){"use strict";G.exports=iV()}}),T6=Xe({"src/traces/parcats/attributes.js"(Z,G){"use strict";var v=Qo().extendFlat,x=ru(),S=tc(),E=ku(),{hovertemplateAttrs:e,templatefallbackAttrs:t}=Jl(),r=wc().attributes,o=v({editType:"calc"},E("line",{editTypeOverride:"calc"}),{shape:{valType:"enumerated",values:["linear","hspline"],dflt:"linear",editType:"plot"},hovertemplate:e({editType:"plot",arrayOk:!1},{keys:["count","probability"]}),hovertemplatefallback:t({editType:"plot"})});G.exports={domain:r({name:"parcats",trace:!0,editType:"calc"}),hoverinfo:v({},x.hoverinfo,{flags:["count","probability"],editType:"plot",arrayOk:!1}),hoveron:{valType:"enumerated",values:["category","color","dimension"],dflt:"category",editType:"plot"},hovertemplate:e({editType:"plot",arrayOk:!1},{keys:["count","probability","category","categorycount","colorcount","bandcolorcount"]}),hovertemplatefallback:t({editType:"plot"}),arrangement:{valType:"enumerated",values:["perpendicular","freeform","fixed"],dflt:"perpendicular",editType:"plot"},bundlecolors:{valType:"boolean",dflt:!0,editType:"plot"},sortpaths:{valType:"enumerated",values:["forward","backward"],dflt:"forward",editType:"plot"},labelfont:S({editType:"calc"}),tickfont:S({autoShadowDflt:!0,editType:"calc"}),dimensions:{_isLinkedToArray:"dimension",label:{valType:"string",editType:"calc"},categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},ticktext:{valType:"data_array",editType:"calc"},values:{valType:"data_array",dflt:[],editType:"calc"},displayindex:{valType:"integer",editType:"calc"},editType:"calc",visible:{valType:"boolean",dflt:!0,editType:"calc"}},line:o,counts:{valType:"number",min:0,dflt:1,arrayOk:!0,editType:"calc"},customdata:void 0,hoverlabel:void 0,ids:void 0,legend:void 0,legendgroup:void 0,legendrank:void 0,opacity:void 0,selectedpoints:void 0,showlegend:void 0}}}),oV=Xe({"src/traces/parcats/defaults.js"(Z,G){"use strict";var v=sa(),x=wp().hasColorscale,S=_h(),E=wc().defaults,e=hp(),t=T6(),r=bT(),o=bp().isTypedArraySpec;function a(i,s,h,c,m){m("line.shape"),m("line.hovertemplate"),m("line.hovertemplatefallback");var p=m("line.color",c.colorway[0]);if(x(i,"line")&&v.isArrayOrTypedArray(p)){if(p.length)return m("line.colorscale"),S(i,s,c,m,{prefix:"line.",cLetter:"c"}),p.length;s.line.color=h}return 1/0}function n(i,s){function h(w,A){return v.coerce(i,s,t.dimensions,w,A)}var c=h("values"),m=h("visible");if(c&&c.length||(m=s.visible=!1),m){h("label"),h("displayindex",s._index);var p=i.categoryarray,T=v.isArrayOrTypedArray(p)&&p.length>0||o(p),l;T&&(l="array");var _=h("categoryorder",l);_==="array"?(h("categoryarray"),h("ticktext")):(delete i.categoryarray,delete i.ticktext),!T&&_==="array"&&(s.categoryorder="trace")}}G.exports=function(s,h,c,m){function p(w,A){return v.coerce(s,h,t,w,A)}var T=e(s,h,{name:"dimensions",handleItemDefaults:n}),l=a(s,h,c,m,p);E(h,m,p),(!Array.isArray(T)||!T.length)&&(h.visible=!1),r(h,T,"values",l),p("hoveron"),p("hovertemplate"),p("hovertemplatefallback"),p("arrangement"),p("bundlecolors"),p("sortpaths"),p("counts");var _=m.font;v.coerceFont(p,"labelfont",_,{overrideDflt:{size:Math.round(_.size)}}),v.coerceFont(p,"tickfont",_,{autoShadowDflt:!0,overrideDflt:{size:Math.round(_.size/1.2)}})}}}),sV=Xe({"src/traces/parcats/calc.js"(Z,G){"use strict";var v=kv().wrap,x=wp().hasColorscale,S=Tp(),E=r5(),e=es(),t=sa(),r=rs();G.exports=function(_,w){var A=t.filterVisible(w.dimensions);if(A.length===0)return[];var M=A.map(function(V){var Y;if(V.categoryorder==="trace")Y=null;else if(V.categoryorder==="array")Y=V.categoryarray;else{Y=E(V.values);for(var ee=!0,q=0;q=l.length||_[l[w]]!==void 0)return!1;_[l[w]]=!0}return!0}}}),lV=Xe({"src/traces/parcats/parcats.js"(Z,G){"use strict";var v=Hn(),x=(pg(),zf(p0)).interpolateNumber,S=k2(),E=rf(),e=sa(),t=e.strTranslate,r=es(),o=Ch(),a=ou();function n(q,oe,ae,j){var Q=oe._context.staticPlot,re=q.map(le.bind(0,oe,ae)),ce=j.selectAll("g.parcatslayer").data([null]);ce.enter().append("g").attr("class","parcatslayer").style("pointer-events",Q?"none":"all");var be=ce.selectAll("g.trace.parcats").data(re,i),Ae=be.enter().append("g").attr("class","trace parcats");be.attr("transform",function(he){return t(he.x,he.y)}),Ae.append("g").attr("class","paths");var De=be.select("g.paths"),ze=De.selectAll("path.path").data(function(he){return he.paths},i);ze.attr("fill",function(he){return he.model.color});var Ze=ze.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",function(he){return he.model.color}).attr("fill-opacity",0);_(Ze),ze.attr("d",function(he){return he.svgD}),Ze.empty()||ze.sort(h),ze.exit().remove(),ze.on("mouseover",c).on("mouseout",m).on("click",l),Ae.append("g").attr("class","dimensions");var at=be.select("g.dimensions"),nt=at.selectAll("g.dimension").data(function(he){return he.dimensions},i);nt.enter().append("g").attr("class","dimension"),nt.attr("transform",function(he){return t(he.x,0)}),nt.exit().remove();var rt=nt.selectAll("g.category").data(function(he){return he.categories},i),st=rt.enter().append("g").attr("class","category");rt.attr("transform",function(he){return t(0,he.y)}),st.append("rect").attr("class","catrect").attr("pointer-events","none"),rt.select("rect.catrect").attr("fill","none").attr("width",function(he){return he.width}).attr("height",function(he){return he.height}),M(st);var Me=rt.selectAll("rect.bandrect").data(function(he){return he.bands},i);Me.each(function(){e.raiseToTop(this)}),Me.attr("fill",function(he){return he.color});var ye=Me.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",function(he){return he.color}).attr("fill-opacity",0);Me.attr("fill",function(he){return he.color}).attr("width",function(he){return he.width}).attr("height",function(he){return he.height}).attr("y",function(he){return he.y}).attr("cursor",function(he){return he.parcatsViewModel.arrangement==="fixed"?"default":he.parcatsViewModel.arrangement==="perpendicular"?"ns-resize":"move"}),b(ye),Me.exit().remove(),st.append("text").attr("class","catlabel").attr("pointer-events","none"),rt.select("text.catlabel").attr("text-anchor",function(he){return s(he)?"start":"end"}).attr("alignment-baseline","middle").style("fill","rgb(0, 0, 0)").attr("x",function(he){return s(he)?he.width+5:-5}).attr("y",function(he){return he.height/2}).text(function(he){return he.model.categoryLabel}).each(function(he){r.font(v.select(this),he.parcatsViewModel.categorylabelfont),a.convertToTspans(v.select(this),oe)}),st.append("text").attr("class","dimlabel"),rt.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",function(he){return he.parcatsViewModel.arrangement==="fixed"?"default":"ew-resize"}).attr("x",function(he){return he.width/2}).attr("y",-5).text(function(he,Oe){return Oe===0?he.parcatsViewModel.model.dimensions[he.model.dimensionInd].dimensionLabel:null}).each(function(he){r.font(v.select(this),he.parcatsViewModel.labelfont)}),rt.selectAll("rect.bandrect").on("mouseover",N).on("mouseout",O),rt.exit().remove(),nt.call(v.behavior.drag().origin(function(he){return{x:he.x,y:0}}).on("dragstart",P).on("drag",U).on("dragend",B)),be.each(function(he){he.traceSelection=v.select(this),he.pathSelection=v.select(this).selectAll("g.paths").selectAll("path.path"),he.dimensionSelection=v.select(this).selectAll("g.dimensions").selectAll("g.dimension")}),be.exit().remove()}G.exports=function(q,oe,ae,j){n(ae,q,j,oe)};function i(q){return q.key}function s(q){var oe=q.parcatsViewModel.dimensions.length,ae=q.parcatsViewModel.dimensions[oe-1].model.dimensionInd;return q.model.dimensionInd===ae}function h(q,oe){return q.model.rawColor>oe.model.rawColor?1:q.model.rawColor"),Qe=v.mouse(Q)[0];E.loneHover({trace:re,x:rt-be.left+Ae.left,y:st-be.top+Ae.top,text:ot,color:q.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:Me,idealAlign:Qe1&&De.displayInd===Ae.dimensions.length-1?(at=ce.left,nt="left"):(at=ce.left+ce.width,nt="right");var rt=be.model.count,st=be.model.categoryLabel,Me=rt/be.parcatsViewModel.model.count,ye={countLabel:rt,categoryLabel:st,probabilityLabel:Me.toFixed(3)},he=[];be.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&he.push(["Count:",ye.countLabel].join(" ")),be.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&he.push(["P("+ye.categoryLabel+"):",ye.probabilityLabel].join(" "));var Oe=he.join("
");return{trace:ze,x:j*(at-oe.left),y:Q*(Ze-oe.top),text:Oe,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:nt,hovertemplate:ze.hovertemplate,hovertemplateLabels:ye,eventData:[{data:ze._input,fullData:ze,count:rt,category:st,probability:Me}]}}function z(q,oe,ae){var j=[];return v.select(ae.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each(function(){var Q=this;j.push(L(q,oe,Q))}),j}function F(q,oe,ae){q._fullLayout._calcInverseTransform(q);var j=q._fullLayout._invScaleX,Q=q._fullLayout._invScaleY,re=ae.getBoundingClientRect(),ce=v.select(ae).datum(),be=ce.categoryViewModel,Ae=be.parcatsViewModel,De=Ae.model.dimensions[be.model.dimensionInd],ze=Ae.trace,Ze=re.y+re.height/2,at,nt;Ae.dimensions.length>1&&De.displayInd===Ae.dimensions.length-1?(at=re.left,nt="left"):(at=re.left+re.width,nt="right");var rt=be.model.categoryLabel,st=ce.parcatsViewModel.model.count,Me=0;ce.categoryViewModel.bands.forEach(function(Wt){Wt.color===ce.color&&(Me+=Wt.count)});var ye=be.model.count,he=0;Ae.pathSelection.each(function(Wt){Wt.model.color===ce.color&&(he+=Wt.model.count)});var Oe=Me/st,tt=Me/he,ot=Me/ye,Qe={countLabel:Me,categoryLabel:rt,probabilityLabel:Oe.toFixed(3)},Pt=[];be.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&Pt.push(["Count:",Qe.countLabel].join(" ")),be.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&(Pt.push("P(color \u2229 "+rt+"): "+Qe.probabilityLabel),Pt.push("P("+rt+" | color): "+tt.toFixed(3)),Pt.push("P(color | "+rt+"): "+ot.toFixed(3)));var It=Pt.join("
"),qt=o.mostReadable(ce.color,["black","white"]);return{trace:ze,x:j*(at-oe.left),y:Q*(Ze-oe.top),text:It,color:ce.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:qt,fontSize:10,idealAlign:nt,hovertemplate:ze.hovertemplate,hovertemplateLabels:Qe,eventData:[{data:ze._input,fullData:ze,category:rt,count:st,probability:Oe,categorycount:ye,colorcount:he,bandcolorcount:Me}]}}function N(q){if(!q.parcatsViewModel.dragDimension&&q.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){var oe=v.mouse(this)[1];if(oe<-1)return;var ae=q.parcatsViewModel.graphDiv,j=ae._fullLayout,Q=j._paperdiv.node().getBoundingClientRect(),re=q.parcatsViewModel.hoveron,ce=this;if(re==="color"?(y(ce),R(ce,"plotly_hover",v.event)):(u(ce),f(ce,"plotly_hover",v.event)),q.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var be;re==="category"?be=L(ae,Q,ce):re==="color"?be=F(ae,Q,ce):re==="dimension"&&(be=z(ae,Q,ce)),be&&E.loneHover(be,{container:j._hoverlayer.node(),outerContainer:j._paper.node(),gd:ae})}}}function O(q){var oe=q.parcatsViewModel;if(!oe.dragDimension&&(_(oe.pathSelection),M(oe.dimensionSelection.selectAll("g.category")),b(oe.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),E.loneUnhover(oe.graphDiv._fullLayout._hoverlayer.node()),oe.pathSelection.sort(h),oe.hoverinfoItems.indexOf("skip")===-1)){var ae=q.parcatsViewModel.hoveron,j=this;ae==="color"?R(j,"plotly_unhover",v.event):f(j,"plotly_unhover",v.event)}}function P(q){q.parcatsViewModel.arrangement!=="fixed"&&(q.dragDimensionDisplayInd=q.model.displayInd,q.initialDragDimensionDisplayInds=q.parcatsViewModel.model.dimensions.map(function(oe){return oe.displayInd}),q.dragHasMoved=!1,q.dragCategoryDisplayInd=null,v.select(this).selectAll("g.category").select("rect.catrect").each(function(oe){var ae=v.mouse(this)[0],j=v.mouse(this)[1];-2<=ae&&ae<=oe.width+2&&-2<=j&&j<=oe.height+2&&(q.dragCategoryDisplayInd=oe.model.displayInd,q.initialDragCategoryDisplayInds=q.model.categories.map(function(Q){return Q.displayInd}),oe.model.dragY=oe.y,e.raiseToTop(this.parentNode),v.select(this.parentNode).selectAll("rect.bandrect").each(function(Q){Q.yze.y+ze.height/2&&(re.model.displayInd=ze.model.displayInd,ze.model.displayInd=be),q.dragCategoryDisplayInd=re.model.displayInd}if(q.dragCategoryDisplayInd===null||q.parcatsViewModel.arrangement==="freeform"){Q.model.dragX=v.event.x;var Ze=q.parcatsViewModel.dimensions[ae],at=q.parcatsViewModel.dimensions[j];Ze!==void 0&&Q.model.dragXat.x&&(Q.model.displayInd=at.model.displayInd,at.model.displayInd=q.dragDimensionDisplayInd),q.dragDimensionDisplayInd=Q.model.displayInd}Y(q.parcatsViewModel),V(q.parcatsViewModel),se(q.parcatsViewModel),$(q.parcatsViewModel)}}function B(q){if(q.parcatsViewModel.arrangement!=="fixed"&&q.dragDimensionDisplayInd!==null){v.select(this).selectAll("text").attr("font-weight","normal");var oe={},ae=X(q.parcatsViewModel),j=q.parcatsViewModel.model.dimensions.map(function(at){return at.displayInd}),Q=q.initialDragDimensionDisplayInds.some(function(at,nt){return at!==j[nt]});Q&&j.forEach(function(at,nt){var rt=q.parcatsViewModel.model.dimensions[nt].containerInd;oe["dimensions["+rt+"].displayindex"]=at});var re=!1;if(q.dragCategoryDisplayInd!==null){var ce=q.model.categories.map(function(at){return at.displayInd});if(re=q.initialDragCategoryDisplayInds.some(function(at,nt){return at!==ce[nt]}),re){var be=q.model.categories.slice().sort(function(at,nt){return at.displayInd-nt.displayInd}),Ae=be.map(function(at){return at.categoryValue}),De=be.map(function(at){return at.categoryLabel});oe["dimensions["+q.model.containerInd+"].categoryarray"]=[Ae],oe["dimensions["+q.model.containerInd+"].ticktext"]=[De],oe["dimensions["+q.model.containerInd+"].categoryorder"]="array"}}if(q.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1&&!q.dragHasMoved&&q.potentialClickBand&&(q.parcatsViewModel.hoveron==="color"?R(q.potentialClickBand,"plotly_click",v.event.sourceEvent):f(q.potentialClickBand,"plotly_click",v.event.sourceEvent)),q.model.dragX=null,q.dragCategoryDisplayInd!==null){var ze=q.parcatsViewModel.dimensions[q.dragDimensionDisplayInd].categories[q.dragCategoryDisplayInd];ze.model.dragY=null,q.dragCategoryDisplayInd=null}q.dragDimensionDisplayInd=null,q.parcatsViewModel.dragDimension=null,q.dragHasMoved=null,q.potentialClickBand=null,Y(q.parcatsViewModel),V(q.parcatsViewModel);var Ze=v.transition().duration(300).ease("cubic-in-out");Ze.each(function(){se(q.parcatsViewModel,!0),$(q.parcatsViewModel,!0)}).each("end",function(){(Q||re)&&S.restyle(q.parcatsViewModel.graphDiv,oe,[ae])})}}function X(q){for(var oe,ae=q.graphDiv._fullData,j=0;j=0;Ae--)De+="C"+ce[Ae]+","+(oe[Ae+1]+j)+" "+re[Ae]+","+(oe[Ae]+j)+" "+(q[Ae]+ae[Ae])+","+(oe[Ae]+j),De+="l-"+ae[Ae]+",0 ";return De+="Z",De}function V(q){var oe=q.dimensions,ae=q.model,j=oe.map(function(qr){return qr.categories.map(function(Sr){return Sr.y})}),Q=q.model.dimensions.map(function(qr){return qr.categories.map(function(Sr){return Sr.displayInd})}),re=q.model.dimensions.map(function(qr){return qr.displayInd}),ce=q.dimensions.map(function(qr){return qr.model.dimensionInd}),be=oe.map(function(qr){return qr.x}),Ae=oe.map(function(qr){return qr.width}),De=[];for(var ze in ae.paths)ae.paths.hasOwnProperty(ze)&&De.push(ae.paths[ze]);function Ze(qr){var Sr=qr.categoryInds.map(function(wt,Ne){return Q[Ne][wt]}),Rr=ce.map(function(wt){return Sr[wt]});return Rr}De.sort(function(qr,Sr){var Rr=Ze(qr),wt=Ze(Sr);return q.sortpaths==="backward"&&(Rr.reverse(),wt.reverse()),Rr.push(qr.valueInds[0]),wt.push(Sr.valueInds[0]),q.bundlecolors&&(Rr.unshift(qr.rawColor),wt.unshift(Sr.rawColor)),Rrwt?1:0});for(var at=new Array(De.length),nt=oe[0].model.count,rt=oe[0].categories.map(function(qr){return qr.height}).reduce(function(qr,Sr){return qr+Sr}),st=0;st0?ye=rt*(Me.count/nt):ye=0;for(var he=new Array(j.length),Oe=0;Oe1?ce=(q.width-2*ae-j)/(Q-1):ce=0,be=ae,Ae=be+ce*re;var De=[],ze=q.model.maxCats,Ze=oe.categories.length,at=8,nt=oe.count,rt=q.height-at*(ze-1),st,Me,ye,he,Oe,tt=(ze-Ze)*at/2,ot=oe.categories.map(function(Qe){return{displayInd:Qe.displayInd,categoryInd:Qe.categoryInd}});for(ot.sort(function(Qe,Pt){return Qe.displayInd-Pt.displayInd}),Oe=0;Oe0?st=Me.count/nt*rt:st=0,ye={key:Me.valueInds[0],model:Me,width:j,height:st,y:Me.dragY!==null?Me.dragY:tt,bands:[],parcatsViewModel:q},tt=tt+st+at,De.push(ye);return{key:oe.dimensionInd,x:oe.dragX!==null?oe.dragX:Ae,y:0,width:j,model:oe,categories:De,parcatsViewModel:q,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}}}),A6=Xe({"src/traces/parcats/plot.js"(Z,G){"use strict";var v=lV();G.exports=function(S,E,e,t){var r=S._fullLayout,o=r._paper,a=r._size;v(S,o,E,{width:a.w,height:a.h,margin:{t:a.t,r:a.r,b:a.b,l:a.l}},e,t)}}}),uV=Xe({"src/traces/parcats/base_plot.js"(Z){"use strict";var G=Hh().getModuleCalcData,v=A6(),x="parcats";Z.name=x,Z.plot=function(S,E,e,t){var r=G(S.calcdata,x);if(r.length){var o=r[0];v(S,o,e,t)}},Z.clean=function(S,E,e,t){var r=t._has&&t._has("parcats"),o=E._has&&E._has("parcats");r&&!o&&t._paperdiv.selectAll(".parcats").remove()}}}),cV=Xe({"src/traces/parcats/index.js"(Z,G){"use strict";G.exports={attributes:T6(),supplyDefaults:oV(),calc:sV(),plot:A6(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:uV(),categories:["noOpacity"],meta:{}}}}),fV=Xe({"lib/parcats.js"(Z,G){"use strict";G.exports=cV()}}),im=Xe({"src/plots/mapbox/constants.js"(Z,G){"use strict";var v=Jm(),x="1.13.4",S='\xA9 OpenStreetMap contributors',E=['\xA9 Carto',S].join(" "),e=['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under ODbL'].join(" "),t=['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under CC BY SA'].join(" "),r={"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:S,tiles:["https://a.tile.openstreetmap.org/{z}/{x}/{y}.png","https://b.tile.openstreetmap.org/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-osm-tiles",type:"raster",source:"plotly-osm-tiles",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"white-bg":{id:"white-bg",version:8,sources:{},layers:[{id:"white-bg",type:"background",paint:{"background-color":"#FFFFFF"},minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-positron":{id:"carto-positron",version:8,sources:{"plotly-carto-positron":{type:"raster",attribution:E,tiles:["https://cartodb-basemaps-c.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-carto-positron",type:"raster",source:"plotly-carto-positron",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-darkmatter":{id:"carto-darkmatter",version:8,sources:{"plotly-carto-darkmatter":{type:"raster",attribution:E,tiles:["https://cartodb-basemaps-c.global.ssl.fastly.net/dark_all/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-carto-darkmatter",type:"raster",source:"plotly-carto-darkmatter",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-terrain":{id:"stamen-terrain",version:8,sources:{"plotly-stamen-terrain":{type:"raster",attribution:e,tiles:["https://tiles.stadiamaps.com/tiles/stamen_terrain/{z}/{x}/{y}.png?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-terrain",type:"raster",source:"plotly-stamen-terrain",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-toner":{id:"stamen-toner",version:8,sources:{"plotly-stamen-toner":{type:"raster",attribution:e,tiles:["https://tiles.stadiamaps.com/tiles/stamen_toner/{z}/{x}/{y}.png?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-toner",type:"raster",source:"plotly-stamen-toner",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-watercolor":{id:"stamen-watercolor",version:8,sources:{"plotly-stamen-watercolor":{type:"raster",attribution:t,tiles:["https://tiles.stadiamaps.com/tiles/stamen_watercolor/{z}/{x}/{y}.jpg?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-watercolor",type:"raster",source:"plotly-stamen-watercolor",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"}},o=v(r);G.exports={requiredVersion:x,styleUrlPrefix:"mapbox://styles/mapbox/",styleUrlSuffix:"v9",styleValuesMapbox:["basic","streets","outdoors","light","dark","satellite","satellite-streets"],styleValueDflt:"basic",stylesNonMapbox:r,styleValuesNonMapbox:o,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",wrongVersionErrorMsg:["Your custom plotly.js bundle is not using the correct mapbox-gl version","Please install @plotly/mapbox-gl@"+x+"."].join(` `),noAccessTokenErrorMsg:["Missing Mapbox access token.","Mapbox trace type require a Mapbox access token to be registered.","For example:"," Plotly.newPlot(gd, data, layout, { mapboxAccessToken: 'my-access-token' });","More info here: https://www.mapbox.com/help/define-access-token/"].join(` `),missingStyleErrorMsg:["No valid mapbox style found, please set `mapbox.style` to one of:",o.join(", "),"or register a Mapbox access token to use a Mapbox-served style."].join(` `),multipleTokensErrorMsg:["Set multiple mapbox access token across different mapbox subplot,","using first token found as mapbox-gl does not allow multipleaccess tokens on the same page."].join(` `),mapOnErrorMsg:"Mapbox error.",mapboxLogo:{path0:"m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z",path1:"M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z",path2:"M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z",polygon:"11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34"},styleRules:{map:"overflow:hidden;position:relative;","missing-css":"display:none;",canary:"background-color:salmon;","ctrl-bottom-left":"position: absolute; pointer-events: none; z-index: 2; bottom: 0; left: 0;","ctrl-bottom-right":"position: absolute; pointer-events: none; z-index: 2; right: 0; bottom: 0;",ctrl:"clear: both; pointer-events: auto; transform: translate(0, 0);","ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-inner":"display: none;","ctrl-attrib.mapboxgl-compact:hover .mapboxgl-ctrl-attrib-inner":"display: block; margin-top:2px","ctrl-attrib.mapboxgl-compact:hover":"padding: 2px 24px 2px 4px; visibility: visible; margin-top: 6px;","ctrl-attrib.mapboxgl-compact::after":`content: ""; cursor: pointer; position: absolute; background-image: url('data:image/svg+xml;charset=utf-8,%3Csvg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"%3E %3Cpath fill="%23333333" fill-rule="evenodd" d="M4,10a6,6 0 1,0 12,0a6,6 0 1,0 -12,0 M9,7a1,1 0 1,0 2,0a1,1 0 1,0 -2,0 M9,10a1,1 0 1,1 2,0l0,3a1,1 0 1,1 -2,0"/%3E %3C/svg%3E'); background-color: rgba(255, 255, 255, 0.5); width: 24px; height: 24px; box-sizing: border-box; border-radius: 12px;`,"ctrl-attrib.mapboxgl-compact":"min-height: 20px; padding: 0; margin: 10px; position: relative; background-color: #fff; border-radius: 3px 12px 12px 3px;","ctrl-bottom-right > .mapboxgl-ctrl-attrib.mapboxgl-compact::after":"bottom: 0; right: 0","ctrl-bottom-left > .mapboxgl-ctrl-attrib.mapboxgl-compact::after":"bottom: 0; left: 0","ctrl-bottom-left .mapboxgl-ctrl":"margin: 0 0 10px 10px; float: left;","ctrl-bottom-right .mapboxgl-ctrl":"margin: 0 10px 10px 0; float: right;","ctrl-attrib":"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px","ctrl-attrib a":"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px","ctrl-attrib a:hover":"color: inherit; text-decoration: underline;","ctrl-attrib .mapbox-improve-map":"font-weight: bold; margin-left: 2px;","attrib-empty":"display: none;","ctrl-logo":`display:block; width: 21px; height: 21px; background-image: url('data:image/svg+xml;charset=utf-8,%3C?xml version="1.0" encoding="utf-8"?%3E %3Csvg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 21 21" style="enable-background:new 0 0 21 21;" xml:space="preserve"%3E%3Cg transform="translate(0,0.01)"%3E%3Cpath d="m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z" style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3Cpath d="M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpath d="M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpolygon points="11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34 " style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3C/g%3E%3C/svg%3E')`}}}}),Ex=Xe({"src/plots/mapbox/layout_attributes.js"(Z,G){"use strict";var v=sa(),x=$n().defaultLine,S=wc().attributes,E=tc(),e=af().textposition,t=pc().overrideAll,r=zl().templatedArray,o=im(),a=E({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});a.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var n=G.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:x},opacity:{valType:"number",min:0,max:1,dflt:1},minzoom:{valType:"number",min:0,max:24,dflt:0},maxzoom:{valType:"number",min:0,max:24,dflt:24},circle:{radius:{valType:"number",dflt:15}},line:{width:{valType:"number",dflt:2},dash:{valType:"data_array"}},fill:{outlinecolor:{valType:"color",dflt:x}},symbol:{icon:{valType:"string",dflt:"marker"},iconsize:{valType:"number",dflt:10},text:{valType:"string",dflt:""},placement:{valType:"enumerated",values:["point","line","line-center"],dflt:"point"},textfont:a,textposition:v.extendFlat({},e,{arrayOk:!1})}})},"plot","from-root");n.uirevision={valType:"any",editType:"none"}}}),AT=Xe({"src/traces/scattermapbox/attributes.js"(Z,G){"use strict";var{hovertemplateAttrs:v,texttemplateAttrs:x,templatefallbackAttrs:S}=Jl(),E=$d(),e=vg(),t=af(),r=Ex(),o=ru(),a=ku(),n=Qo().extendFlat,i=pc().overrideAll,s=Ex(),h=e.line,c=e.marker;G.exports=i({lon:e.lon,lat:e.lat,cluster:{enabled:{valType:"boolean"},maxzoom:n({},s.layers.maxzoom,{}),step:{valType:"number",arrayOk:!0,dflt:-1,min:-1},size:{valType:"number",arrayOk:!0,dflt:20,min:0},color:{valType:"color",arrayOk:!0},opacity:n({},c.opacity,{dflt:1})},mode:n({},t.mode,{dflt:"markers"}),text:n({},t.text,{}),texttemplate:x({editType:"plot"},{keys:["lat","lon","text"]}),texttemplatefallback:S({editType:"plot"}),hovertext:n({},t.hovertext,{}),line:{color:h.color,width:h.width},connectgaps:t.connectgaps,marker:n({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:c.opacity,size:c.size,sizeref:c.sizeref,sizemin:c.sizemin,sizemode:c.sizemode},a("marker")),fill:e.fill,fillcolor:E(),textfont:r.layers.symbol.textfont,textposition:r.layers.symbol.textposition,below:{valType:"string"},selected:{marker:t.selected.marker},unselected:{marker:t.unselected.marker},hoverinfo:n({},o.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:v(),hovertemplatefallback:S()},"calc","nested")}}),S6=Xe({"src/traces/scattermapbox/constants.js"(Z,G){"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"];G.exports={isSupportedFont:function(x){return v.indexOf(x)!==-1}}}}),hV=Xe({"src/traces/scattermapbox/defaults.js"(Z,G){"use strict";var v=sa(),x=Fu(),S=md(),E=Dd(),e=zd(),t=ev(),r=AT(),o=S6().isSupportedFont;G.exports=function(i,s,h,c){function m(y,f){return v.coerce(i,s,r,y,f)}function p(y,f){return v.coerce2(i,s,r,y,f)}var T=a(i,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"),x.hasMarkers(s)){S(i,s,h,c,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]))}x.hasLines(s)&&(E(i,s,h,c,m,{noDash:!0}),m("connectgaps"));var _=p("cluster.maxzoom"),w=p("cluster.step"),A=p("cluster.color",s.marker&&s.marker.color||h),M=p("cluster.size"),g=p("cluster.opacity"),b=_!==!1||w!==!1||A!==!1||M!==!1||g!==!1,d=m("cluster.enabled",b);if(d||x.hasText(s)){var u=c.font.family;e(i,s,c,m,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:o(u)?u:"Open Sans Regular",weight:c.font.weight,style:c.font.style,size:c.font.size,color:c.font.color}})}m("fill"),s.fill!=="none"&&t(i,s,h,m),v.coerceSelectionMarkerOpacity(s,m)};function a(n,i,s){var h=s("lon")||[],c=s("lat")||[],m=Math.min(h.length,c.length);return i._length=m,m}}}),M6=Xe({"src/traces/scattermapbox/format_labels.js"(Z,G){"use strict";var v=Go();G.exports=function(S,E,e){var t={},r=e[E.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=Xe({"src/plots/mapbox/convert_text_opts.js"(Z,G){"use strict";var v=sa();G.exports=function(S,E){var e=S.split(" "),t=e[0],r=e[1],o=v.isArrayOrTypedArray(E)?v.mean(E):E,a=.5+o/100,n=1.5+o/100,i=["",""],s=[0,0];switch(t){case"top":i[0]="top",s[1]=-n;break;case"bottom":i[0]="bottom",s[1]=n;break}switch(r){case"left":i[1]="right",s[0]=-a;break;case"right":i[1]="left",s[0]=a;break}var h;return i[0]&&i[1]?h=i.join("-"):i[0]?h=i[0]:i[1]?h=i[1]:h="center",{anchor:h,offset:s}}}}),pV=Xe({"src/traces/scattermapbox/convert.js"(Z,G){"use strict";var v=rs(),x=sa(),S=Hs().BADNUM,E=m0(),e=rc(),t=es(),r=r1(),o=Fu(),a=S6().isSupportedFont,n=E6(),i=$p().appendArrayPointValue,s=ou().NEWLINES,h=ou().BR_TAG_ALL;G.exports=function(g,b){var d=b[0].trace,u=d.visible===!0&&d._length!==0,y=d.fill!=="none",f=o.hasLines(d),R=o.hasMarkers(d),L=o.hasText(d),z=R&&d.marker.symbol==="circle",F=R&&d.marker.symbol!=="circle",N=d.cluster&&d.cluster.enabled,O=c("fill"),P=c("line"),U=c("circle"),B=c("symbol"),X={fill:O,line:P,circle:U,symbol:B};if(!u)return X;var $;if((y||f)&&($=E.calcTraceToLineCoords(b)),y&&(O.geojson=E.makePolygon($),O.layout.visibility="visible",x.extendFlat(O.paint,{"fill-color":d.fillcolor})),f&&(P.geojson=E.makeLine($),P.layout.visibility="visible",x.extendFlat(P.paint,{"line-width":d.line.width,"line-color":d.line.color,"line-opacity":d.opacity})),z){var se=m(b);U.geojson=se.geojson,U.layout.visibility="visible",N&&(U.filter=["!",["has","point_count"]],X.cluster={type:"circle",filter:["has","point_count"],layout:{visibility:"visible"},paint:{"circle-color":w(d.cluster.color,d.cluster.step),"circle-radius":w(d.cluster.size,d.cluster.step),"circle-opacity":w(d.cluster.opacity,d.cluster.step)}},X.clusterCount={type:"symbol",filter:["has","point_count"],paint:{},layout:{"text-field":"{point_count_abbreviated}","text-font":A(d),"text-size":12}}),x.extendFlat(U.paint,{"circle-color":se.mcc,"circle-radius":se.mrc,"circle-opacity":se.mo})}if(z&&N&&(U.filter=["!",["has","point_count"]]),(F||L)&&(B.geojson=p(b,g),x.extendFlat(B.layout,{visibility:"visible","icon-image":"{symbol}-15","text-field":"{text}"}),F&&(x.extendFlat(B.layout,{"icon-size":d.marker.size/10}),"angle"in d.marker&&d.marker.angle!=="auto"&&x.extendFlat(B.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),B.layout["icon-allow-overlap"]=d.marker.allowoverlap,x.extendFlat(B.paint,{"icon-opacity":d.opacity*d.marker.opacity,"icon-color":d.marker.color})),L)){var le=(d.marker||{}).size,fe=n(d.textposition,le);x.extendFlat(B.layout,{"text-size":d.textfont.size,"text-anchor":fe.anchor,"text-offset":fe.offset,"text-font":A(d)}),x.extendFlat(B.paint,{"text-color":d.textfont.color,"text-opacity":d.opacity})}return X};function c(M){return{type:M,geojson:E.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function m(M){var g=M[0].trace,b=g.marker,d=g.selectedpoints,u=x.isArrayOrTypedArray(b.color),y=x.isArrayOrTypedArray(b.size),f=x.isArrayOrTypedArray(b.opacity),R;function L(le){return g.opacity*le}function z(le){return le/2}var F;u&&(e.hasColorscale(g,"marker")?F=e.makeColorScaleFuncFromTrace(b):F=x.identity);var N;y&&(N=r(g));var O;f&&(O=function(le){var fe=v(le)?+x.constrain(le,0,1):0;return L(fe)});var P=[];for(R=0;R850?R+=" Black":u>750?R+=" Extra Bold":u>650?R+=" Bold":u>550?R+=" Semi Bold":u>450?R+=" Medium":u>350?R+=" Regular":u>250?R+=" Light":u>150?R+=" Extra Light":R+=" Thin"):y.slice(0,2).join(" ")==="Open Sans"?(R="Open Sans",u>750?R+=" Extrabold":u>650?R+=" Bold":u>550?R+=" Semibold":u>350?R+=" Regular":R+=" Light"):y.slice(0,3).join(" ")==="Klokantech Noto Sans"&&(R="Klokantech Noto Sans",y[3]==="CJK"&&(R+=" CJK"),R+=u>500?" Bold":" Regular")),f&&(R+=" Italic"),R==="Open Sans Regular Italic"?R="Open Sans Italic":R==="Open Sans Regular Bold"?R="Open Sans Bold":R==="Open Sans Regular Bold Italic"?R="Open Sans Bold Italic":R==="Klokantech Noto Sans Regular Italic"&&(R="Klokantech Noto Sans Italic"),a(R)||(R=b);var L=R.split(", ");return L}}}),dV=Xe({"src/traces/scattermapbox/plot.js"(Z,G){"use strict";var v=sa(),x=pV(),S=im().traceLayerPrefix,E={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function e(r,o,a,n){this.type="scattermapbox",this.subplot=r,this.uid=o,this.clusterEnabled=a,this.isHidden=n,this.sourceIds={fill:"source-"+o+"-fill",line:"source-"+o+"-line",circle:"source-"+o+"-circle",symbol:"source-"+o+"-symbol",cluster:"source-"+o+"-circle",clusterCount:"source-"+o+"-circle"},this.layerIds={fill:S+o+"-fill",line:S+o+"-line",circle:S+o+"-circle",symbol:S+o+"-symbol",cluster:S+o+"-cluster",clusterCount:S+o+"-cluster-count"},this.below=null}var t=e.prototype;t.addSource=function(r,o,a){var n={type:"geojson",data:o.geojson};a&&a.enabled&&v.extendFlat(n,{cluster:!0,clusterMaxZoom:a.maxzoom});var i=this.subplot.map.getSource(this.sourceIds[r]);i?i.setData(o.geojson):this.subplot.map.addSource(this.sourceIds[r],n)},t.setSourceData=function(r,o){this.subplot.map.getSource(this.sourceIds[r]).setData(o.geojson)},t.addLayer=function(r,o,a){var n={type:o.type,id:this.layerIds[r],source:this.sourceIds[r],layout:o.layout,paint:o.paint};o.filter&&(n.filter=o.filter);for(var i=this.layerIds[r],s,h=this.subplot.getMapLayers(),c=0;c=0;f--){var R=y[f];i.removeLayer(p.layerIds[R])}u||i.removeSource(p.sourceIds.circle)}function _(u){for(var y=E.nonCluster,f=0;f=0;f--){var R=y[f];i.removeLayer(p.layerIds[R]),u||i.removeSource(p.sourceIds[R])}}function A(u){m?l(u):w(u)}function M(u){c?T(u):_(u)}function g(){for(var u=c?E.cluster:E.nonCluster,y=0;y=0;n--){var i=a[n];o.removeLayer(this.layerIds[i]),o.removeSource(this.sourceIds[i])}},G.exports=function(o,a){var n=a[0].trace,i=n.cluster&&n.cluster.enabled,s=n.visible!==!0,h=new e(o,n.uid,i,s),c=x(o.gd,a),m=h.below=o.belowLookup["trace-"+n.uid],p,T,l;if(i)for(h.addSource("circle",c.circle,n.cluster),p=0;p=0?Math.floor((n+180)/360):Math.ceil((n-180)/360),M=A*360,g=n-M;function b(N){var O=N.lonlat;if(O[0]===e||_&&T.indexOf(N.i+1)===-1)return 1/0;var P=x.modHalf(O[0],360),U=O[1],B=p.project([P,U]),X=B.x-c.c2p([g,U]),$=B.y-m.c2p([P,i]),se=Math.max(3,N.mrc||0);return Math.max(Math.sqrt(X*X+$*$)-se,1-3/se)}if(v.getClosest(s,b,a),a.index!==!1){var d=s[a.index],u=d.lonlat,y=[x.modHalf(u[0],360)+M,u[1]],f=c.c2p(y),R=m.c2p(y),L=d.mrc||1;a.x0=f-L,a.x1=f+L,a.y0=R-L,a.y1=R+L;var z={};z[h.subplot]={_subplot:p};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,n,i){if(a.hovertemplate)return;var s=n.hi||a.hoverinfo,h=s.split("+"),c=h.indexOf("all")!==-1,m=h.indexOf("lon")!==-1,p=h.indexOf("lat")!==-1,T=n.lonlat,l=[];function _(w){return w+"\xB0"}return c||m&&p?l.push("("+_(T[1])+", "+_(T[0])+")"):m?l.push(i.lon+_(T[0])):p&&l.push(i.lat+_(T[1])),(c||h.indexOf("text")!==-1)&&E(n,a,l),l.join("
")}G.exports={hoverPoints:r,getExtraText:o}}}),vV=Xe({"src/traces/scattermapbox/event_data.js"(Z,G){"use strict";G.exports=function(x,S){return x.lon=S.lon,x.lat=S.lat,x}}}),mV=Xe({"src/traces/scattermapbox/select.js"(Z,G){"use strict";var v=sa(),x=Fu(),S=Hs().BADNUM;G.exports=function(e,t){var r=e.cd,o=e.xaxis,a=e.yaxis,n=[],i=r[0].trace,s;if(!x.hasMarkers(i))return[];if(t===!1)for(s=0;s"u"&&(C=1e-6);var H,ne,xe,Re,qe;for(xe=k,qe=0;qe<8;qe++){if(Re=this.sampleCurveX(xe)-k,Math.abs(Re)ne)return ne;for(;HRe?H=xe:ne=xe,xe=(ne-H)*.5+H}return xe},a.prototype.solve=function(k,C){return this.sampleCurveY(this.solveCurveX(k,C))};var n=i;function i(k,C){this.x=k,this.y=C}i.prototype={clone:function(){return new i(this.x,this.y)},add:function(k){return this.clone()._add(k)},sub:function(k){return this.clone()._sub(k)},multByPoint:function(k){return this.clone()._multByPoint(k)},divByPoint:function(k){return this.clone()._divByPoint(k)},mult:function(k){return this.clone()._mult(k)},div:function(k){return this.clone()._div(k)},rotate:function(k){return this.clone()._rotate(k)},rotateAround:function(k,C){return this.clone()._rotateAround(k,C)},matMult:function(k){return this.clone()._matMult(k)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(k){return this.x===k.x&&this.y===k.y},dist:function(k){return Math.sqrt(this.distSqr(k))},distSqr:function(k){var C=k.x-this.x,H=k.y-this.y;return C*C+H*H},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(k){return Math.atan2(this.y-k.y,this.x-k.x)},angleWith:function(k){return this.angleWithSep(k.x,k.y)},angleWithSep:function(k,C){return Math.atan2(this.x*C-this.y*k,this.x*k+this.y*C)},_matMult:function(k){var C=k[0]*this.x+k[1]*this.y,H=k[2]*this.x+k[3]*this.y;return this.x=C,this.y=H,this},_add:function(k){return this.x+=k.x,this.y+=k.y,this},_sub:function(k){return this.x-=k.x,this.y-=k.y,this},_mult:function(k){return this.x*=k,this.y*=k,this},_div:function(k){return this.x/=k,this.y/=k,this},_multByPoint:function(k){return this.x*=k.x,this.y*=k.y,this},_divByPoint:function(k){return this.x/=k.x,this.y/=k.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var k=this.y;return this.y=this.x,this.x=-k,this},_rotate:function(k){var C=Math.cos(k),H=Math.sin(k),ne=C*this.x-H*this.y,xe=H*this.x+C*this.y;return this.x=ne,this.y=xe,this},_rotateAround:function(k,C){var H=Math.cos(k),ne=Math.sin(k),xe=C.x+H*(this.x-C.x)-ne*(this.y-C.y),Re=C.y+ne*(this.x-C.x)+H*(this.y-C.y);return this.x=xe,this.y=Re,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},i.convert=function(k){return k instanceof i?k:Array.isArray(k)?new i(k[0],k[1]):k};var s=typeof self<"u"?self:{};function h(k,C){if(Array.isArray(k)){if(!Array.isArray(C)||k.length!==C.length)return!1;for(var H=0;H=1)return 1;var C=k*k,H=C*k;return 4*(k<.5?H:3*(k-C)+H-.75)}function p(k,C,H,ne){var xe=new o(k,C,H,ne);return function(Re){return xe.solve(Re)}}var T=p(.25,.1,.25,1);function l(k,C,H){return Math.min(H,Math.max(C,k))}function _(k,C,H){var ne=H-C,xe=((k-C)%ne+ne)%ne+C;return xe===C?H:xe}function w(k,C,H){if(!k.length)return H(null,[]);var ne=k.length,xe=new Array(k.length),Re=null;k.forEach(function(qe,pt){C(qe,function(Dt,Gt){Dt&&(Re=Dt),xe[pt]=Gt,--ne===0&&H(Re,xe)})})}function A(k){var C=[];for(var H in k)C.push(k[H]);return C}function M(k,C){var H=[];for(var ne in k)ne in C||H.push(ne);return H}function g(k){for(var C=[],H=arguments.length-1;H-- >0;)C[H]=arguments[H+1];for(var ne=0,xe=C;ne>C/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,k)}return k()}function f(k){return k<=1?1:Math.pow(2,Math.ceil(Math.log(k)/Math.LN2))}function R(k){return k?/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(k):!1}function L(k,C){k.forEach(function(H){C[H]&&(C[H]=C[H].bind(C))})}function z(k,C){return k.indexOf(C,k.length-C.length)!==-1}function F(k,C,H){var ne={};for(var xe in k)ne[xe]=C.call(H||this,k[xe],xe,k);return ne}function N(k,C,H){var ne={};for(var xe in k)C.call(H||this,k[xe],xe,k)&&(ne[xe]=k[xe]);return ne}function O(k){return Array.isArray(k)?k.map(O):typeof k=="object"&&k?F(k,O):k}function P(k,C){for(var H=0;H=0)return!0;return!1}var U={};function B(k){U[k]||(typeof console<"u"&&console.warn(k),U[k]=!0)}function X(k,C,H){return(H.y-k.y)*(C.x-k.x)>(C.y-k.y)*(H.x-k.x)}function $(k){for(var C=0,H=0,ne=k.length,xe=ne-1,Re=void 0,qe=void 0;H@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,H={};if(k.replace(C,function(xe,Re,qe,pt){var Dt=qe||pt;return H[Re]=Dt?Dt.toLowerCase():!0,""}),H["max-age"]){var ne=parseInt(H["max-age"],10);isNaN(ne)?delete H["max-age"]:H["max-age"]=ne}return H}var V=null;function Y(k){if(V==null){var C=k.navigator?k.navigator.userAgent:null;V=!!k.safari||!!(C&&(/\b(iPad|iPhone|iPod)\b/.test(C)||C.match("Safari")&&!C.match("Chrome")))}return V}function ee(k){try{var C=s[k];return C.setItem("_mapbox_test_",1),C.removeItem("_mapbox_test_"),!0}catch{return!1}}function q(k){return s.btoa(encodeURIComponent(k).replace(/%([0-9A-F]{2})/g,function(C,H){return String.fromCharCode(+("0x"+H))}))}function oe(k){return decodeURIComponent(s.atob(k).split("").map(function(C){return"%"+("00"+C.charCodeAt(0).toString(16)).slice(-2)}).join(""))}var ae=s.performance&&s.performance.now?s.performance.now.bind(s.performance):Date.now.bind(Date),j=s.requestAnimationFrame||s.mozRequestAnimationFrame||s.webkitRequestAnimationFrame||s.msRequestAnimationFrame,Q=s.cancelAnimationFrame||s.mozCancelAnimationFrame||s.webkitCancelAnimationFrame||s.msCancelAnimationFrame,re,ce,be={now:ae,frame:function(C){var H=j(C);return{cancel:function(){return Q(H)}}},getImageData:function(C,H){H===void 0&&(H=0);var ne=s.document.createElement("canvas"),xe=ne.getContext("2d");if(!xe)throw new Error("failed to create canvas 2d context");return ne.width=C.width,ne.height=C.height,xe.drawImage(C,0,0,C.width,C.height),xe.getImageData(-H,-H,C.width+2*H,C.height+2*H)},resolveURL:function(C){return re||(re=s.document.createElement("a")),re.href=C,re.href},hardwareConcurrency:s.navigator&&s.navigator.hardwareConcurrency||4,get devicePixelRatio(){return s.devicePixelRatio},get prefersReducedMotion(){return s.matchMedia?(ce==null&&(ce=s.matchMedia("(prefers-reduced-motion: reduce)")),ce.matches):!1}},Ae={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},De={supported:!1,testSupport:rt},ze,Ze=!1,at,nt=!1;s.document&&(at=s.document.createElement("img"),at.onload=function(){ze&&st(ze),ze=null,nt=!0},at.onerror=function(){Ze=!0,ze=null},at.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");function rt(k){Ze||!at||(nt?st(k):ze=k)}function st(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;De.supported=!0}catch{}k.deleteTexture(C),Ze=!0}var Me="01";function ye(){for(var k="1",C="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",H="",ne=0;ne<10;ne++)H+=C[Math.floor(Math.random()*62)];var xe=12*60*60*1e3,Re=[k,Me,H].join(""),qe=Date.now()+xe;return{token:Re,tokenExpiresAt:qe}}var he=function(C,H){this._transformRequestFn=C,this._customAccessToken=H,this._createSkuToken()};he.prototype._createSkuToken=function(){var C=ye();this._skuToken=C.token,this._skuTokenExpiresAt=C.tokenExpiresAt},he.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},he.prototype.transformRequest=function(C,H){return this._transformRequestFn?this._transformRequestFn(C,H)||{url:C}:{url:C}},he.prototype.normalizeStyleURL=function(C,H){if(!Oe(C))return C;var ne=qt(C);return ne.path="/styles/v1"+ne.path,this._makeAPIURL(ne,this._customAccessToken||H)},he.prototype.normalizeGlyphsURL=function(C,H){if(!Oe(C))return C;var ne=qt(C);return ne.path="/fonts/v1"+ne.path,this._makeAPIURL(ne,this._customAccessToken||H)},he.prototype.normalizeSourceURL=function(C,H){if(!Oe(C))return C;var ne=qt(C);return ne.path="/v4/"+ne.authority+".json",ne.params.push("secure"),this._makeAPIURL(ne,this._customAccessToken||H)},he.prototype.normalizeSpriteURL=function(C,H,ne,xe){var Re=qt(C);return Oe(C)?(Re.path="/styles/v1"+Re.path+"/sprite"+H+ne,this._makeAPIURL(Re,this._customAccessToken||xe)):(Re.path+=""+H+ne,Wt(Re))},he.prototype.normalizeTileURL=function(C,H){if(this._isSkuTokenExpired()&&this._createSkuToken(),C&&!Oe(C))return C;var ne=qt(C),xe=/(\.(png|jpg)\d*)(?=$)/,Re=/^.+\/v4\//,qe=be.devicePixelRatio>=2||H===512?"@2x":"",pt=De.supported?".webp":"$1";ne.path=ne.path.replace(xe,""+qe+pt),ne.path=ne.path.replace(Re,"/"),ne.path="/v4"+ne.path;var Dt=this._customAccessToken||Pt(ne.params)||Ae.ACCESS_TOKEN;return Ae.REQUIRE_ACCESS_TOKEN&&Dt&&this._skuToken&&ne.params.push("sku="+this._skuToken),this._makeAPIURL(ne,Dt)},he.prototype.canonicalizeTileURL=function(C,H){var ne="/v4/",xe=/\.[\w]+$/,Re=qt(C);if(!Re.path.match(/(^\/v4\/)/)||!Re.path.match(xe))return C;var qe="mapbox://tiles/";qe+=Re.path.replace(ne,"");var pt=Re.params;return H&&(pt=pt.filter(function(Dt){return!Dt.match(/^access_token=/)})),pt.length&&(qe+="?"+pt.join("&")),qe},he.prototype.canonicalizeTileset=function(C,H){for(var ne=H?Oe(H):!1,xe=[],Re=0,qe=C.tiles||[];Re=0&&C.params.splice(Re,1)}if(xe.path!=="/"&&(C.path=""+xe.path+C.path),!Ae.REQUIRE_ACCESS_TOKEN)return Wt(C);if(H=H||Ae.ACCESS_TOKEN,!H)throw new Error("An API access token is required to use Mapbox GL. "+ne);if(H[0]==="s")throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+ne);return C.params=C.params.filter(function(qe){return qe.indexOf("access_token")===-1}),C.params.push("access_token="+H),Wt(C)};function Oe(k){return k.indexOf("mapbox:")===0}var tt=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function ot(k){return tt.test(k)}function Qe(k){return k.indexOf("sku=")>0&&ot(k)}function Pt(k){for(var C=0,H=k;C=1&&s.localStorage.setItem(H,JSON.stringify(this.eventData))}catch{B("Unable to write to LocalStorage")}},qr.prototype.processRequests=function(C){},qr.prototype.postEvent=function(C,H,ne,xe){var Re=this;if(Ae.EVENTS_URL){var qe=qt(Ae.EVENTS_URL);qe.params.push("access_token="+(xe||Ae.ACCESS_TOKEN||""));var pt={event:this.type,created:new Date(C).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:r,skuId:Me,userId:this.anonId},Dt=H?g(pt,H):pt,Gt={url:Wt(qe),headers:{"Content-Type":"text/plain"},body:JSON.stringify([Dt])};this.pendingRequest=ca(Gt,function(tr){Re.pendingRequest=null,ne(tr),Re.saveEventData(),Re.processRequests(xe)})}},qr.prototype.queueRequest=function(C,H){this.queue.push(C),this.processRequests(H)};var Sr=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(ne,xe,Re,qe){this.skuToken=Re,(Ae.EVENTS_URL&&qe||Ae.ACCESS_TOKEN&&Array.isArray(ne)&&ne.some(function(pt){return Oe(pt)||ot(pt)}))&&this.queueRequest({id:xe,timestamp:Date.now()},qe)},C.prototype.processRequests=function(ne){var xe=this;if(!(this.pendingRequest||this.queue.length===0)){var Re=this.queue.shift(),qe=Re.id,pt=Re.timestamp;qe&&this.success[qe]||(this.anonId||this.fetchEventData(),R(this.anonId)||(this.anonId=y()),this.postEvent(pt,{skuToken:this.skuToken},function(Dt){Dt||qe&&(xe.success[qe]=!0)},ne))}},C}(qr),Rr=function(k){function C(H){k.call(this,"appUserTurnstile"),this._customAccessToken=H}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype.postTurnstileEvent=function(ne,xe){Ae.EVENTS_URL&&Ae.ACCESS_TOKEN&&Array.isArray(ne)&&ne.some(function(Re){return Oe(Re)||ot(Re)})&&this.queueRequest(Date.now(),xe)},C.prototype.processRequests=function(ne){var xe=this;if(!(this.pendingRequest||this.queue.length===0)){(!this.anonId||!this.eventData.lastSuccess||!this.eventData.tokenU)&&this.fetchEventData();var Re=mr(Ae.ACCESS_TOKEN),qe=Re?Re.u:Ae.ACCESS_TOKEN,pt=qe!==this.eventData.tokenU;R(this.anonId)||(this.anonId=y(),pt=!0);var Dt=this.queue.shift();if(this.eventData.lastSuccess){var Gt=new Date(this.eventData.lastSuccess),tr=new Date(Dt),Pr=(Dt-this.eventData.lastSuccess)/(24*60*60*1e3);pt=pt||Pr>=1||Pr<-1||Gt.getDate()!==tr.getDate()}else pt=!0;if(!pt)return this.processRequests();this.postEvent(Dt,{"enabled.telemetry":!1},function(Zr){Zr||(xe.eventData.lastSuccess=Dt,xe.eventData.tokenU=qe)},ne)}},C}(qr),wt=new Rr,Ne=wt.postTurnstileEvent.bind(wt),Ke=new Sr,Te=Ke.postMapLoadEvent.bind(Ke),Ie="mapbox-tiles",Ve=500,Ce=50,Ee=1e3*60*7,Pe;function ft(){s.caches&&!Pe&&(Pe=s.caches.open(Ie))}var ct;function _t(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 Ct(k,C,H){if(ft(),!!Pe){var ne={status:C.status,statusText:C.statusText,headers:new s.Headers};C.headers.forEach(function(qe,pt){return ne.headers.set(pt,qe)});var xe=fe(C.headers.get("Cache-Control")||"");if(!xe["no-store"]){xe["max-age"]&&ne.headers.set("Expires",new Date(H+xe["max-age"]*1e3).toUTCString());var Re=new Date(ne.headers.get("Expires")).getTime()-H;ReDate.now()&&!H["no-cache"]}var Lr=1/0;function fa(k){Lr++,Lr>Ce&&(k.getActor().send("enforceCacheSizeLimit",Ve),Lr=0)}function Da(k){ft(),Pe&&Pe.then(function(C){C.keys().then(function(H){for(var ne=0;ne=200&&H.status<300||H.status===0)&&H.response!==null){var xe=H.response;if(k.type==="json")try{xe=JSON.parse(H.response)}catch(Re){return C(Re)}C(null,xe,H.getResponseHeader("Cache-Control"),H.getResponseHeader("Expires"))}else C(new wi(H.statusText,H.status,k.url))},H.send(k.body),{cancel:function(){return H.abort()}}}var Fr=function(k,C){if(!Ft(k.url)){if(s.fetch&&s.Request&&s.AbortController&&s.Request.prototype.hasOwnProperty("signal"))return Yt(k,C);if(le()&&self.worker&&self.worker.actor){var H=!0;return self.worker.actor.send("getResource",k,C,void 0,H)}}return Jt(k,C)},ta=function(k,C){return Fr(g(k,{type:"json"}),C)},ra=function(k,C){return Fr(g(k,{type:"arrayBuffer"}),C)},ca=function(k,C){return Fr(g(k,{method:"POST"}),C)};function Ba(k){var C=s.document.createElement("a");return C.href=k,C.protocol===s.document.location.protocol&&C.host===s.document.location.host}var $a="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function Za(k,C,H,ne){var xe=new s.Image,Re=s.URL;xe.onload=function(){C(null,xe),Re.revokeObjectURL(xe.src),xe.onload=null,s.requestAnimationFrame(function(){xe.src=$a})},xe.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 qe=new s.Blob([new Uint8Array(k)],{type:"image/png"});xe.cacheControl=H,xe.expires=ne,xe.src=k.byteLength?Re.createObjectURL(qe):$a}function ri(k,C){var H=new s.Blob([new Uint8Array(k)],{type:"image/png"});s.createImageBitmap(H).then(function(ne){C(null,ne)}).catch(function(ne){C(new Error("Could not load image because of "+ne.message+". Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))})}var pi,Ra,tn=function(){pi=[],Ra=0};tn();var on=function(k,C){if(De.supported&&(k.headers||(k.headers={}),k.headers.accept="image/webp,*/*"),Ra>=Ae.MAX_PARALLEL_IMAGE_REQUESTS){var H={requestParameters:k,callback:C,cancelled:!1,cancel:function(){this.cancelled=!0}};return pi.push(H),H}Ra++;var ne=!1,xe=function(){if(!ne)for(ne=!0,Ra--;pi.length&&Ra0||this._oneTimeListeners&&this._oneTimeListeners[C]&&this._oneTimeListeners[C].length>0||this._eventedParent&&this._eventedParent.listens(C)},xr.prototype.setEventedParent=function(C,H){return this._eventedParent=C,this._eventedParentData=H,this};var Ir=8,Ur={version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},Hr={"*":{type:"source"}},xt=["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],Xt={type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},vr={type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},Or={type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{}},default:"mapbox"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},ba={type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},Pa={type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},ya={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"}},Ta=["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"}},_n={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Rn={"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"}},En={"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"}},On={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},no={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},cn={type:"array",value:"*"},lo={type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},Wo={type:"enum",values:{Point:{},LineString:{},Polygon:{}}},hs={type:"array",minimum:0,maximum:24,value:["number","color"],length:2},Oo={type:"array",value:"*",minimum:1},Wn={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}},No=["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],as={"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"}},Ns={"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"}},ss={"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"}},uo={"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"}},jn={"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"}},Xn={"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"}},ls={"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"}},Cs={"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"}},Ks={duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},Xo={"*":{type:"string"}},Gi={$version:Ir,$root:Ur,sources:Hr,source:xt,source_vector:Xt,source_raster:vr,source_raster_dem:Or,source_geojson:ba,source_video:Pa,source_image:ya,layer:la,layout:Ta,layout_background:Ai,layout_fill:ki,layout_circle:Ki,layout_heatmap:_n,"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:Rn,layout_symbol:En,layout_raster:On,layout_hillshade:no,filter:cn,filter_operator:lo,geometry_type:Wo,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:hs,expression:Oo,light:Wn,paint:No,paint_fill:as,"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:Ns,paint_circle:ss,paint_heatmap:uo,paint_symbol:jn,paint_raster:Xn,paint_hillshade:ls,paint_background:Cs,transition:Ks,"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:Xo},Ln=function(C,H,ne,xe){this.message=(C?C+": ":"")+ne,xe&&(this.identifier=xe),H!=null&&H.__line__&&(this.line=H.__line__)};function Us(k){var C=k.key,H=k.value;return H?[new Ln(C,H,"constants have been deprecated as of v8")]:[]}function _s(k){for(var C=[],H=arguments.length-1;H-- >0;)C[H]=arguments[H+1];for(var ne=0,xe=C;ne":k.itemType.kind==="value"?"array":"array<"+C+">"}else return k.kind}var Nl=[il,xn,ko,bo,Is,Ts,pu,us(co),js];function su(k,C){if(C.kind==="error")return null;if(k.kind==="array"){if(C.kind==="array"&&(C.N===0&&C.itemType.kind==="value"||!su(k.itemType,C.itemType))&&(typeof k.N!="number"||k.N===C.N))return null}else{if(k.kind===C.kind)return null;if(k.kind==="value")for(var H=0,ne=Nl;H255?255:Gt}function xe(Gt){return Gt<0?0:Gt>1?1:Gt}function Re(Gt){return Gt[Gt.length-1]==="%"?ne(parseFloat(Gt)/100*255):ne(parseInt(Gt))}function qe(Gt){return Gt[Gt.length-1]==="%"?xe(parseFloat(Gt)/100):xe(parseFloat(Gt))}function pt(Gt,tr,Pr){return Pr<0?Pr+=1:Pr>1&&(Pr-=1),Pr*6<1?Gt+(tr-Gt)*Pr*6:Pr*2<1?tr:Pr*3<2?Gt+(tr-Gt)*(2/3-Pr)*6:Gt}function Dt(Gt){var tr=Gt.replace(/ /g,"").toLowerCase();if(tr in H)return H[tr].slice();if(tr[0]==="#"){if(tr.length===4){var Pr=parseInt(tr.substr(1),16);return Pr>=0&&Pr<=4095?[(Pr&3840)>>4|(Pr&3840)>>8,Pr&240|(Pr&240)>>4,Pr&15|(Pr&15)<<4,1]:null}else if(tr.length===7){var Pr=parseInt(tr.substr(1),16);return Pr>=0&&Pr<=16777215?[(Pr&16711680)>>16,(Pr&65280)>>8,Pr&255,1]:null}return null}var Zr=tr.indexOf("("),Vr=tr.indexOf(")");if(Zr!==-1&&Vr+1===tr.length){var ua=tr.substr(0,Zr),Oa=tr.substr(Zr+1,Vr-(Zr+1)).split(","),Mi=1;switch(ua){case"rgba":if(Oa.length!==4)return null;Mi=qe(Oa.pop());case"rgb":return Oa.length!==3?null:[Re(Oa[0]),Re(Oa[1]),Re(Oa[2]),Mi];case"hsla":if(Oa.length!==4)return null;Mi=qe(Oa.pop());case"hsl":if(Oa.length!==3)return null;var ii=(parseFloat(Oa[0])%360+360)%360/360,$i=qe(Oa[1]),Oi=qe(Oa[2]),Ji=Oi<=.5?Oi*($i+1):Oi+$i-Oi*$i,ln=Oi*2-Ji;return[ne(pt(ln,Ji,ii+1/3)*255),ne(pt(ln,Ji,ii)*255),ne(pt(ln,Ji,ii-1/3)*255),Mi];default:return null}}return null}try{C.parseCSSColor=Dt}catch{}}),Uc=Sf.parseCSSColor,Fs=function(C,H,ne,xe){xe===void 0&&(xe=1),this.r=C,this.g=H,this.b=ne,this.a=xe};Fs.parse=function(C){if(C){if(C instanceof Fs)return C;if(typeof C=="string"){var H=Uc(C);if(H)return new Fs(H[0]/255*H[3],H[1]/255*H[3],H[2]/255*H[3],H[3])}}},Fs.prototype.toString=function(){var C=this.toArray(),H=C[0],ne=C[1],xe=C[2],Re=C[3];return"rgba("+Math.round(H)+","+Math.round(ne)+","+Math.round(xe)+","+Re+")"},Fs.prototype.toArray=function(){var C=this,H=C.r,ne=C.g,xe=C.b,Re=C.a;return Re===0?[0,0,0,0]:[H*255/Re,ne*255/Re,xe*255/Re,Re]},Fs.black=new Fs(0,0,0,1),Fs.white=new Fs(1,1,1,1),Fs.transparent=new Fs(0,0,0,0),Fs.red=new Fs(1,0,0,1);var dc=function(C,H,ne){C?this.sensitivity=H?"variant":"case":this.sensitivity=H?"accent":"base",this.locale=ne,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};dc.prototype.compare=function(C,H){return this.collator.compare(C,H)},dc.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var Hc=function(C,H,ne,xe,Re){this.text=C,this.image=H,this.scale=ne,this.fontStack=xe,this.textColor=Re},lu=function(C){this.sections=C};lu.fromString=function(C){return new lu([new Hc(C,null,null,null,null)])},lu.prototype.isEmpty=function(){return this.sections.length===0?!0:!this.sections.some(function(C){return C.text.length!==0||C.image&&C.image.name.length!==0})},lu.factory=function(C){return C instanceof lu?C:lu.fromString(C)},lu.prototype.toString=function(){return this.sections.length===0?"":this.sections.map(function(C){return C.text}).join("")},lu.prototype.serialize=function(){for(var C=["format"],H=0,ne=this.sections;H=0&&k<=255&&typeof C=="number"&&C>=0&&C<=255&&typeof H=="number"&&H>=0&&H<=255)){var xe=typeof ne=="number"?[k,C,H,ne]:[k,C,H];return"Invalid rgba value ["+xe.join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}return typeof ne>"u"||typeof ne=="number"&&ne>=0&&ne<=1?null:"Invalid rgba value ["+[k,C,H,ne].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 Fs)return!0;if(k instanceof dc)return!0;if(k instanceof lu)return!0;if(k instanceof Pl)return!0;if(Array.isArray(k)){for(var C=0,H=k;C2){var pt=C[1];if(typeof pt!="string"||!(pt in nc)||pt==="object")return H.error('The item type argument of "array" must be one of string, number, boolean',1);qe=nc[pt],ne++}else qe=co;var Dt;if(C.length>3){if(C[2]!==null&&(typeof C[2]!="number"||C[2]<0||C[2]!==Math.floor(C[2])))return H.error('The length argument to "array" must be a positive integer literal',2);Dt=C[2],ne++}xe=us(qe,Dt)}else xe=nc[Re];for(var Gt=[];ne1)&&H.push(xe)}}return H.concat(this.args.map(function(Re){return Re.serialize()}))};var qu=function(C){this.type=Ts,this.sections=C};qu.parse=function(C,H){if(C.length<2)return H.error("Expected at least one argument.");var ne=C[1];if(!Array.isArray(ne)&&typeof ne=="object")return H.error("First argument must be an image or text section.");for(var xe=[],Re=!1,qe=1;qe<=C.length-1;++qe){var pt=C[qe];if(Re&&typeof pt=="object"&&!Array.isArray(pt)){Re=!1;var Dt=null;if(pt["font-scale"]&&(Dt=H.parse(pt["font-scale"],1,xn),!Dt))return null;var Gt=null;if(pt["text-font"]&&(Gt=H.parse(pt["text-font"],1,us(ko)),!Gt))return null;var tr=null;if(pt["text-color"]&&(tr=H.parse(pt["text-color"],1,Is),!tr))return null;var Pr=xe[xe.length-1];Pr.scale=Dt,Pr.font=Gt,Pr.textColor=tr}else{var Zr=H.parse(C[qe],1,co);if(!Zr)return null;var Vr=Zr.type.kind;if(Vr!=="string"&&Vr!=="value"&&Vr!=="null"&&Vr!=="resolvedImage")return H.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");Re=!0,xe.push({content:Zr,scale:null,font:null,textColor:null})}}return new qu(xe)},qu.prototype.evaluate=function(C){var H=function(ne){var xe=ne.content.evaluate(C);return nl(xe)===js?new Hc("",xe,null,null,null):new Hc(ml(xe),null,ne.scale?ne.scale.evaluate(C):null,ne.font?ne.font.evaluate(C).join(","):null,ne.textColor?ne.textColor.evaluate(C):null)};return new lu(this.sections.map(H))},qu.prototype.eachChild=function(C){for(var H=0,ne=this.sections;H-1),ne},fl.prototype.eachChild=function(C){C(this.input)},fl.prototype.outputDefined=function(){return!1},fl.prototype.serialize=function(){return["image",this.input.serialize()]};var xh={"to-boolean":bo,"to-color":Is,"to-number":xn,"to-string":ko},ns=function(C,H){this.type=C,this.args=H};ns.parse=function(C,H){if(C.length<2)return H.error("Expected at least one argument.");var ne=C[0];if((ne==="to-boolean"||ne==="to-string")&&C.length!==2)return H.error("Expected one argument.");for(var xe=xh[ne],Re=[],qe=1;qe4?ne="Invalid rbga value "+JSON.stringify(H)+": expected an array containing either three or four numeric values.":ne=ic(H[0],H[1],H[2],H[3]),!ne))return new Fs(H[0]/255,H[1]/255,H[2]/255,H[3])}throw new Xs(ne||"Could not parse color from value '"+(typeof H=="string"?H:String(JSON.stringify(H)))+"'")}else if(this.type.kind==="number"){for(var Dt=null,Gt=0,tr=this.args;Gt=C[2]||k[1]<=C[1]||k[3]>=C[3])}function Jf(k,C){var H=Ac(k[0]),ne=nf(k[1]),xe=Math.pow(2,C.z);return[Math.round(H*xe*jl),Math.round(ne*xe*jl)]}function Of(k,C,H){var ne=k[0]-C[0],xe=k[1]-C[1],Re=k[0]-H[0],qe=k[1]-H[1];return ne*qe-Re*xe===0&&ne*Re<=0&&xe*qe<=0}function of(k,C,H){return C[1]>k[1]!=H[1]>k[1]&&k[0]<(H[0]-C[0])*(k[1]-C[1])/(H[1]-C[1])+C[0]}function jc(k,C){for(var H=!1,ne=0,xe=C.length;ne0&&Pr<0||tr<0&&Pr>0}function Ef(k,C,H,ne){var xe=[C[0]-k[0],C[1]-k[1]],Re=[ne[0]-H[0],ne[1]-H[1]];return Nf(Re,xe)===0?!1:!!(Gu(k,C,H,ne)&&Gu(H,ne,k,C))}function oc(k,C,H){for(var ne=0,xe=H;neH[2]){var xe=ne*.5,Re=k[0]-H[0]>xe?-ne:H[0]-k[0]>xe?ne:0;Re===0&&(Re=k[0]-H[2]>xe?-ne:H[2]-k[0]>xe?ne:0),k[0]+=Re}Mf(C,k)}function kf(k){k[0]=k[1]=1/0,k[2]=k[3]=-1/0}function fh(k,C,H,ne){for(var xe=Math.pow(2,ne.z)*jl,Re=[ne.x*jl,ne.y*jl],qe=[],pt=0,Dt=k;pt=0)return!1;var H=!0;return k.eachChild(function(ne){H&&!Lu(ne,C)&&(H=!1)}),H}var Mc=function(C,H){this.type=H.type,this.name=C,this.boundExpression=H};Mc.parse=function(C,H){if(C.length!==2||typeof C[1]!="string")return H.error("'var' expression requires exactly one string literal argument.");var ne=C[1];return H.scope.has(ne)?new Mc(ne,H.scope.get(ne)):H.error('Unknown variable "'+ne+'". Make sure "'+ne+'" has been bound in an enclosing "let" expression before using it.',1)},Mc.prototype.evaluate=function(C){return this.boundExpression.evaluate(C)},Mc.prototype.eachChild=function(){},Mc.prototype.outputDefined=function(){return!1},Mc.prototype.serialize=function(){return["var",this.name]};var ol=function(C,H,ne,xe,Re){H===void 0&&(H=[]),xe===void 0&&(xe=new Ws),Re===void 0&&(Re=[]),this.registry=C,this.path=H,this.key=H.map(function(qe){return"["+qe+"]"}).join(""),this.scope=xe,this.errors=Re,this.expectedType=ne};ol.prototype.parse=function(C,H,ne,xe,Re){return Re===void 0&&(Re={}),H?this.concat(H,ne,xe)._parse(C,Re):this._parse(C,Re)},ol.prototype._parse=function(C,H){(C===null||typeof C=="string"||typeof C=="boolean"||typeof C=="number")&&(C=["literal",C]);function ne(tr,Pr,Zr){return Zr==="assert"?new Ul(Pr,[tr]):Zr==="coerce"?new ns(Pr,[tr]):tr}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 xe=C[0];if(typeof xe!="string")return this.error("Expression name must be a string, but found "+typeof xe+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var Re=this.registry[xe];if(Re){var qe=Re.parse(C,this);if(!qe)return null;if(this.expectedType){var pt=this.expectedType,Dt=qe.type;if((pt.kind==="string"||pt.kind==="number"||pt.kind==="boolean"||pt.kind==="object"||pt.kind==="array")&&Dt.kind==="value")qe=ne(qe,pt,H.typeAnnotation||"assert");else if((pt.kind==="color"||pt.kind==="formatted"||pt.kind==="resolvedImage")&&(Dt.kind==="value"||Dt.kind==="string"))qe=ne(qe,pt,H.typeAnnotation||"coerce");else if(this.checkSubtype(pt,Dt))return null}if(!(qe instanceof xs)&&qe.type.kind!=="resolvedImage"&&vc(qe)){var Gt=new Es;try{qe=new xs(qe.type,qe.evaluate(Gt))}catch(tr){return this.error(tr.message),null}}return qe}return this.error('Unknown expression "'+xe+'". If you wanted a literal array, use ["literal", [...]].',0)}else return typeof C>"u"?this.error("'undefined' value invalid. Use null instead."):typeof C=="object"?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof C+" instead.")},ol.prototype.concat=function(C,H,ne){var xe=typeof C=="number"?this.path.concat(C):this.path,Re=ne?this.scope.concat(ne):this.scope;return new ol(this.registry,xe,H||null,Re,this.errors)},ol.prototype.error=function(C){for(var H=[],ne=arguments.length-1;ne-- >0;)H[ne]=arguments[ne+1];var xe=""+this.key+H.map(function(Re){return"["+Re+"]"}).join("");this.errors.push(new vs(xe,C))},ol.prototype.checkSubtype=function(C,H){var ne=su(C,H);return ne&&this.error(ne),ne};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 ns||k instanceof Ul,H=!0;return k.eachChild(function(ne){C?H=H&&vc(ne):H=H&&ne instanceof xs}),H?jf(k)&&Lu(k,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"]):!1}function yu(k,C){for(var H=k.length-1,ne=0,xe=H,Re=0,qe,pt;ne<=xe;)if(Re=Math.floor((ne+xe)/2),qe=k[Re],pt=k[Re+1],qe<=C){if(Re===H||CC)xe=Re-1;else throw new Xs("Input is not a number.");return 0}var Tu=function(C,H,ne){this.type=C,this.input=H,this.labels=[],this.outputs=[];for(var xe=0,Re=ne;xe=pt)return H.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',Gt);var Pr=H.parse(Dt,tr,Re);if(!Pr)return null;Re=Re||Pr.type,xe.push([pt,Pr])}return new Tu(Re,ne,xe)},Tu.prototype.evaluate=function(C){var H=this.labels,ne=this.outputs;if(H.length===1)return ne[0].evaluate(C);var xe=this.input.evaluate(C);if(xe<=H[0])return ne[0].evaluate(C);var Re=H.length;if(xe>=H[Re-1])return ne[Re-1].evaluate(C);var qe=yu(H,xe);return ne[qe].evaluate(C)},Tu.prototype.eachChild=function(C){C(this.input);for(var H=0,ne=this.outputs;H0&&C.push(this.labels[H]),C.push(this.outputs[H].serialize());return C};function El(k,C,H){return k*(1-H)+C*H}function qf(k,C,H){return new Fs(El(k.r,C.r,H),El(k.g,C.g,H),El(k.b,C.b,H),El(k.a,C.a,H))}function Qf(k,C,H){return k.map(function(ne,xe){return El(ne,C[xe],H)})}var Bu=Object.freeze({__proto__:null,number:El,color:qf,array:Qf}),Ec=.95047,mc=1,Lh=1.08883,sf=4/29,vf=6/29,Nu=3*vf*vf,lf=vf*vf*vf,au=Math.PI/180,Yc=180/Math.PI;function hh(k){return k>lf?Math.pow(k,1/3):k/Nu+sf}function mf(k){return k>vf?k*k*k:Nu*(k-sf)}function sl(k){return 255*(k<=.0031308?12.92*k:1.055*Math.pow(k,1/2.4)-.055)}function _u(k){return k/=255,k<=.04045?k/12.92:Math.pow((k+.055)/1.055,2.4)}function Pu(k){var C=_u(k.r),H=_u(k.g),ne=_u(k.b),xe=hh((.4124564*C+.3575761*H+.1804375*ne)/Ec),Re=hh((.2126729*C+.7151522*H+.072175*ne)/mc),qe=hh((.0193339*C+.119192*H+.9503041*ne)/Lh);return{l:116*Re-16,a:500*(xe-Re),b:200*(Re-qe),alpha:k.a}}function Cf(k){var C=(k.l+16)/116,H=isNaN(k.a)?C:C+k.a/500,ne=isNaN(k.b)?C:C-k.b/200;return C=mc*mf(C),H=Ec*mf(H),ne=Lh*mf(ne),new Fs(sl(3.2404542*H-1.5371385*C-.4985314*ne),sl(-.969266*H+1.8760108*C+.041556*ne),sl(.0556434*H-.2040259*C+1.0572252*ne),k.alpha)}function hl(k,C,H){return{l:El(k.l,C.l,H),a:El(k.a,C.a,H),b:El(k.b,C.b,H),alpha:El(k.alpha,C.alpha,H)}}function uf(k){var C=Pu(k),H=C.l,ne=C.a,xe=C.b,Re=Math.atan2(xe,ne)*Yc;return{h:Re<0?Re+360:Re,c:Math.sqrt(ne*ne+xe*xe),l:H,alpha:k.a}}function kc(k){var C=k.h*au,H=k.c,ne=k.l;return Cf({l:ne,a:Math.cos(C)*H,b:Math.sin(C)*H,alpha:k.alpha})}function Hu(k,C,H){var ne=C-k;return k+H*(ne>180||ne<-180?ne-360*Math.round(ne/360):ne)}function gf(k,C,H){return{h:Hu(k.h,C.h,H),c:El(k.c,C.c,H),l:El(k.l,C.l,H),alpha:El(k.alpha,C.alpha,H)}}var Wu={forward:Pu,reverse:Cf,interpolate:hl},Kc={forward:uf,reverse:kc,interpolate:gf},Lf=Object.freeze({__proto__:null,lab:Wu,hcl:Kc}),iu=function(C,H,ne,xe,Re){this.type=C,this.operator=H,this.interpolation=ne,this.input=xe,this.labels=[],this.outputs=[];for(var qe=0,pt=Re;qe1}))return H.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);xe={name:"cubic-bezier",controlPoints:Dt}}else return H.error("Unknown interpolation type "+String(xe[0]),1,0);if(C.length-1<4)return H.error("Expected at least 4 arguments, but found only "+(C.length-1)+".");if((C.length-1)%2!==0)return H.error("Expected an even number of arguments.");if(Re=H.parse(Re,2,xn),!Re)return null;var Gt=[],tr=null;ne==="interpolate-hcl"||ne==="interpolate-lab"?tr=Is:H.expectedType&&H.expectedType.kind!=="value"&&(tr=H.expectedType);for(var Pr=0;Pr=Zr)return H.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',ua);var Mi=H.parse(Vr,Oa,tr);if(!Mi)return null;tr=tr||Mi.type,Gt.push([Zr,Mi])}return tr.kind!=="number"&&tr.kind!=="color"&&!(tr.kind==="array"&&tr.itemType.kind==="number"&&typeof tr.N=="number")?H.error("Type "+As(tr)+" is not interpolatable."):new iu(tr,ne,xe,Re,Gt)},iu.prototype.evaluate=function(C){var H=this.labels,ne=this.outputs;if(H.length===1)return ne[0].evaluate(C);var xe=this.input.evaluate(C);if(xe<=H[0])return ne[0].evaluate(C);var Re=H.length;if(xe>=H[Re-1])return ne[Re-1].evaluate(C);var qe=yu(H,xe),pt=H[qe],Dt=H[qe+1],Gt=iu.interpolationFactor(this.interpolation,xe,pt,Dt),tr=ne[qe].evaluate(C),Pr=ne[qe+1].evaluate(C);return this.operator==="interpolate"?Bu[this.type.kind.toLowerCase()](tr,Pr,Gt):this.operator==="interpolate-hcl"?Kc.reverse(Kc.interpolate(Kc.forward(tr),Kc.forward(Pr),Gt)):Wu.reverse(Wu.interpolate(Wu.forward(tr),Wu.forward(Pr),Gt))},iu.prototype.eachChild=function(C){C(this.input);for(var H=0,ne=this.outputs;H=ne.length)throw new Xs("Array index out of bounds: "+H+" > "+(ne.length-1)+".");if(H!==Math.floor(H))throw new Xs("Array index must be an integer, but found "+H+" instead.");return ne[H]},gc.prototype.eachChild=function(C){C(this.index),C(this.input)},gc.prototype.outputDefined=function(){return!1},gc.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var ql=function(C,H){this.type=bo,this.needle=C,this.haystack=H};ql.parse=function(C,H){if(C.length!==3)return H.error("Expected 2 arguments, but found "+(C.length-1)+" instead.");var ne=H.parse(C[1],1,co),xe=H.parse(C[2],2,co);return!ne||!xe?null:Tc(ne.type,[bo,ko,xn,il,co])?new ql(ne,xe):H.error("Expected first argument to be of type boolean, string, number or null, but found "+As(ne.type)+" instead")},ql.prototype.evaluate=function(C){var H=this.needle.evaluate(C),ne=this.haystack.evaluate(C);if(!ne)return!1;if(!du(H,["boolean","string","number","null"]))throw new Xs("Expected first argument to be of type boolean, string, number or null, but found "+As(nl(H))+" instead.");if(!du(ne,["string","array"]))throw new Xs("Expected second argument to be of type array or string, but found "+As(nl(ne))+" instead.");return ne.indexOf(H)>=0},ql.prototype.eachChild=function(C){C(this.needle),C(this.haystack)},ql.prototype.outputDefined=function(){return!0},ql.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var xu=function(C,H,ne){this.type=xn,this.needle=C,this.haystack=H,this.fromIndex=ne};xu.parse=function(C,H){if(C.length<=2||C.length>=5)return H.error("Expected 3 or 4 arguments, but found "+(C.length-1)+" instead.");var ne=H.parse(C[1],1,co),xe=H.parse(C[2],2,co);if(!ne||!xe)return null;if(!Tc(ne.type,[bo,ko,xn,il,co]))return H.error("Expected first argument to be of type boolean, string, number or null, but found "+As(ne.type)+" instead");if(C.length===4){var Re=H.parse(C[3],3,xn);return Re?new xu(ne,xe,Re):null}else return new xu(ne,xe)},xu.prototype.evaluate=function(C){var H=this.needle.evaluate(C),ne=this.haystack.evaluate(C);if(!du(H,["boolean","string","number","null"]))throw new Xs("Expected first argument to be of type boolean, string, number or null, but found "+As(nl(H))+" instead.");if(!du(ne,["string","array"]))throw new Xs("Expected second argument to be of type array or string, but found "+As(nl(ne))+" instead.");if(this.fromIndex){var xe=this.fromIndex.evaluate(C);return ne.indexOf(H,xe)}return ne.indexOf(H)},xu.prototype.eachChild=function(C){C(this.needle),C(this.haystack),this.fromIndex&&C(this.fromIndex)},xu.prototype.outputDefined=function(){return!1},xu.prototype.serialize=function(){if(this.fromIndex!=null&&this.fromIndex!==void 0){var C=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),C]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var Lc=function(C,H,ne,xe,Re,qe){this.inputType=C,this.type=H,this.input=ne,this.cases=xe,this.outputs=Re,this.otherwise=qe};Lc.parse=function(C,H){if(C.length<5)return H.error("Expected at least 4 arguments, but found only "+(C.length-1)+".");if(C.length%2!==1)return H.error("Expected an even number of arguments.");var ne,xe;H.expectedType&&H.expectedType.kind!=="value"&&(xe=H.expectedType);for(var Re={},qe=[],pt=2;ptNumber.MAX_SAFE_INTEGER)return tr.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if(typeof Vr=="number"&&Math.floor(Vr)!==Vr)return tr.error("Numeric branch labels must be integer values.");if(!ne)ne=nl(Vr);else if(tr.checkSubtype(ne,nl(Vr)))return null;if(typeof Re[String(Vr)]<"u")return tr.error("Branch labels must be unique.");Re[String(Vr)]=qe.length}var ua=H.parse(Gt,pt,xe);if(!ua)return null;xe=xe||ua.type,qe.push(ua)}var Oa=H.parse(C[1],1,co);if(!Oa)return null;var Mi=H.parse(C[C.length-1],C.length-1,xe);return!Mi||Oa.type.kind!=="value"&&H.concat(1).checkSubtype(ne,Oa.type)?null:new Lc(ne,xe,Oa,Re,qe,Mi)},Lc.prototype.evaluate=function(C){var H=this.input.evaluate(C),ne=nl(H)===this.inputType&&this.outputs[this.cases[H]]||this.otherwise;return ne.evaluate(C)},Lc.prototype.eachChild=function(C){C(this.input),this.outputs.forEach(C),C(this.otherwise)},Lc.prototype.outputDefined=function(){return this.outputs.every(function(C){return C.outputDefined()})&&this.otherwise.outputDefined()},Lc.prototype.serialize=function(){for(var C=this,H=["match",this.input.serialize()],ne=Object.keys(this.cases).sort(),xe=[],Re={},qe=0,pt=ne;qe=5)return H.error("Expected 3 or 4 arguments, but found "+(C.length-1)+" instead.");var ne=H.parse(C[1],1,co),xe=H.parse(C[2],2,xn);if(!ne||!xe)return null;if(!Tc(ne.type,[us(co),ko,co]))return H.error("Expected first argument to be of type array or string, but found "+As(ne.type)+" instead");if(C.length===4){var Re=H.parse(C[3],3,xn);return Re?new sc(ne.type,ne,xe,Re):null}else return new sc(ne.type,ne,xe)},sc.prototype.evaluate=function(C){var H=this.input.evaluate(C),ne=this.beginIndex.evaluate(C);if(!du(H,["string","array"]))throw new Xs("Expected first argument to be of type array or string, but found "+As(nl(H))+" instead.");if(this.endIndex){var xe=this.endIndex.evaluate(C);return H.slice(ne,xe)}return H.slice(ne)},sc.prototype.eachChild=function(C){C(this.input),C(this.beginIndex),this.endIndex&&C(this.endIndex)},sc.prototype.outputDefined=function(){return!1},sc.prototype.serialize=function(){if(this.endIndex!=null&&this.endIndex!==void 0){var C=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),C]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};function Pc(k,C){return k==="=="||k==="!="?C.kind==="boolean"||C.kind==="string"||C.kind==="number"||C.kind==="null"||C.kind==="value":C.kind==="string"||C.kind==="number"||C.kind==="value"}function Qt(k,C,H){return C===H}function br(k,C,H){return C!==H}function aa(k,C,H){return CH}function ka(k,C,H){return C<=H}function li(k,C,H){return C>=H}function Ci(k,C,H,ne){return ne.compare(C,H)===0}function Hi(k,C,H,ne){return!Ci(k,C,H,ne)}function Qi(k,C,H,ne){return ne.compare(C,H)<0}function dn(k,C,H,ne){return ne.compare(C,H)>0}function Pi(k,C,H,ne){return ne.compare(C,H)<=0}function Di(k,C,H,ne){return ne.compare(C,H)>=0}function Ni(k,C,H){var ne=k!=="=="&&k!=="!=";return function(){function xe(Re,qe,pt){this.type=bo,this.lhs=Re,this.rhs=qe,this.collator=pt,this.hasUntypedArgument=Re.type.kind==="value"||qe.type.kind==="value"}return xe.parse=function(qe,pt){if(qe.length!==3&&qe.length!==4)return pt.error("Expected two or three arguments.");var Dt=qe[0],Gt=pt.parse(qe[1],1,co);if(!Gt)return null;if(!Pc(Dt,Gt.type))return pt.concat(1).error('"'+Dt+`" comparisons are not supported for type '`+As(Gt.type)+"'.");var tr=pt.parse(qe[2],2,co);if(!tr)return null;if(!Pc(Dt,tr.type))return pt.concat(2).error('"'+Dt+`" comparisons are not supported for type '`+As(tr.type)+"'.");if(Gt.type.kind!==tr.type.kind&&Gt.type.kind!=="value"&&tr.type.kind!=="value")return pt.error("Cannot compare types '"+As(Gt.type)+"' and '"+As(tr.type)+"'.");ne&&(Gt.type.kind==="value"&&tr.type.kind!=="value"?Gt=new Ul(tr.type,[Gt]):Gt.type.kind!=="value"&&tr.type.kind==="value"&&(tr=new Ul(Gt.type,[tr])));var Pr=null;if(qe.length===4){if(Gt.type.kind!=="string"&&tr.type.kind!=="string"&&Gt.type.kind!=="value"&&tr.type.kind!=="value")return pt.error("Cannot use collator to compare non-string types.");if(Pr=pt.parse(qe[3],3,vl),!Pr)return null}return new xe(Gt,tr,Pr)},xe.prototype.evaluate=function(qe){var pt=this.lhs.evaluate(qe),Dt=this.rhs.evaluate(qe);if(ne&&this.hasUntypedArgument){var Gt=nl(pt),tr=nl(Dt);if(Gt.kind!==tr.kind||!(Gt.kind==="string"||Gt.kind==="number"))throw new Xs('Expected arguments for "'+k+'" to be (string, string) or (number, number), but found ('+Gt.kind+", "+tr.kind+") instead.")}if(this.collator&&!ne&&this.hasUntypedArgument){var Pr=nl(pt),Zr=nl(Dt);if(Pr.kind!=="string"||Zr.kind!=="string")return C(qe,pt,Dt)}return this.collator?H(qe,pt,Dt,this.collator.evaluate(qe)):C(qe,pt,Dt)},xe.prototype.eachChild=function(qe){qe(this.lhs),qe(this.rhs),this.collator&&qe(this.collator)},xe.prototype.outputDefined=function(){return!0},xe.prototype.serialize=function(){var qe=[k];return this.eachChild(function(pt){qe.push(pt.serialize())}),qe},xe}()}var mi=Ni("==",Qt,Ci),Mn=Ni("!=",br,Hi),Qn=Ni("<",aa,Qi),ao=Ni(">",$r,dn),eo=Ni("<=",ka,Pi),fo=Ni(">=",li,Di),An=function(C,H,ne,xe,Re){this.type=ko,this.number=C,this.locale=H,this.currency=ne,this.minFractionDigits=xe,this.maxFractionDigits=Re};An.parse=function(C,H){if(C.length!==3)return H.error("Expected two arguments.");var ne=H.parse(C[1],1,xn);if(!ne)return null;var xe=C[2];if(typeof xe!="object"||Array.isArray(xe))return H.error("NumberFormat options argument must be an object.");var Re=null;if(xe.locale&&(Re=H.parse(xe.locale,1,ko),!Re))return null;var qe=null;if(xe.currency&&(qe=H.parse(xe.currency,1,ko),!qe))return null;var pt=null;if(xe["min-fraction-digits"]&&(pt=H.parse(xe["min-fraction-digits"],1,xn),!pt))return null;var Dt=null;return xe["max-fraction-digits"]&&(Dt=H.parse(xe["max-fraction-digits"],1,xn),!Dt)?null:new An(ne,Re,qe,pt,Dt)},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=xn,this.input=C};un.parse=function(C,H){if(C.length!==2)return H.error("Expected 1 argument, but found "+(C.length-1)+" instead.");var ne=H.parse(C[1],1);return ne?ne.type.kind!=="array"&&ne.type.kind!=="string"&&ne.type.kind!=="value"?H.error("Expected argument of type string or array, but found "+As(ne.type)+" instead."):new un(ne):null},un.prototype.evaluate=function(C){var H=this.input.evaluate(C);if(typeof H=="string")return H.length;if(Array.isArray(H))return H.length;throw new Xs("Expected value to be of type string or array, but found "+As(nl(H))+" instead.")},un.prototype.eachChild=function(C){C(this.input)},un.prototype.outputDefined=function(){return!1},un.prototype.serialize=function(){var C=["length"];return this.eachChild(function(H){C.push(H.serialize())}),C};var yo={"==":mi,"!=":Mn,">":ao,"<":Qn,">=":fo,"<=":eo,array:Ul,at:gc,boolean:Ul,case:Jc,coalesce:Xu,collator:Vu,format:qu,image:fl,in:ql,"index-of":xu,interpolate:iu,"interpolate-hcl":iu,"interpolate-lab":iu,length:un,let:Cc,literal:xs,match:Lc,number:Ul,"number-format":An,object:Ul,slice:sc,step:Tu,string:Ul,"to-boolean":ns,"to-color":ns,"to-number":ns,"to-string":ns,var:Mc,within:Cu};function Ko(k,C){var H=C[0],ne=C[1],xe=C[2],Re=C[3];H=H.evaluate(k),ne=ne.evaluate(k),xe=xe.evaluate(k);var qe=Re?Re.evaluate(k):1,pt=ic(H,ne,xe,qe);if(pt)throw new Xs(pt);return new Fs(H/255*qe,ne/255*qe,xe/255*qe,qe)}function Ss(k,C){return k in C}function rl(k,C){var H=C[k];return typeof H>"u"?null:H}function Os(k,C,H,ne){for(;H<=ne;){var xe=H+ne>>1;if(C[xe]===k)return!0;C[xe]>k?ne=xe-1:H=xe+1}return!1}function el(k){return{type:k}}to.register(yo,{error:[Vs,[ko],function(k,C){var H=C[0];throw new Xs(H.evaluate(k))}],typeof:[ko,[co],function(k,C){var H=C[0];return As(nl(H.evaluate(k)))}],"to-rgba":[us(xn,4),[Is],function(k,C){var H=C[0];return H.evaluate(k).toArray()}],rgb:[Is,[xn,xn,xn],Ko],rgba:[Is,[xn,xn,xn,xn],Ko],has:{type:bo,overloads:[[[ko],function(k,C){var H=C[0];return Ss(H.evaluate(k),k.properties())}],[[ko,pu],function(k,C){var H=C[0],ne=C[1];return Ss(H.evaluate(k),ne.evaluate(k))}]]},get:{type:co,overloads:[[[ko],function(k,C){var H=C[0];return rl(H.evaluate(k),k.properties())}],[[ko,pu],function(k,C){var H=C[0],ne=C[1];return rl(H.evaluate(k),ne.evaluate(k))}]]},"feature-state":[co,[ko],function(k,C){var H=C[0];return rl(H.evaluate(k),k.featureState||{})}],properties:[pu,[],function(k){return k.properties()}],"geometry-type":[ko,[],function(k){return k.geometryType()}],id:[co,[],function(k){return k.id()}],zoom:[xn,[],function(k){return k.globals.zoom}],"heatmap-density":[xn,[],function(k){return k.globals.heatmapDensity||0}],"line-progress":[xn,[],function(k){return k.globals.lineProgress||0}],accumulated:[co,[],function(k){return k.globals.accumulated===void 0?null:k.globals.accumulated}],"+":[xn,el(xn),function(k,C){for(var H=0,ne=0,xe=C;ne":[bo,[ko,co],function(k,C){var H=C[0],ne=C[1],xe=k.properties()[H.value],Re=ne.value;return typeof xe==typeof Re&&xe>Re}],"filter-id->":[bo,[co],function(k,C){var H=C[0],ne=k.id(),xe=H.value;return typeof ne==typeof xe&&ne>xe}],"filter-<=":[bo,[ko,co],function(k,C){var H=C[0],ne=C[1],xe=k.properties()[H.value],Re=ne.value;return typeof xe==typeof Re&&xe<=Re}],"filter-id-<=":[bo,[co],function(k,C){var H=C[0],ne=k.id(),xe=H.value;return typeof ne==typeof xe&&ne<=xe}],"filter->=":[bo,[ko,co],function(k,C){var H=C[0],ne=C[1],xe=k.properties()[H.value],Re=ne.value;return typeof xe==typeof Re&&xe>=Re}],"filter-id->=":[bo,[co],function(k,C){var H=C[0],ne=k.id(),xe=H.value;return typeof ne==typeof xe&&ne>=xe}],"filter-has":[bo,[co],function(k,C){var H=C[0];return H.value in k.properties()}],"filter-has-id":[bo,[],function(k){return k.id()!==null&&k.id()!==void 0}],"filter-type-in":[bo,[us(ko)],function(k,C){var H=C[0];return H.value.indexOf(k.geometryType())>=0}],"filter-id-in":[bo,[us(co)],function(k,C){var H=C[0];return H.value.indexOf(k.id())>=0}],"filter-in-small":[bo,[ko,us(co)],function(k,C){var H=C[0],ne=C[1];return ne.value.indexOf(k.properties()[H.value])>=0}],"filter-in-large":[bo,[ko,us(co)],function(k,C){var H=C[0],ne=C[1];return Os(k.properties()[H.value],ne.value,0,ne.value.length-1)}],all:{type:bo,overloads:[[[bo,bo],function(k,C){var H=C[0],ne=C[1];return H.evaluate(k)&&ne.evaluate(k)}],[el(bo),function(k,C){for(var H=0,ne=C;H-1}function Un(k){return!!k.expression&&k.expression.interpolated}function Lo(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 Rs(k){return k}function uu(k,C){var H=C.type==="color",ne=k.stops&&typeof k.stops[0][0]=="object",xe=ne||k.property!==void 0,Re=ne||!xe,qe=k.type||(Un(C)?"exponential":"interval");if(H&&(k=_s({},k),k.stops&&(k.stops=k.stops.map(function(Nn){return[Nn[0],Fs.parse(Nn[1])]})),k.default?k.default=Fs.parse(k.default):k.default=Fs.parse(C.default)),k.colorSpace&&k.colorSpace!=="rgb"&&!Lf[k.colorSpace])throw new Error("Unknown color space: "+k.colorSpace);var pt,Dt,Gt;if(qe==="exponential")pt=bu;else if(qe==="interval")pt=Ic;else if(qe==="categorical"){pt=Zu,Dt=Object.create(null);for(var tr=0,Pr=k.stops;tr=k.stops[ne-1][0])return k.stops[ne-1][1];var xe=yu(k.stops.map(function(Re){return Re[0]}),H);return k.stops[xe][1]}function bu(k,C,H){var ne=k.base!==void 0?k.base:1;if(Lo(H)!=="number")return Iu(k.default,C.default);var xe=k.stops.length;if(xe===1||H<=k.stops[0][0])return k.stops[0][1];if(H>=k.stops[xe-1][0])return k.stops[xe-1][1];var Re=yu(k.stops.map(function(Pr){return Pr[0]}),H),qe=Au(H,ne,k.stops[Re][0],k.stops[Re+1][0]),pt=k.stops[Re][1],Dt=k.stops[Re+1][1],Gt=Bu[C.type]||Rs;if(k.colorSpace&&k.colorSpace!=="rgb"){var tr=Lf[k.colorSpace];Gt=function(Pr,Zr){return tr.reverse(tr.interpolate(tr.forward(Pr),tr.forward(Zr),qe))}}return typeof pt.evaluate=="function"?{evaluate:function(){for(var Zr=[],Vr=arguments.length;Vr--;)Zr[Vr]=arguments[Vr];var ua=pt.evaluate.apply(void 0,Zr),Oa=Dt.evaluate.apply(void 0,Zr);if(!(ua===void 0||Oa===void 0))return Gt(ua,Oa,qe)}}:Gt(pt,Dt,qe)}function Rc(k,C,H){return C.type==="color"?H=Fs.parse(H):C.type==="formatted"?H=lu.fromString(H.toString()):C.type==="resolvedImage"?H=Pl.fromString(H.toString()):Lo(H)!==C.type&&(C.type!=="enum"||!C.values[H])&&(H=void 0),Iu(H,k.default,C.default)}function Au(k,C,H,ne){var xe=ne-H,Re=k-H;return xe===0?0:C===1?Re/xe:(Math.pow(C,Re)-1)/(Math.pow(C,xe)-1)}var yc=function(C,H){this.expression=C,this._warningHistory={},this._evaluator=new Es,this._defaultValue=H?Se(H):null,this._enumValues=H&&H.type==="enum"?H.values:null};yc.prototype.evaluateWithoutErrorHandling=function(C,H,ne,xe,Re,qe){return this._evaluator.globals=C,this._evaluator.feature=H,this._evaluator.featureState=ne,this._evaluator.canonical=xe,this._evaluator.availableImages=Re||null,this._evaluator.formattedSection=qe,this.expression.evaluate(this._evaluator)},yc.prototype.evaluate=function(C,H,ne,xe,Re,qe){this._evaluator.globals=C,this._evaluator.feature=H||null,this._evaluator.featureState=ne||null,this._evaluator.canonical=xe,this._evaluator.availableImages=Re||null,this._evaluator.formattedSection=qe||null;try{var pt=this.expression.evaluate(this._evaluator);if(pt==null||typeof pt=="number"&&pt!==pt)return this._defaultValue;if(this._enumValues&&!(pt in this._enumValues))throw new Xs("Expected value to be one of "+Object.keys(this._enumValues).map(function(Dt){return JSON.stringify(Dt)}).join(", ")+", but found "+JSON.stringify(pt)+" instead.");return pt}catch(Dt){return this._warningHistory[Dt.message]||(this._warningHistory[Dt.message]=!0,typeof console<"u"&&console.warn(Dt.message)),this._defaultValue}};function ho(k){return Array.isArray(k)&&k.length>0&&typeof k[0]=="string"&&k[0]in yo}function Ro(k,C){var H=new ol(yo,[],C?we(C):void 0),ne=H.parse(k,void 0,void 0,void 0,C&&C.type==="string"?{typeAnnotation:"coerce"}:void 0);return ne?bs(new yc(ne,C)):Fl(H.errors)}var Dc=function(C,H){this.kind=C,this._styleExpression=H,this.isStateDependent=C!=="constant"&&!yl(H.expression)};Dc.prototype.evaluateWithoutErrorHandling=function(C,H,ne,xe,Re,qe){return this._styleExpression.evaluateWithoutErrorHandling(C,H,ne,xe,Re,qe)},Dc.prototype.evaluate=function(C,H,ne,xe,Re,qe){return this._styleExpression.evaluate(C,H,ne,xe,Re,qe)};var lc=function(C,H,ne,xe){this.kind=C,this.zoomStops=ne,this._styleExpression=H,this.isStateDependent=C!=="camera"&&!yl(H.expression),this.interpolationType=xe};lc.prototype.evaluateWithoutErrorHandling=function(C,H,ne,xe,Re,qe){return this._styleExpression.evaluateWithoutErrorHandling(C,H,ne,xe,Re,qe)},lc.prototype.evaluate=function(C,H,ne,xe,Re,qe){return this._styleExpression.evaluate(C,H,ne,xe,Re,qe)},lc.prototype.interpolationFactor=function(C,H,ne){return this.interpolationType?iu.interpolationFactor(this.interpolationType,C,H,ne):0};function Yu(k,C){if(k=Ro(k,C),k.result==="error")return k;var H=k.value.expression,ne=jf(H);if(!ne&&!_l(C))return Fl([new vs("","data expressions not supported")]);var xe=Lu(H,["zoom"]);if(!xe&&!ll(C))return Fl([new vs("","zoom expressions not supported")]);var Re=ie(H);if(!Re&&!xe)return Fl([new vs("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(Re instanceof vs)return Fl([Re]);if(Re instanceof iu&&!Un(C))return Fl([new vs("",'"interpolate" expressions cannot be used with this property')]);if(!Re)return bs(ne?new Dc("constant",k.value):new Dc("source",k.value));var qe=Re instanceof iu?Re.interpolation:void 0;return bs(ne?new lc("camera",k.value,Re.labels,qe):new lc("composite",k.value,Re.labels,qe))}var Ue=function(C,H){this._parameters=C,this._specification=H,_s(this,uu(this._parameters,this._specification))};Ue.deserialize=function(C){return new Ue(C._parameters,C._specification)},Ue.serialize=function(C){return{_parameters:C._parameters,_specification:C._specification}};function I(k,C){if(Js(k))return new Ue(k,C);if(ho(k)){var H=Yu(k,C);if(H.result==="error")throw new Error(H.value.map(function(xe){return xe.key+": "+xe.message}).join(", "));return H.value}else{var ne=k;return typeof k=="string"&&C.type==="color"&&(ne=Fs.parse(k)),{kind:"constant",evaluate:function(){return ne}}}}function ie(k){var C=null;if(k instanceof Cc)C=ie(k.result);else if(k instanceof Xu)for(var H=0,ne=k.args;Hne.maximum?[new Ln(C,H,H+" is greater than the maximum value "+ne.maximum)]:[]}function Nt(k){var C=k.valueSpec,H=Gn(k.value.type),ne,xe={},Re,qe,pt=H!=="categorical"&&k.value.property===void 0,Dt=!pt,Gt=Lo(k.value.stops)==="array"&&Lo(k.value.stops[0])==="array"&&Lo(k.value.stops[0][0])==="object",tr=Be({key:k.key,value:k.value,valueSpec:k.styleSpec.function,style:k.style,styleSpec:k.styleSpec,objectElementValidators:{stops:Pr,default:ua}});return H==="identity"&&pt&&tr.push(new Ln(k.key,k.value,'missing required property "property"')),H!=="identity"&&!k.value.stops&&tr.push(new Ln(k.key,k.value,'missing required property "stops"')),H==="exponential"&&k.valueSpec.expression&&!Un(k.valueSpec)&&tr.push(new Ln(k.key,k.value,"exponential functions not supported")),k.styleSpec.$version>=8&&(Dt&&!_l(k.valueSpec)?tr.push(new Ln(k.key,k.value,"property functions not supported")):pt&&!ll(k.valueSpec)&&tr.push(new Ln(k.key,k.value,"zoom functions not supported"))),(H==="categorical"||Gt)&&k.value.property===void 0&&tr.push(new Ln(k.key,k.value,'"property" property is required')),tr;function Pr(Oa){if(H==="identity")return[new Ln(Oa.key,Oa.value,'identity function may not have a "stops" property')];var Mi=[],ii=Oa.value;return Mi=Mi.concat(dt({key:Oa.key,value:ii,valueSpec:Oa.valueSpec,style:Oa.style,styleSpec:Oa.styleSpec,arrayElementValidator:Zr})),Lo(ii)==="array"&&ii.length===0&&Mi.push(new Ln(Oa.key,ii,"array must have at least one stop")),Mi}function Zr(Oa){var Mi=[],ii=Oa.value,$i=Oa.key;if(Lo(ii)!=="array")return[new Ln($i,ii,"array expected, "+Lo(ii)+" found")];if(ii.length!==2)return[new Ln($i,ii,"array length 2 expected, length "+ii.length+" found")];if(Gt){if(Lo(ii[0])!=="object")return[new Ln($i,ii,"object expected, "+Lo(ii[0])+" found")];if(ii[0].zoom===void 0)return[new Ln($i,ii,"object stop key must have zoom")];if(ii[0].value===void 0)return[new Ln($i,ii,"object stop key must have value")];if(qe&&qe>Gn(ii[0].zoom))return[new Ln($i,ii[0].zoom,"stop zoom values must appear in ascending order")];Gn(ii[0].zoom)!==qe&&(qe=Gn(ii[0].zoom),Re=void 0,xe={}),Mi=Mi.concat(Be({key:$i+"[0]",value:ii[0],valueSpec:{zoom:{}},style:Oa.style,styleSpec:Oa.styleSpec,objectElementValidators:{zoom:St,value:Vr}}))}else Mi=Mi.concat(Vr({key:$i+"[0]",value:ii[0],valueSpec:{},style:Oa.style,styleSpec:Oa.styleSpec},ii));return ho(zs(ii[1]))?Mi.concat([new Ln($i+"[1]",ii[1],"expressions are not allowed in function stops.")]):Mi.concat(Ao({key:$i+"[1]",value:ii[1],valueSpec:C,style:Oa.style,styleSpec:Oa.styleSpec}))}function Vr(Oa,Mi){var ii=Lo(Oa.value),$i=Gn(Oa.value),Oi=Oa.value!==null?Oa.value:Mi;if(!ne)ne=ii;else if(ii!==ne)return[new Ln(Oa.key,Oi,ii+" stop domain type must match previous stop domain type "+ne)];if(ii!=="number"&&ii!=="string"&&ii!=="boolean")return[new Ln(Oa.key,Oi,"stop domain value must be a number, string, or boolean")];if(ii!=="number"&&H!=="categorical"){var Ji="number expected, "+ii+" found";return _l(C)&&H===void 0&&(Ji+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Ln(Oa.key,Oi,Ji)]}return H==="categorical"&&ii==="number"&&(!isFinite($i)||Math.floor($i)!==$i)?[new Ln(Oa.key,Oi,"integer expected, found "+$i)]:H!=="categorical"&&ii==="number"&&Re!==void 0&&$i=2&&k[1]!=="$id"&&k[1]!=="$type";case"in":return k.length>=3&&(typeof k[1]!="string"||Array.isArray(k[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return k.length!==3||Array.isArray(k[1])||Array.isArray(k[2]);case"any":case"all":for(var C=0,H=k.slice(1);CC?1:0}function vt(k){if(!Array.isArray(k))return!1;if(k[0]==="within")return!0;for(var C=1;C"||C==="<="||C===">="?At(k[1],k[2],C):C==="any"?zt(k.slice(1)):C==="all"?["all"].concat(k.slice(1).map(Lt)):C==="none"?["all"].concat(k.slice(1).map(Lt).map(Er)):C==="in"?cr(k[1],k.slice(2)):C==="!in"?Er(cr(k[1],k.slice(2))):C==="has"?yr(k[1]):C==="!has"?Er(yr(k[1])):C==="within"?k:!0;return H}function At(k,C,H){switch(k){case"$type":return["filter-type-"+H,C];case"$id":return["filter-id-"+H,C];default:return["filter-"+H,k,C]}}function zt(k){return["any"].concat(k.map(Lt))}function cr(k,C){if(C.length===0)return!1;switch(k){case"$type":return["filter-type-in",["literal",C]];case"$id":return["filter-id-in",["literal",C]];default:return C.length>200&&!C.some(function(H){return typeof H!=typeof C[0]})?["filter-in-large",k,["literal",C.sort(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(zs(k.value))?$t(_s({},k,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Qr(k)}function Qr(k){var C=k.value,H=k.key;if(Lo(C)!=="array")return[new Ln(H,C,"array expected, "+Lo(C)+" found")];var ne=k.styleSpec,xe,Re=[];if(C.length<1)return[new Ln(H,C,"filter array must have at least 1 element")];switch(Re=Re.concat(Kr({key:H+"[0]",value:C[0],valueSpec:ne.filter_operator,style:k.style,styleSpec:k.styleSpec})),Gn(C[0])){case"<":case"<=":case">":case">=":C.length>=2&&Gn(C[1])==="$type"&&Re.push(new Ln(H,C,'"$type" cannot be use with operator "'+C[0]+'"'));case"==":case"!=":C.length!==3&&Re.push(new Ln(H,C,'filter array for operator "'+C[0]+'" must have 3 elements'));case"in":case"!in":C.length>=2&&(xe=Lo(C[1]),xe!=="string"&&Re.push(new Ln(H+"[1]",C[1],"string expected, "+xe+" found")));for(var qe=2;qe=tr[Vr+0]&&ne>=tr[Vr+1])?(qe[Zr]=!0,Re.push(Gt[Zr])):qe[Zr]=!1}}},cu.prototype._forEachCell=function(k,C,H,ne,xe,Re,qe,pt){for(var Dt=this._convertToCellCoord(k),Gt=this._convertToCellCoord(C),tr=this._convertToCellCoord(H),Pr=this._convertToCellCoord(ne),Zr=Dt;Zr<=tr;Zr++)for(var Vr=Gt;Vr<=Pr;Vr++){var ua=this.d*Vr+Zr;if(!(pt&&!pt(this._convertFromCellCoord(Zr),this._convertFromCellCoord(Vr),this._convertFromCellCoord(Zr+1),this._convertFromCellCoord(Vr+1)))&&xe.call(this,k,C,H,ne,ua,Re,qe,pt))return}},cu.prototype._convertFromCellCoord=function(k){return(k-this.padding)/this.scale},cu.prototype._convertToCellCoord=function(k){return Math.max(0,Math.min(this.d-1,Math.floor(k*this.scale)+this.padding))},cu.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var k=this.cells,C=Tl+this.cells.length+1+1,H=0,ne=0;ne=0)){var Pr=k[tr];Gt[tr]=Gl[Dt].shallow.indexOf(tr)>=0?Pr:bt(Pr,C)}k instanceof Error&&(Gt.message=k.message)}if(Gt.$name)throw new Error("$name property is reserved for worker serialization logic.");return Dt!=="Object"&&(Gt.$name=Dt),Gt}throw new Error("can't serialize object of type "+typeof k)}function Mt(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)||mt(k)||ArrayBuffer.isView(k)||k instanceof uc)return k;if(Array.isArray(k))return k.map(Mt);if(typeof k=="object"){var C=k.$name||"Object",H=Gl[C],ne=H.klass;if(!ne)throw new Error("can't deserialize unregistered class "+C);if(ne.deserialize)return ne.deserialize(k);for(var xe=Object.create(ne.prototype),Re=0,qe=Object.keys(k);Re=0?Dt:Mt(Dt)}}return xe}throw new Error("can't deserialize object of type "+typeof k)}var ar=function(){this.first=!0};ar.prototype.update=function(C,H){var ne=Math.floor(C);return this.first?(this.first=!1,this.lastIntegerZoom=ne,this.lastIntegerZoomTime=0,this.lastZoom=C,this.lastFloorZoom=ne,!0):(this.lastFloorZoom>ne?(this.lastIntegerZoom=ne+1,this.lastIntegerZoomTime=H):this.lastFloorZoom=128&&k<=255},Arabic:function(k){return k>=1536&&k<=1791},"Arabic Supplement":function(k){return k>=1872&&k<=1919},"Arabic Extended-A":function(k){return k>=2208&&k<=2303},"Hangul Jamo":function(k){return k>=4352&&k<=4607},"Unified Canadian Aboriginal Syllabics":function(k){return k>=5120&&k<=5759},Khmer:function(k){return k>=6016&&k<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(k){return k>=6320&&k<=6399},"General Punctuation":function(k){return k>=8192&&k<=8303},"Letterlike Symbols":function(k){return k>=8448&&k<=8527},"Number Forms":function(k){return k>=8528&&k<=8591},"Miscellaneous Technical":function(k){return k>=8960&&k<=9215},"Control Pictures":function(k){return k>=9216&&k<=9279},"Optical Character Recognition":function(k){return k>=9280&&k<=9311},"Enclosed Alphanumerics":function(k){return k>=9312&&k<=9471},"Geometric Shapes":function(k){return k>=9632&&k<=9727},"Miscellaneous Symbols":function(k){return k>=9728&&k<=9983},"Miscellaneous Symbols and Arrows":function(k){return k>=11008&&k<=11263},"CJK Radicals Supplement":function(k){return k>=11904&&k<=12031},"Kangxi Radicals":function(k){return k>=12032&&k<=12255},"Ideographic Description Characters":function(k){return k>=12272&&k<=12287},"CJK Symbols and Punctuation":function(k){return k>=12288&&k<=12351},Hiragana:function(k){return k>=12352&&k<=12447},Katakana:function(k){return k>=12448&&k<=12543},Bopomofo:function(k){return k>=12544&&k<=12591},"Hangul Compatibility Jamo":function(k){return k>=12592&&k<=12687},Kanbun:function(k){return k>=12688&&k<=12703},"Bopomofo Extended":function(k){return k>=12704&&k<=12735},"CJK Strokes":function(k){return k>=12736&&k<=12783},"Katakana Phonetic Extensions":function(k){return k>=12784&&k<=12799},"Enclosed CJK Letters and Months":function(k){return k>=12800&&k<=13055},"CJK Compatibility":function(k){return k>=13056&&k<=13311},"CJK Unified Ideographs Extension A":function(k){return k>=13312&&k<=19903},"Yijing Hexagram Symbols":function(k){return k>=19904&&k<=19967},"CJK Unified Ideographs":function(k){return k>=19968&&k<=40959},"Yi Syllables":function(k){return k>=40960&&k<=42127},"Yi Radicals":function(k){return k>=42128&&k<=42191},"Hangul Jamo Extended-A":function(k){return k>=43360&&k<=43391},"Hangul Syllables":function(k){return k>=44032&&k<=55215},"Hangul Jamo Extended-B":function(k){return k>=55216&&k<=55295},"Private Use Area":function(k){return k>=57344&&k<=63743},"CJK Compatibility Ideographs":function(k){return k>=63744&&k<=64255},"Arabic Presentation Forms-A":function(k){return k>=64336&&k<=65023},"Vertical Forms":function(k){return k>=65040&&k<=65055},"CJK Compatibility Forms":function(k){return k>=65072&&k<=65103},"Small Form Variants":function(k){return k>=65104&&k<=65135},"Arabic Presentation Forms-B":function(k){return k>=65136&&k<=65279},"Halfwidth and Fullwidth Forms":function(k){return k>=65280&&k<=65519}};function _r(k){for(var C=0,H=k;C=65097&&k<=65103)||Ot["CJK Compatibility Ideographs"](k)||Ot["CJK Compatibility"](k)||Ot["CJK Radicals Supplement"](k)||Ot["CJK Strokes"](k)||Ot["CJK Symbols and Punctuation"](k)&&!(k>=12296&&k<=12305)&&!(k>=12308&&k<=12319)&&k!==12336||Ot["CJK Unified Ideographs Extension A"](k)||Ot["CJK Unified Ideographs"](k)||Ot["Enclosed CJK Letters and Months"](k)||Ot["Hangul Compatibility Jamo"](k)||Ot["Hangul Jamo Extended-A"](k)||Ot["Hangul Jamo Extended-B"](k)||Ot["Hangul Jamo"](k)||Ot["Hangul Syllables"](k)||Ot.Hiragana(k)||Ot["Ideographic Description Characters"](k)||Ot.Kanbun(k)||Ot["Kangxi Radicals"](k)||Ot["Katakana Phonetic Extensions"](k)||Ot.Katakana(k)&&k!==12540||Ot["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)||Ot["Small Form Variants"](k)&&!(k>=65112&&k<=65118)&&!(k>=65123&&k<=65126)||Ot["Unified Canadian Aboriginal Syllabics"](k)||Ot["Unified Canadian Aboriginal Syllabics Extended"](k)||Ot["Vertical Forms"](k)||Ot["Yijing Hexagram Symbols"](k)||Ot["Yi Syllables"](k)||Ot["Yi Radicals"](k))}function Ja(k){return!!(Ot["Latin-1 Supplement"](k)&&(k===167||k===169||k===174||k===177||k===188||k===189||k===190||k===215||k===247)||Ot["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)||Ot["Letterlike Symbols"](k)||Ot["Number Forms"](k)||Ot["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)||Ot["Control Pictures"](k)&&k!==9251||Ot["Optical Character Recognition"](k)||Ot["Enclosed Alphanumerics"](k)||Ot["Geometric Shapes"](k)||Ot["Miscellaneous Symbols"](k)&&!(k>=9754&&k<=9759)||Ot["Miscellaneous Symbols and Arrows"](k)&&(k>=11026&&k<=11055||k>=11088&&k<=11097||k>=11192&&k<=11243)||Ot["CJK Symbols and Punctuation"](k)||Ot.Katakana(k)||Ot["Private Use Area"](k)||Ot["CJK Compatibility Forms"](k)||Ot["Small Form Variants"](k)||Ot["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!(da(k)||Ja(k))}function Sa(k){return Ot.Arabic(k)||Ot["Arabic Supplement"](k)||Ot["Arabic Extended-A"](k)||Ot["Arabic Presentation Forms-A"](k)||Ot["Arabic Presentation Forms-B"](k)}function Fa(k){return k>=1424&&k<=2303||Ot["Arabic Presentation Forms-A"](k)||Ot["Arabic Presentation Forms-B"](k)}function Xa(k,C){return!(!C&&Fa(k)||k>=2304&&k<=3583||k>=3840&&k<=4255||Ot.Khmer(k))}function fi(k){for(var C=0,H=k;C-1&&(rn=La.error),sn&&sn(k)};function Jn(){ro.fire(new Br("pluginStateChange",{pluginStatus:rn,pluginURL:vn}))}var ro=new xr,Yo=function(){return rn},io=function(k){return k({pluginStatus:rn,pluginURL:vn}),ro.on("pluginStateChange",k),k},Ho=function(k,C,H){if(H===void 0&&(H=!1),rn===La.deferred||rn===La.loading||rn===La.loaded)throw new Error("setRTLTextPlugin cannot be called multiple times.");vn=be.resolveURL(k),rn=La.deferred,sn=C,Jn(),H||cl()},cl=function(){if(rn!==La.deferred||!vn)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");rn=La.loading,Jn(),vn&&ra({url:vn},function(k){k?Pn(k):(rn=La.loaded,Jn())})},al={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return rn===La.loaded||al.applyArabicShaping!=null},isLoading:function(){return rn===La.loading},setState:function(C){rn=C.pluginStatus,vn=C.pluginURL},isParsed:function(){return al.applyArabicShaping!=null&&al.processBidirectionalText!=null&&al.processStyledBidirectionalText!=null},getPluginURL:function(){return vn}},xl=function(){!al.isLoading()&&!al.isLoaded()&&Yo()==="deferred"&&cl()},gn=function(C,H){this.zoom=C,H?(this.now=H.now,this.fadeDuration=H.fadeDuration,this.zoomHistory=H.zoomHistory,this.transition=H.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new ar,this.transition={})};gn.prototype.isSupportedScript=function(C){return ni(C,al.isLoaded())},gn.prototype.crossFadingFactor=function(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},gn.prototype.getCrossfadeParameters=function(){var C=this.zoom,H=C-Math.floor(C),ne=this.crossFadingFactor();return C>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:H+(1-H)*ne}:{fromScale:.5,toScale:1,t:1-(1-ne)*H}};var vo=function(C,H){this.property=C,this.value=H,this.expression=I(H===void 0?C.specification.default:H,C.specification)};vo.prototype.isDataDriven=function(){return this.expression.kind==="source"||this.expression.kind==="composite"},vo.prototype.possiblyEvaluate=function(C,H,ne){return this.property.possiblyEvaluate(this,C,H,ne)};var cs=function(C){this.property=C,this.value=new vo(C,void 0)};cs.prototype.transitioned=function(C,H){return new Al(this.property,this.value,H,g({},C.transition,this.transition),C.now)},cs.prototype.untransitioned=function(){return new Al(this.property,this.value,null,{},0)};var 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,H){this._values.hasOwnProperty(C)||(this._values[C]=new cs(this._values[C].property)),this._values[C].value=new vo(this._values[C].property,H===null?void 0:O(H))},ms.prototype.getTransition=function(C){return O(this._values[C].transition)},ms.prototype.setTransition=function(C,H){this._values.hasOwnProperty(C)||(this._values[C]=new cs(this._values[C].property)),this._values[C].transition=O(H)||void 0},ms.prototype.serialize=function(){for(var C={},H=0,ne=Object.keys(this._values);Hthis.end)return this.prior=null,Re;if(this.value.isDataDriven())return this.prior=null,Re;if(xeqe.zoomHistory.lastIntegerZoom?{from:ne,to:xe}:{from:Re,to:xe}},C.prototype.interpolate=function(ne){return ne},C}(Zt),oa=function(C){this.specification=C};oa.prototype.possiblyEvaluate=function(C,H,ne,xe){if(C.value!==void 0)if(C.expression.kind==="constant"){var Re=C.expression.evaluate(H,null,{},ne,xe);return this._calculate(Re,Re,Re,H)}else return this._calculate(C.expression.evaluate(new gn(Math.floor(H.zoom-1),H)),C.expression.evaluate(new gn(Math.floor(H.zoom),H)),C.expression.evaluate(new gn(Math.floor(H.zoom+1),H)),H)},oa.prototype._calculate=function(C,H,ne,xe){var Re=xe.zoom;return Re>xe.zoomHistory.lastIntegerZoom?{from:C,to:H}:{from:ne,to:H}},oa.prototype.interpolate=function(C){return C};var wa=function(C){this.specification=C};wa.prototype.possiblyEvaluate=function(C,H,ne,xe){return!!C.expression.evaluate(H,null,{},ne,xe)},wa.prototype.interpolate=function(){return!1};var ma=function(C){this.properties=C,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(var H in C){var ne=C[H];ne.specification.overridable&&this.overridableProperties.push(H);var xe=this.defaultPropertyValues[H]=new vo(ne,void 0),Re=this.defaultTransitionablePropertyValues[H]=new cs(ne);this.defaultTransitioningPropertyValues[H]=Re.untransitioned(),this.defaultPossiblyEvaluatedValues[H]=xe.possiblyEvaluate({})}};de("DataDrivenProperty",Zt),de("DataConstantProperty",it),de("CrossFadedDataDrivenProperty",fr),de("CrossFadedProperty",oa),de("ColorRampProperty",wa);var _a="-transition",Ya=function(k){function C(H,ne){if(k.call(this),this.id=H.id,this.type=H.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},H.type!=="custom"&&(H=H,this.metadata=H.metadata,this.minzoom=H.minzoom,this.maxzoom=H.maxzoom,H.type!=="background"&&(this.source=H.source,this.sourceLayer=H["source-layer"],this.filter=H.filter),ne.layout&&(this._unevaluatedLayout=new Su(ne.layout)),ne.paint)){this._transitionablePaint=new ms(ne.paint);for(var xe in H.paint)this.setPaintProperty(xe,H.paint[xe],{validate:!1});for(var Re in H.layout)this.setLayoutProperty(Re,H.layout[Re],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new _c(ne.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(ne){return ne==="visibility"?this.visibility:this._unevaluatedLayout.getValue(ne)},C.prototype.setLayoutProperty=function(ne,xe,Re){if(Re===void 0&&(Re={}),xe!=null){var qe="layers."+this.id+".layout."+ne;if(this._validate(eu,qe,ne,xe,Re))return}if(ne==="visibility"){this.visibility=xe;return}this._unevaluatedLayout.setValue(ne,xe)},C.prototype.getPaintProperty=function(ne){return z(ne,_a)?this._transitionablePaint.getTransition(ne.slice(0,-_a.length)):this._transitionablePaint.getValue(ne)},C.prototype.setPaintProperty=function(ne,xe,Re){if(Re===void 0&&(Re={}),xe!=null){var qe="layers."+this.id+".paint."+ne;if(this._validate(Il,qe,ne,xe,Re))return!1}if(z(ne,_a))return this._transitionablePaint.setTransition(ne.slice(0,-_a.length),xe||void 0),!1;var pt=this._transitionablePaint._values[ne],Dt=pt.property.specification["property-type"]==="cross-faded-data-driven",Gt=pt.value.isDataDriven(),tr=pt.value;this._transitionablePaint.setValue(ne,xe),this._handleSpecialPaintPropertyUpdate(ne);var Pr=this._transitionablePaint._values[ne].value,Zr=Pr.isDataDriven();return Zr||Gt||Dt||this._handleOverridablePaintPropertyUpdate(ne,tr,Pr)},C.prototype._handleSpecialPaintPropertyUpdate=function(ne){},C.prototype._handleOverridablePaintPropertyUpdate=function(ne,xe,Re){return!1},C.prototype.isHidden=function(ne){return this.minzoom&&ne=this.maxzoom?!0:this.visibility==="none"},C.prototype.updateTransitions=function(ne){this._transitioningPaint=this._transitionablePaint.transitioned(ne,this._transitioningPaint)},C.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},C.prototype.recalculate=function(ne,xe){ne.getCrossfadeParameters&&(this._crossfadeParameters=ne.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(ne,void 0,xe)),this.paint=this._transitioningPaint.possiblyEvaluate(ne,void 0,xe)},C.prototype.serialize=function(){var ne={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&&(ne.layout=ne.layout||{},ne.layout.visibility=this.visibility),N(ne,function(xe,Re){return xe!==void 0&&!(Re==="layout"&&!Object.keys(xe).length)&&!(Re==="paint"&&!Object.keys(xe).length)})},C.prototype._validate=function(ne,xe,Re,qe,pt){return pt===void 0&&(pt={}),pt&&pt.validate===!1?!1:Ru(this,ne.call(Jo,{key:xe,layerType:this.type,objectKey:Re,value:qe,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 ne in this.paint._values){var xe=this.paint.get(ne);if(!(!(xe instanceof Rl)||!_l(xe.property.specification))&&(xe.value.kind==="source"||xe.value.kind==="composite")&&xe.value.isStateDependent)return!0}return!1},C}(xr),bi={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},yi=function(C,H){this._structArray=C,this._pos1=H*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},si=128,yn=5,zi=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};zi.serialize=function(C,H){return C._trim(),H&&(C.isTransferred=!0,H.push(C.arrayBuffer)),{length:C.length,arrayBuffer:C.arrayBuffer}},zi.deserialize=function(C){var H=Object.create(this.prototype);return H.arrayBuffer=C.arrayBuffer,H.length=C.length,H.capacity=C.arrayBuffer.byteLength/H.bytesPerElement,H._refreshViews(),H},zi.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},zi.prototype.clear=function(){this.length=0},zi.prototype.resize=function(C){this.reserve(C),this.length=C},zi.prototype.reserve=function(C){if(C>this.capacity){this.capacity=Math.max(C,Math.floor(this.capacity*yn),si),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var H=this.uint8;this._refreshViews(),H&&this.uint8.set(H)}},zi.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};function Ei(k,C){C===void 0&&(C=1);var H=0,ne=0,xe=k.map(function(qe){var pt=Na(qe.type),Dt=H=ea(H,Math.max(C,pt)),Gt=qe.components||1;return ne=Math.max(ne,pt),H+=pt*Gt,{name:qe.name,type:qe.type,components:Gt,offset:Dt}}),Re=ea(H,Math.max(ne,C));return{members:xe,size:Re,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(ne,xe){var Re=this.length;return this.resize(Re+1),this.emplace(Re,ne,xe)},C.prototype.emplace=function(ne,xe,Re){var qe=ne*2;return this.int16[qe+0]=xe,this.int16[qe+1]=Re,ne},C}(zi);Ma.prototype.bytesPerElement=4,de("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(ne,xe,Re,qe){var pt=this.length;return this.resize(pt+1),this.emplace(pt,ne,xe,Re,qe)},C.prototype.emplace=function(ne,xe,Re,qe,pt){var Dt=ne*4;return this.int16[Dt+0]=xe,this.int16[Dt+1]=Re,this.int16[Dt+2]=qe,this.int16[Dt+3]=pt,ne},C}(zi);Qa.prototype.bytesPerElement=8,de("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(ne,xe,Re,qe,pt,Dt){var Gt=this.length;return this.resize(Gt+1),this.emplace(Gt,ne,xe,Re,qe,pt,Dt)},C.prototype.emplace=function(ne,xe,Re,qe,pt,Dt,Gt){var tr=ne*6;return this.int16[tr+0]=xe,this.int16[tr+1]=Re,this.int16[tr+2]=qe,this.int16[tr+3]=pt,this.int16[tr+4]=Dt,this.int16[tr+5]=Gt,ne},C}(zi);di.prototype.bytesPerElement=12,de("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(ne,xe,Re,qe,pt,Dt){var Gt=this.length;return this.resize(Gt+1),this.emplace(Gt,ne,xe,Re,qe,pt,Dt)},C.prototype.emplace=function(ne,xe,Re,qe,pt,Dt,Gt){var tr=ne*4,Pr=ne*8;return this.int16[tr+0]=xe,this.int16[tr+1]=Re,this.uint8[Pr+4]=qe,this.uint8[Pr+5]=pt,this.uint8[Pr+6]=Dt,this.uint8[Pr+7]=Gt,ne},C}(zi);Va.prototype.bytesPerElement=8,de("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(ne,xe){var Re=this.length;return this.resize(Re+1),this.emplace(Re,ne,xe)},C.prototype.emplace=function(ne,xe,Re){var qe=ne*2;return this.float32[qe+0]=xe,this.float32[qe+1]=Re,ne},C}(zi);Bi.prototype.bytesPerElement=8,de("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(ne,xe,Re,qe,pt,Dt,Gt,tr,Pr,Zr){var Vr=this.length;return this.resize(Vr+1),this.emplace(Vr,ne,xe,Re,qe,pt,Dt,Gt,tr,Pr,Zr)},C.prototype.emplace=function(ne,xe,Re,qe,pt,Dt,Gt,tr,Pr,Zr,Vr){var ua=ne*10;return this.uint16[ua+0]=xe,this.uint16[ua+1]=Re,this.uint16[ua+2]=qe,this.uint16[ua+3]=pt,this.uint16[ua+4]=Dt,this.uint16[ua+5]=Gt,this.uint16[ua+6]=tr,this.uint16[ua+7]=Pr,this.uint16[ua+8]=Zr,this.uint16[ua+9]=Vr,ne},C}(zi);Li.prototype.bytesPerElement=20,de("StructArrayLayout10ui20",Li);var pn=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(ne,xe,Re,qe,pt,Dt,Gt,tr,Pr,Zr,Vr,ua){var Oa=this.length;return this.resize(Oa+1),this.emplace(Oa,ne,xe,Re,qe,pt,Dt,Gt,tr,Pr,Zr,Vr,ua)},C.prototype.emplace=function(ne,xe,Re,qe,pt,Dt,Gt,tr,Pr,Zr,Vr,ua,Oa){var Mi=ne*12;return this.int16[Mi+0]=xe,this.int16[Mi+1]=Re,this.int16[Mi+2]=qe,this.int16[Mi+3]=pt,this.uint16[Mi+4]=Dt,this.uint16[Mi+5]=Gt,this.uint16[Mi+6]=tr,this.uint16[Mi+7]=Pr,this.int16[Mi+8]=Zr,this.int16[Mi+9]=Vr,this.int16[Mi+10]=ua,this.int16[Mi+11]=Oa,ne},C}(zi);pn.prototype.bytesPerElement=24,de("StructArrayLayout4i4ui4i24",pn);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(ne,xe,Re){var qe=this.length;return this.resize(qe+1),this.emplace(qe,ne,xe,Re)},C.prototype.emplace=function(ne,xe,Re,qe){var pt=ne*3;return this.float32[pt+0]=xe,this.float32[pt+1]=Re,this.float32[pt+2]=qe,ne},C}(zi);Ha.prototype.bytesPerElement=12,de("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(ne){var xe=this.length;return this.resize(xe+1),this.emplace(xe,ne)},C.prototype.emplace=function(ne,xe){var Re=ne*1;return this.uint32[Re+0]=xe,ne},C}(zi);Ua.prototype.bytesPerElement=4,de("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(ne,xe,Re,qe,pt,Dt,Gt,tr,Pr){var Zr=this.length;return this.resize(Zr+1),this.emplace(Zr,ne,xe,Re,qe,pt,Dt,Gt,tr,Pr)},C.prototype.emplace=function(ne,xe,Re,qe,pt,Dt,Gt,tr,Pr,Zr){var Vr=ne*10,ua=ne*5;return this.int16[Vr+0]=xe,this.int16[Vr+1]=Re,this.int16[Vr+2]=qe,this.int16[Vr+3]=pt,this.int16[Vr+4]=Dt,this.int16[Vr+5]=Gt,this.uint32[ua+3]=tr,this.uint16[Vr+8]=Pr,this.uint16[Vr+9]=Zr,ne},C}(zi);Yi.prototype.bytesPerElement=20,de("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(ne,xe,Re,qe,pt,Dt){var Gt=this.length;return this.resize(Gt+1),this.emplace(Gt,ne,xe,Re,qe,pt,Dt)},C.prototype.emplace=function(ne,xe,Re,qe,pt,Dt,Gt){var tr=ne*6;return this.int16[tr+0]=xe,this.int16[tr+1]=Re,this.int16[tr+2]=qe,this.int16[tr+3]=pt,this.int16[tr+4]=Dt,this.int16[tr+5]=Gt,ne},C}(zi);Ri.prototype.bytesPerElement=12,de("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(ne,xe,Re,qe,pt){var Dt=this.length;return this.resize(Dt+1),this.emplace(Dt,ne,xe,Re,qe,pt)},C.prototype.emplace=function(ne,xe,Re,qe,pt,Dt){var Gt=ne*4,tr=ne*8;return this.float32[Gt+0]=xe,this.float32[Gt+1]=Re,this.float32[Gt+2]=qe,this.int16[tr+6]=pt,this.int16[tr+7]=Dt,ne},C}(zi);Ti.prototype.bytesPerElement=16,de("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(ne,xe,Re,qe){var pt=this.length;return this.resize(pt+1),this.emplace(pt,ne,xe,Re,qe)},C.prototype.emplace=function(ne,xe,Re,qe,pt){var Dt=ne*12,Gt=ne*3;return this.uint8[Dt+0]=xe,this.uint8[Dt+1]=Re,this.float32[Gt+1]=qe,this.float32[Gt+2]=pt,ne},C}(zi);xi.prototype.bytesPerElement=12,de("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(ne,xe,Re){var qe=this.length;return this.resize(qe+1),this.emplace(qe,ne,xe,Re)},C.prototype.emplace=function(ne,xe,Re,qe){var pt=ne*3;return this.uint16[pt+0]=xe,this.uint16[pt+1]=Re,this.uint16[pt+2]=qe,ne},C}(zi);Xi.prototype.bytesPerElement=6,de("StructArrayLayout3ui6",Xi);var mn=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(ne,xe,Re,qe,pt,Dt,Gt,tr,Pr,Zr,Vr,ua,Oa,Mi,ii,$i,Oi){var Ji=this.length;return this.resize(Ji+1),this.emplace(Ji,ne,xe,Re,qe,pt,Dt,Gt,tr,Pr,Zr,Vr,ua,Oa,Mi,ii,$i,Oi)},C.prototype.emplace=function(ne,xe,Re,qe,pt,Dt,Gt,tr,Pr,Zr,Vr,ua,Oa,Mi,ii,$i,Oi,Ji){var ln=ne*24,Tn=ne*12,Vn=ne*48;return this.int16[ln+0]=xe,this.int16[ln+1]=Re,this.uint16[ln+2]=qe,this.uint16[ln+3]=pt,this.uint32[Tn+2]=Dt,this.uint32[Tn+3]=Gt,this.uint32[Tn+4]=tr,this.uint16[ln+10]=Pr,this.uint16[ln+11]=Zr,this.uint16[ln+12]=Vr,this.float32[Tn+7]=ua,this.float32[Tn+8]=Oa,this.uint8[Vn+36]=Mi,this.uint8[Vn+37]=ii,this.uint8[Vn+38]=$i,this.uint32[Tn+10]=Oi,this.int16[ln+22]=Ji,ne},C}(zi);mn.prototype.bytesPerElement=48,de("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",mn);var In=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(ne,xe,Re,qe,pt,Dt,Gt,tr,Pr,Zr,Vr,ua,Oa,Mi,ii,$i,Oi,Ji,ln,Tn,Vn,Nn,So,oo,go,ks,Mo,Po){var $s=this.length;return this.resize($s+1),this.emplace($s,ne,xe,Re,qe,pt,Dt,Gt,tr,Pr,Zr,Vr,ua,Oa,Mi,ii,$i,Oi,Ji,ln,Tn,Vn,Nn,So,oo,go,ks,Mo,Po)},C.prototype.emplace=function(ne,xe,Re,qe,pt,Dt,Gt,tr,Pr,Zr,Vr,ua,Oa,Mi,ii,$i,Oi,Ji,ln,Tn,Vn,Nn,So,oo,go,ks,Mo,Po,$s){var ws=ne*34,Xl=ne*17;return this.int16[ws+0]=xe,this.int16[ws+1]=Re,this.int16[ws+2]=qe,this.int16[ws+3]=pt,this.int16[ws+4]=Dt,this.int16[ws+5]=Gt,this.int16[ws+6]=tr,this.int16[ws+7]=Pr,this.uint16[ws+8]=Zr,this.uint16[ws+9]=Vr,this.uint16[ws+10]=ua,this.uint16[ws+11]=Oa,this.uint16[ws+12]=Mi,this.uint16[ws+13]=ii,this.uint16[ws+14]=$i,this.uint16[ws+15]=Oi,this.uint16[ws+16]=Ji,this.uint16[ws+17]=ln,this.uint16[ws+18]=Tn,this.uint16[ws+19]=Vn,this.uint16[ws+20]=Nn,this.uint16[ws+21]=So,this.uint16[ws+22]=oo,this.uint32[Xl+12]=go,this.float32[Xl+13]=ks,this.float32[Xl+14]=Mo,this.float32[Xl+15]=Po,this.float32[Xl+16]=$s,ne},C}(zi);In.prototype.bytesPerElement=68,de("StructArrayLayout8i15ui1ul4f68",In);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(ne){var xe=this.length;return this.resize(xe+1),this.emplace(xe,ne)},C.prototype.emplace=function(ne,xe){var Re=ne*1;return this.float32[Re+0]=xe,ne},C}(zi);Ii.prototype.bytesPerElement=4,de("StructArrayLayout1f4",Ii);var an=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(ne,xe,Re){var qe=this.length;return this.resize(qe+1),this.emplace(qe,ne,xe,Re)},C.prototype.emplace=function(ne,xe,Re,qe){var pt=ne*3;return this.int16[pt+0]=xe,this.int16[pt+1]=Re,this.int16[pt+2]=qe,ne},C}(zi);an.prototype.bytesPerElement=6,de("StructArrayLayout3i6",an);var kn=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(ne,xe,Re){var qe=this.length;return this.resize(qe+1),this.emplace(qe,ne,xe,Re)},C.prototype.emplace=function(ne,xe,Re,qe){var pt=ne*2,Dt=ne*4;return this.uint32[pt+0]=xe,this.uint16[Dt+2]=Re,this.uint16[Dt+3]=qe,ne},C}(zi);kn.prototype.bytesPerElement=8,de("StructArrayLayout1ul2ui8",kn);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(ne,xe){var Re=this.length;return this.resize(Re+1),this.emplace(Re,ne,xe)},C.prototype.emplace=function(ne,xe,Re){var qe=ne*2;return this.uint16[qe+0]=xe,this.uint16[qe+1]=Re,ne},C}(zi);Dn.prototype.bytesPerElement=4,de("StructArrayLayout2ui4",Dn);var Zn=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(ne){var xe=this.length;return this.resize(xe+1),this.emplace(xe,ne)},C.prototype.emplace=function(ne,xe){var Re=ne*1;return this.uint16[Re+0]=xe,ne},C}(zi);Zn.prototype.bytesPerElement=2,de("StructArrayLayout1ui2",Zn);var Ds=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(ne,xe,Re,qe){var pt=this.length;return this.resize(pt+1),this.emplace(pt,ne,xe,Re,qe)},C.prototype.emplace=function(ne,xe,Re,qe,pt){var Dt=ne*4;return this.float32[Dt+0]=xe,this.float32[Dt+1]=Re,this.float32[Dt+2]=qe,this.float32[Dt+3]=pt,ne},C}(zi);Ds.prototype.bytesPerElement=16,de("StructArrayLayout4f16",Ds);var bl=function(k){function C(){k.apply(this,arguments)}k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C;var H={anchorPointX:{configurable:!0},anchorPointY:{configurable:!0},x1:{configurable:!0},y1:{configurable:!0},x2:{configurable:!0},y2:{configurable:!0},featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0},anchorPoint:{configurable:!0}};return H.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},H.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},H.x1.get=function(){return this._structArray.int16[this._pos2+2]},H.y1.get=function(){return this._structArray.int16[this._pos2+3]},H.x2.get=function(){return this._structArray.int16[this._pos2+4]},H.y2.get=function(){return this._structArray.int16[this._pos2+5]},H.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},H.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},H.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},H.anchorPoint.get=function(){return new n(this.anchorPointX,this.anchorPointY)},Object.defineProperties(C.prototype,H),C}(yi);bl.prototype.size=20;var po=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(ne){return new bl(this,ne)},C}(Yi);de("CollisionBoxArray",po);var Wl=function(k){function C(){k.apply(this,arguments)}k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C;var H={anchorX:{configurable:!0},anchorY:{configurable:!0},glyphStartIndex:{configurable:!0},numGlyphs:{configurable:!0},vertexStartIndex:{configurable:!0},lineStartIndex:{configurable:!0},lineLength:{configurable:!0},segment:{configurable:!0},lowerSize:{configurable:!0},upperSize:{configurable:!0},lineOffsetX:{configurable:!0},lineOffsetY:{configurable:!0},writingMode:{configurable:!0},placedOrientation:{configurable:!0},hidden:{configurable:!0},crossTileID:{configurable:!0},associatedIconIndex:{configurable:!0}};return H.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},H.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},H.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},H.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},H.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},H.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},H.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},H.segment.get=function(){return this._structArray.uint16[this._pos2+10]},H.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},H.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},H.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},H.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},H.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},H.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},H.placedOrientation.set=function(ne){this._structArray.uint8[this._pos1+37]=ne},H.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},H.hidden.set=function(ne){this._structArray.uint8[this._pos1+38]=ne},H.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},H.crossTileID.set=function(ne){this._structArray.uint32[this._pos4+10]=ne},H.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(C.prototype,H),C}(yi);Wl.prototype.size=48;var fs=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype.get=function(ne){return new Wl(this,ne)},C}(mn);de("PlacedSymbolArray",fs);var Sl=function(k){function C(){k.apply(this,arguments)}k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C;var H={anchorX:{configurable:!0},anchorY:{configurable:!0},rightJustifiedTextSymbolIndex:{configurable:!0},centerJustifiedTextSymbolIndex:{configurable:!0},leftJustifiedTextSymbolIndex:{configurable:!0},verticalPlacedTextSymbolIndex:{configurable:!0},placedIconSymbolIndex:{configurable:!0},verticalPlacedIconSymbolIndex:{configurable:!0},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},verticalTextBoxStartIndex:{configurable:!0},verticalTextBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},verticalIconBoxStartIndex:{configurable:!0},verticalIconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numHorizontalGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},numVerticalIconVertices:{configurable:!0},useRuntimeCollisionCircles:{configurable:!0},crossTileID:{configurable:!0},textBoxScale:{configurable:!0},textOffset0:{configurable:!0},textOffset1:{configurable:!0},collisionCircleDiameter:{configurable:!0}};return H.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},H.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},H.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},H.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},H.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},H.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},H.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},H.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},H.key.get=function(){return this._structArray.uint16[this._pos2+8]},H.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},H.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},H.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},H.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},H.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},H.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},H.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},H.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},H.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},H.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},H.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},H.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},H.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},H.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},H.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},H.crossTileID.set=function(ne){this._structArray.uint32[this._pos4+12]=ne},H.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},H.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},H.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},H.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(C.prototype,H),C}(yi);Sl.prototype.size=68;var kl=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype.get=function(ne){return new Sl(this,ne)},C}(In);de("SymbolInstanceArray",kl);var tu=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype.getoffsetX=function(ne){return this.float32[ne*1+0]},C}(Ii);de("GlyphOffsetArray",tu);var qs=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(ne){return this.int16[ne*3+0]},C.prototype.gety=function(ne){return this.int16[ne*3+1]},C.prototype.gettileUnitDistanceFromAnchor=function(ne){return this.int16[ne*3+2]},C}(an);de("SymbolLineVertexArray",qs);var pl=function(k){function C(){k.apply(this,arguments)}k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C;var H={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return H.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},H.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},H.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(C.prototype,H),C}(yi);pl.prototype.size=8;var wl=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype.get=function(ne){return new pl(this,ne)},C}(kn);de("FeatureIndexArray",wl);var Yn=Ei([{name:"a_pos",components:2,type:"Int16"}],4),Cl=Yn.members,Co=function(C){C===void 0&&(C=[]),this.segments=C};Co.prototype.prepareSegment=function(C,H,ne,xe){var Re=this.segments[this.segments.length-1];return C>Co.MAX_VERTEX_ARRAY_LENGTH&&B("Max vertices per segment is "+Co.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+C),(!Re||Re.vertexLength+C>Co.MAX_VERTEX_ARRAY_LENGTH||Re.sortKey!==xe)&&(Re={vertexOffset:H.length,primitiveOffset:ne.length,vertexLength:0,primitiveLength:0},xe!==void 0&&(Re.sortKey=xe),this.segments.push(Re)),Re},Co.prototype.get=function(){return this.segments},Co.prototype.destroy=function(){for(var C=0,H=this.segments;C>>16)*Dt&65535)<<16)&4294967295,tr=tr<<15|tr>>>17,tr=(tr&65535)*Gt+(((tr>>>16)*Gt&65535)<<16)&4294967295,qe^=tr,qe=qe<<13|qe>>>19,pt=(qe&65535)*5+(((qe>>>16)*5&65535)<<16)&4294967295,qe=(pt&65535)+27492+(((pt>>>16)+58964&65535)<<16);switch(tr=0,xe){case 3:tr^=(H.charCodeAt(Pr+2)&255)<<16;case 2:tr^=(H.charCodeAt(Pr+1)&255)<<8;case 1:tr^=H.charCodeAt(Pr)&255,tr=(tr&65535)*Dt+(((tr>>>16)*Dt&65535)<<16)&4294967295,tr=tr<<15|tr>>>17,tr=(tr&65535)*Gt+(((tr>>>16)*Gt&65535)<<16)&4294967295,qe^=tr}return qe^=H.length,qe^=qe>>>16,qe=(qe&65535)*2246822507+(((qe>>>16)*2246822507&65535)<<16)&4294967295,qe^=qe>>>13,qe=(qe&65535)*3266489909+(((qe>>>16)*3266489909&65535)<<16)&4294967295,qe^=qe>>>16,qe>>>0}k.exports=C}),te=t(function(k){function C(H,ne){for(var xe=H.length,Re=ne^xe,qe=0,pt;xe>=4;)pt=H.charCodeAt(qe)&255|(H.charCodeAt(++qe)&255)<<8|(H.charCodeAt(++qe)&255)<<16|(H.charCodeAt(++qe)&255)<<24,pt=(pt&65535)*1540483477+(((pt>>>16)*1540483477&65535)<<16),pt^=pt>>>24,pt=(pt&65535)*1540483477+(((pt>>>16)*1540483477&65535)<<16),Re=(Re&65535)*1540483477+(((Re>>>16)*1540483477&65535)<<16)^pt,xe-=4,++qe;switch(xe){case 3:Re^=(H.charCodeAt(qe+2)&255)<<16;case 2:Re^=(H.charCodeAt(qe+1)&255)<<8;case 1:Re^=H.charCodeAt(qe)&255,Re=(Re&65535)*1540483477+(((Re>>>16)*1540483477&65535)<<16)}return Re^=Re>>>13,Re=(Re&65535)*1540483477+(((Re>>>16)*1540483477&65535)<<16),Re^=Re>>>15,Re>>>0}k.exports=C}),me=_e,Ge=_e,Le=te;me.murmur3=Ge,me.murmur2=Le;var $e=function(){this.ids=[],this.positions=[],this.indexed=!1};$e.prototype.add=function(C,H,ne,xe){this.ids.push(jt(C)),this.positions.push(H,ne,xe)},$e.prototype.getPositions=function(C){for(var H=jt(C),ne=0,xe=this.ids.length-1;ne>1;this.ids[Re]>=H?xe=Re:ne=Re+1}for(var qe=[];this.ids[ne]===H;){var pt=this.positions[3*ne],Dt=this.positions[3*ne+1],Gt=this.positions[3*ne+2];qe.push({index:pt,start:Dt,end:Gt}),ne++}return qe},$e.serialize=function(C,H){var ne=new Float64Array(C.ids),xe=new Uint32Array(C.positions);return wr(ne,xe,0,ne.length-1),H&&H.push(ne.buffer,xe.buffer),{ids:ne,positions:xe}},$e.deserialize=function(C){var H=new $e;return H.ids=C.ids,H.positions=C.positions,H.indexed=!0,H};var gt=Math.pow(2,53)-1;function jt(k){var C=+k;return!isNaN(C)&&C<=gt?C:me(String(k))}function wr(k,C,H,ne){for(;H>1],Re=H-1,qe=ne+1;;){do Re++;while(k[Re]xe);if(Re>=qe)break;Nr(k,Re,qe),Nr(C,3*Re,3*qe),Nr(C,3*Re+1,3*qe+1),Nr(C,3*Re+2,3*qe+2)}qe-Hqe.x+1||Dtqe.y+1)&&B("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return H}function _o(k,C){return{type:k.type,id:k.id,properties:k.properties,geometry:C?fn(k):[]}}function Bo(k,C,H,ne,xe){k.emplaceBack(C*2+(ne+1)/2,H*2+(xe+1)/2)}var Ps=function(C){this.zoom=C.zoom,this.overscaling=C.overscaling,this.layers=C.layers,this.layerIds=this.layers.map(function(H){return H.id}),this.index=C.index,this.hasPattern=!1,this.layoutVertexArray=new Ma,this.indexArray=new Xi,this.segments=new Co,this.programConfigurations=new Ga(C.layers,C.zoom),this.stateDependentLayerIds=this.layers.filter(function(H){return H.isStateDependent()}).map(function(H){return H.id})};Ps.prototype.populate=function(C,H,ne){var xe=this.layers[0],Re=[],qe=null;xe.type==="circle"&&(qe=xe.layout.get("circle-sort-key"));for(var pt=0,Dt=C;pt=ui||Zr<0||Zr>=ui)){var Vr=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,C.sortKey),ua=Vr.vertexLength;Bo(this.layoutVertexArray,Pr,Zr,-1,-1),Bo(this.layoutVertexArray,Pr,Zr,1,-1),Bo(this.layoutVertexArray,Pr,Zr,1,1),Bo(this.layoutVertexArray,Pr,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,ne,{},xe)},de("CircleBucket",Ps,{omit:["layers"]});function Do(k,C){for(var H=0;H=3){for(var Re=0;Re1){if(kp(k,C))return!0;for(var ne=0;ne1?k.distSqr(H):k.distSqr(H.sub(C)._mult(xe)._add(C))}function ed(k,C){for(var H=!1,ne,xe,Re,qe=0;qeC.y!=Re.y>C.y&&C.x<(Re.x-xe.x)*(C.y-xe.y)/(Re.y-xe.y)+xe.x&&(H=!H)}return H}function Ih(k,C){for(var H=!1,ne=0,xe=k.length-1;neC.y!=qe.y>C.y&&C.x<(qe.x-Re.x)*(C.y-Re.y)/(qe.y-Re.y)+Re.x&&(H=!H)}return H}function td(k,C,H,ne,xe){for(var Re=0,qe=k;Re=pt.x&&xe>=pt.y)return!0}var Dt=[new n(C,H),new n(C,xe),new n(ne,xe),new n(ne,H)];if(k.length>2)for(var Gt=0,tr=Dt;Gtxe.x&&C.x>xe.x||k.yxe.y&&C.y>xe.y)return!1;var Re=X(k,C,H[0]);return Re!==X(k,C,H[1])||Re!==X(k,C,H[2])||Re!==X(k,C,H[3])}function Rh(k,C,H){var ne=C.paint.get(k).value;return ne.kind==="constant"?ne.value:H.programConfigurations.get(C.id).getMaxValue(k)}function Cp(k){return Math.sqrt(k[0]*k[0]+k[1]*k[1])}function Vp(k,C,H,ne,xe){if(!C[0]&&!C[1])return k;var Re=n.convert(C)._mult(xe);H==="viewport"&&Re._rotate(-ne);for(var qe=[],pt=0;pt0&&(Re=1/Math.sqrt(Re)),k[0]=C[0]*Re,k[1]=C[1]*Re,k[2]=C[2]*Re,k}function UT(k,C){return k[0]*C[0]+k[1]*C[1]+k[2]*C[2]}function jT(k,C,H){var ne=C[0],xe=C[1],Re=C[2],qe=H[0],pt=H[1],Dt=H[2];return k[0]=xe*Dt-Re*pt,k[1]=Re*qe-ne*Dt,k[2]=ne*pt-xe*qe,k}function qT(k,C,H){var ne=C[0],xe=C[1],Re=C[2];return k[0]=ne*H[0]+xe*H[3]+Re*H[6],k[1]=ne*H[1]+xe*H[4]+Re*H[7],k[2]=ne*H[2]+xe*H[5]+Re*H[8],k}var VT=lv,vk=function(){var k=sv();return function(C,H,ne,xe,Re,qe){var pt,Dt;for(H||(H=3),ne||(ne=0),xe?Dt=Math.min(xe*H+ne,C.length):Dt=C.length,pt=ne;ptk.width||xe.height>k.height||H.x>k.width-xe.width||H.y>k.height-xe.height)throw new RangeError("out of range source coordinates for image copy");if(xe.width>C.width||xe.height>C.height||ne.x>C.width-xe.width||ne.y>C.height-xe.height)throw new RangeError("out of range destination coordinates for image copy");for(var qe=k.data,pt=C.data,Dt=0;Dt80*H){pt=Gt=k[0],Dt=tr=k[1];for(var ua=H;uaGt&&(Gt=Pr),Zr>tr&&(tr=Zr);Vr=Math.max(Gt-pt,tr-Dt),Vr=Vr!==0?1/Vr:0}return E0(Re,qe,H,pt,Dt,Vr),qe}function Mg(k,C,H,ne,xe){var Re,qe;if(xe===U1(k,C,H,ne)>0)for(Re=C;Re=C;Re-=ne)qe=Ux(Re,k[Re],k[Re+1],qe);return qe&&C0(qe,qe.next)&&(I0(qe),qe=qe.next),qe}function uv(k,C){if(!k)return k;C||(C=k);var H=k,ne;do if(ne=!1,!H.steiner&&(C0(H,H.next)||cf(H.prev,H,H.next)===0)){if(I0(H),H=C=H.prev,H===H.next)break;ne=!0}else H=H.next;while(ne||H!==C);return C}function E0(k,C,H,ne,xe,Re,qe){if(k){!qe&&Re&&Eg(k,ne,xe,Re);for(var pt=k,Dt,Gt;k.prev!==k.next;){if(Dt=k.prev,Gt=k.next,Re?Ox(k,ne,xe,Re):Fx(k)){C.push(Dt.i/H),C.push(k.i/H),C.push(Gt.i/H),I0(k),k=Gt.next,pt=Gt.next;continue}if(k=Gt,k===pt){qe?qe===1?(k=k0(uv(k),C,H),E0(k,C,H,ne,xe,Re,2)):qe===2&&yd(k,C,H,ne,xe,Re):E0(uv(k),C,H,ne,xe,Re,1);break}}}}function Fx(k){var C=k.prev,H=k,ne=k.next;if(cf(C,H,ne)>=0)return!1;for(var xe=k.next.next;xe!==k.prev;){if(fv(C.x,C.y,H.x,H.y,ne.x,ne.y,xe.x,xe.y)&&cf(xe.prev,xe,xe.next)>=0)return!1;xe=xe.next}return!0}function Ox(k,C,H,ne){var xe=k.prev,Re=k,qe=k.next;if(cf(xe,Re,qe)>=0)return!1;for(var pt=xe.xRe.x?xe.x>qe.x?xe.x:qe.x:Re.x>qe.x?Re.x:qe.x,tr=xe.y>Re.y?xe.y>qe.y?xe.y:qe.y:Re.y>qe.y?Re.y:qe.y,Pr=F1(pt,Dt,C,H,ne),Zr=F1(Gt,tr,C,H,ne),Vr=k.prevZ,ua=k.nextZ;Vr&&Vr.z>=Pr&&ua&&ua.z<=Zr;){if(Vr!==k.prev&&Vr!==k.next&&fv(xe.x,xe.y,Re.x,Re.y,qe.x,qe.y,Vr.x,Vr.y)&&cf(Vr.prev,Vr,Vr.next)>=0||(Vr=Vr.prevZ,ua!==k.prev&&ua!==k.next&&fv(xe.x,xe.y,Re.x,Re.y,qe.x,qe.y,ua.x,ua.y)&&cf(ua.prev,ua,ua.next)>=0))return!1;ua=ua.nextZ}for(;Vr&&Vr.z>=Pr;){if(Vr!==k.prev&&Vr!==k.next&&fv(xe.x,xe.y,Re.x,Re.y,qe.x,qe.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(xe.x,xe.y,Re.x,Re.y,qe.x,qe.y,ua.x,ua.y)&&cf(ua.prev,ua,ua.next)>=0)return!1;ua=ua.nextZ}return!0}function k0(k,C,H){var ne=k;do{var xe=ne.prev,Re=ne.next.next;!C0(xe,Re)&&kg(xe,ne,ne.next,Re)&&P0(xe,Re)&&P0(Re,xe)&&(C.push(xe.i/H),C.push(ne.i/H),C.push(Re.i/H),I0(ne),I0(ne.next),ne=k=Re),ne=ne.next}while(ne!==k);return uv(ne)}function yd(k,C,H,ne,xe,Re){var qe=k;do{for(var pt=qe.next.next;pt!==qe.prev;){if(qe.i!==pt.i&&cm(qe,pt)){var Dt=B1(qe,pt);qe=uv(qe,qe.next),Dt=uv(Dt,Dt.next),E0(qe,C,H,ne,xe,Re),E0(Dt,C,H,ne,xe,Re);return}pt=pt.next}qe=qe.next}while(qe!==k)}function cv(k,C,H,ne){var xe=[],Re,qe,pt,Dt,Gt;for(Re=0,qe=C.length;Re=H.next.y&&H.next.y!==H.y){var pt=H.x+(xe-H.y)*(H.next.x-H.x)/(H.next.y-H.y);if(pt<=ne&&pt>Re){if(Re=pt,pt===ne){if(xe===H.y)return H;if(xe===H.next.y)return H.next}qe=H.x=H.x&&H.x>=Gt&&ne!==H.x&&fv(xeqe.x||H.x===qe.x&&$T(qe,H)))&&(qe=H,Pr=Zr)),H=H.next;while(H!==Dt);return qe}function $T(k,C){return cf(k.prev,k,C.prev)<0&&cf(C.next,k,k.next)<0}function Eg(k,C,H,ne){var xe=k;do xe.z===null&&(xe.z=F1(xe.x,xe.y,C,H,ne)),xe.prevZ=xe.prev,xe.nextZ=xe.next,xe=xe.next;while(xe!==k);xe.prevZ.nextZ=null,xe.prevZ=null,z1(xe)}function z1(k){var C,H,ne,xe,Re,qe,pt,Dt,Gt=1;do{for(H=k,k=null,Re=null,qe=0;H;){for(qe++,ne=H,pt=0,C=0;C0||Dt>0&≠)pt!==0&&(Dt===0||!ne||H.z<=ne.z)?(xe=H,H=H.nextZ,pt--):(xe=ne,ne=ne.nextZ,Dt--),Re?Re.nextZ=xe:k=xe,xe.prevZ=Re,Re=xe;H=ne}Re.nextZ=null,Gt*=2}while(qe>1);return k}function F1(k,C,H,ne,xe){return k=32767*(k-H)*xe,C=32767*(C-ne)*xe,k=(k|k<<8)&16711935,k=(k|k<<4)&252645135,k=(k|k<<2)&858993459,k=(k|k<<1)&1431655765,C=(C|C<<8)&16711935,C=(C|C<<4)&252645135,C=(C|C<<2)&858993459,C=(C|C<<1)&1431655765,k|C<<1}function O1(k){var C=k,H=k;do(C.x=0&&(k-qe)*(ne-pt)-(H-qe)*(C-pt)>=0&&(H-qe)*(Re-pt)-(xe-qe)*(ne-pt)>=0}function cm(k,C){return k.next.i!==C.i&&k.prev.i!==C.i&&!Nx(k,C)&&(P0(k,C)&&P0(C,k)&&QT(k,C)&&(cf(k.prev,k,C.prev)||cf(k,C.prev,C))||C0(k,C)&&cf(k.prev,k,k.next)>0&&cf(C.prev,C,C.next)>0)}function cf(k,C,H){return(C.y-k.y)*(H.x-C.x)-(C.x-k.x)*(H.y-C.y)}function C0(k,C){return k.x===C.x&&k.y===C.y}function kg(k,C,H,ne){var xe=Dv(cf(k,C,H)),Re=Dv(cf(k,C,ne)),qe=Dv(cf(H,ne,k)),pt=Dv(cf(H,ne,C));return!!(xe!==Re&&qe!==pt||xe===0&&L0(k,H,C)||Re===0&&L0(k,ne,C)||qe===0&&L0(H,k,ne)||pt===0&&L0(H,C,ne))}function L0(k,C,H){return C.x<=Math.max(k.x,H.x)&&C.x>=Math.min(k.x,H.x)&&C.y<=Math.max(k.y,H.y)&&C.y>=Math.min(k.y,H.y)}function Dv(k){return k>0?1:k<0?-1:0}function Nx(k,C){var H=k;do{if(H.i!==k.i&&H.next.i!==k.i&&H.i!==C.i&&H.next.i!==C.i&&kg(H,H.next,k,C))return!0;H=H.next}while(H!==k);return!1}function P0(k,C){return cf(k.prev,k,k.next)<0?cf(k,C,k.next)>=0&&cf(k,k.prev,C)>=0:cf(k,C,k.prev)<0||cf(k,k.next,C)<0}function QT(k,C){var H=k,ne=!1,xe=(k.x+C.x)/2,Re=(k.y+C.y)/2;do H.y>Re!=H.next.y>Re&&H.next.y!==H.y&&xe<(H.next.x-H.x)*(Re-H.y)/(H.next.y-H.y)+H.x&&(ne=!ne),H=H.next;while(H!==k);return ne}function B1(k,C){var H=new N1(k.i,k.x,k.y),ne=new N1(C.i,C.x,C.y),xe=k.next,Re=C.prev;return k.next=C,C.prev=k,H.next=xe,xe.prev=H,ne.next=H,H.prev=ne,Re.next=ne,ne.prev=Re,ne}function Ux(k,C,H,ne){var xe=new N1(k,C,H);return ne?(xe.next=ne.next,xe.prev=ne,ne.next.prev=xe,ne.next=xe):(xe.prev=xe,xe.next=xe),xe}function I0(k){k.next.prev=k.prev,k.prev.next=k.next,k.prevZ&&(k.prevZ.nextZ=k.nextZ),k.nextZ&&(k.nextZ.prevZ=k.prevZ)}function N1(k,C,H){this.i=k,this.x=C,this.y=H,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}um.deviation=function(k,C,H,ne){var xe=C&&C.length,Re=xe?C[0]*H:k.length,qe=Math.abs(U1(k,0,Re,H));if(xe)for(var pt=0,Dt=C.length;pt0&&(ne+=k[xe-1].length,H.holes.push(ne))}return H},Sg.default=zx;function j1(k,C,H,ne,xe){Hd(k,C,H||0,ne||k.length-1,xe||jx)}function Hd(k,C,H,ne,xe){for(;ne>H;){if(ne-H>600){var Re=ne-H+1,qe=C-H+1,pt=Math.log(Re),Dt=.5*Math.exp(2*pt/3),Gt=.5*Math.sqrt(pt*Dt*(Re-Dt)/Re)*(qe-Re/2<0?-1:1),tr=Math.max(H,Math.floor(C-qe*Dt/Re+Gt)),Pr=Math.min(ne,Math.floor(C+(Re-qe)*Dt/Re+Gt));Hd(k,C,tr,Pr,xe)}var Zr=k[C],Vr=H,ua=ne;for(fm(k,H,C),xe(k[ne],Zr)>0&&fm(k,H,ne);Vr0;)ua--}xe(k[H],Zr)===0?fm(k,H,ua):(ua++,fm(k,ua,ne)),ua<=C&&(H=ua+1),C<=ua&&(ne=ua-1)}}function fm(k,C,H){var ne=k[C];k[C]=k[H],k[H]=ne}function jx(k,C){return kC?1:0}function Cg(k,C){var H=k.length;if(H<=1)return[k];for(var ne=[],xe,Re,qe=0;qe1)for(var Dt=0;Dt>3}if(ne--,H===1||H===2)xe+=k.readSVarint(),Re+=k.readSVarint(),H===1&&(pt&&qe.push(pt),pt=[]),pt.push(new n(xe,Re));else if(H===7)pt&&pt.push(pt[0].clone());else throw new Error("unknown command "+H)}return pt&&qe.push(pt),qe},zv.prototype.bbox=function(){var k=this._pbf;k.pos=this._geometry;for(var C=k.readVarint()+k.pos,H=1,ne=0,xe=0,Re=0,qe=1/0,pt=-1/0,Dt=1/0,Gt=-1/0;k.pos>3}if(ne--,H===1||H===2)xe+=k.readSVarint(),Re+=k.readSVarint(),xept&&(pt=xe),ReGt&&(Gt=Re);else if(H!==7)throw new Error("unknown command "+H)}return[qe,Dt,pt,Gt]},zv.prototype.toGeoJSON=function(k,C,H){var ne=this.extent*Math.pow(2,H),xe=this.extent*k,Re=this.extent*C,qe=this.loadGeometry(),pt=zv.types[this.type],Dt,Gt;function tr(Vr){for(var ua=0;ua>3;C=ne===1?k.readString():ne===2?k.readFloat():ne===3?k.readDouble():ne===4?k.readVarint64():ne===5?k.readVarint():ne===6?k.readSVarint():ne===7?k.readBoolean():null}return C}G1.prototype.feature=function(k){if(k<0||k>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[k];var C=this._pbf.readVarint()+this._pbf.pos;return new V1(this._pbf,C,this.extent,this._keys,this._values)};var Jx=tA;function tA(k,C){this.layers=k.readFields(rA,{},C)}function rA(k,C,H){if(k===3){var ne=new Wd(H,H.readVarint()+H.pos);ne.length&&(C[ne.name]=ne)}}var $x=Jx,hm=V1,Qx=Wd,Xd={VectorTile:$x,VectorTileFeature:hm,VectorTileLayer:Qx},eb=Xd.VectorTileFeature.types,Pg=500,pm=Math.pow(2,13);function hv(k,C,H,ne,xe,Re,qe,pt){k.emplaceBack(C,H,Math.floor(ne*pm)*2+qe,xe*pm*2,Re*pm*2,Math.round(pt))}var cd=function(C){this.zoom=C.zoom,this.overscaling=C.overscaling,this.layers=C.layers,this.layerIds=this.layers.map(function(H){return H.id}),this.index=C.index,this.hasPattern=!1,this.layoutVertexArray=new di,this.indexArray=new Xi,this.programConfigurations=new Ga(C.layers,C.zoom),this.segments=new Co,this.stateDependentLayerIds=this.layers.filter(function(H){return H.isStateDependent()}).map(function(H){return H.id})};cd.prototype.populate=function(C,H,ne){this.features=[],this.hasPattern=Lg("fill-extrusion",this.layers,H);for(var xe=0,Re=C;xe=1){var Ji=Mi[$i-1];if(!aA(Oi,Ji)){Vr.vertexLength+4>Co.MAX_VERTEX_ARRAY_LENGTH&&(Vr=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var ln=Oi.sub(Ji)._perp()._unit(),Tn=Ji.dist(Oi);ii+Tn>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+=Tn,hv(this.layoutVertexArray,Ji.x,Ji.y,ln.x,ln.y,0,0,ii),hv(this.layoutVertexArray,Ji.x,Ji.y,ln.x,ln.y,0,1,ii);var Vn=Vr.vertexLength;this.indexArray.emplaceBack(Vn,Vn+2,Vn+1),this.indexArray.emplaceBack(Vn+1,Vn+2,Vn+3),Vr.vertexLength+=4,Vr.primitiveLength+=2}}}}if(Vr.vertexLength+Gt>Co.MAX_VERTEX_ARRAY_LENGTH&&(Vr=this.segments.prepareSegment(Gt,this.layoutVertexArray,this.indexArray)),eb[C.type]==="Polygon"){for(var Nn=[],So=[],oo=Vr.vertexLength,go=0,ks=Dt;goui)||k.y===C.y&&(k.y<0||k.y>ui)}function iA(k){return k.every(function(C){return C.x<0})||k.every(function(C){return C.x>ui})||k.every(function(C){return C.y<0})||k.every(function(C){return C.y>ui})}var dm=new ma({"fill-extrusion-opacity":new it(Gi["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Zt(Gi["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new it(Gi["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new it(Gi["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new fr(Gi["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Zt(Gi["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Zt(Gi["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new it(Gi["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])}),wh={paint:dm},pv=function(k){function C(H){k.call(this,H,wh)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype.createBucket=function(ne){return new cd(ne)},C.prototype.queryRadius=function(){return Cp(this.paint.get("fill-extrusion-translate"))},C.prototype.is3D=function(){return!0},C.prototype.queryIntersectsFeature=function(ne,xe,Re,qe,pt,Dt,Gt,tr){var Pr=Vp(ne,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),Dt.angle,Gt),Zr=this.paint.get("fill-extrusion-height").evaluate(xe,Re),Vr=this.paint.get("fill-extrusion-base").evaluate(xe,Re),ua=nA(Pr,tr,Dt,0),Oa=W1(qe,Vr,Zr,tr),Mi=Oa[0],ii=Oa[1];return tb(Mi,ii,ua)},C}(Ya);function Fv(k,C){return k.x*C.x+k.y*C.y}function H1(k,C){if(k.length===1){for(var H=0,ne=C[H++],xe;!xe||ne.equals(xe);)if(xe=C[H++],!xe)return 1/0;for(;H=2&&C[Gt-1].equals(C[Gt-2]);)Gt--;for(var tr=0;tr0;if(Nn&&$i>tr){var oo=Vr.dist(ua);if(oo>2*Pr){var go=Vr.sub(Vr.sub(ua)._mult(Pr/oo)._round());this.updateDistance(ua,go),this.addCurrentVertex(go,Mi,0,0,Zr),ua=go}}var ks=ua&&Oa,Mo=ks?ne:Dt?"butt":xe;if(ks&&Mo==="round"&&(TnRe&&(Mo="bevel"),Mo==="bevel"&&(Tn>2&&(Mo="flipbevel"),Tn100)Oi=ii.mult(-1);else{var Po=Tn*Mi.add(ii).mag()/Mi.sub(ii).mag();Oi._perp()._mult(Po*(So?-1:1))}this.addCurrentVertex(Vr,Oi,0,0,Zr),this.addCurrentVertex(Vr,Oi.mult(-1),0,0,Zr)}else if(Mo==="bevel"||Mo==="fakeround"){var $s=-Math.sqrt(Tn*Tn-1),ws=So?$s:0,Xl=So?0:$s;if(ua&&this.addCurrentVertex(Vr,Mi,ws,Xl,Zr),Mo==="fakeround")for(var zu=Math.round(Vn*180/Math.PI/Z1),Zl=1;Zl2*Pr){var Zf=Vr.add(Oa.sub(Vr)._mult(Pr/gh)._round());this.updateDistance(Vr,Zf),this.addCurrentVertex(Zf,ii,0,0,Zr),Vr=Zf}}}}},Hf.prototype.addCurrentVertex=function(C,H,ne,xe,Re,qe){qe===void 0&&(qe=!1);var pt=H.x+H.y*ne,Dt=H.y-H.x*ne,Gt=-H.x+H.y*xe,tr=-H.y-H.x*xe;this.addHalfVertex(C,pt,Dt,qe,!1,ne,Re),this.addHalfVertex(C,Gt,tr,qe,!0,-xe,Re),this.distance>O0/2&&this.totalDistance===0&&(this.distance=0,this.addCurrentVertex(C,H,ne,xe,Re,qe))},Hf.prototype.addHalfVertex=function(C,H,ne,xe,Re,qe,pt){var Dt=C.x,Gt=C.y,tr=this.lineClips?this.scaledDistance*(O0-1):this.scaledDistance,Pr=tr*Rg;if(this.layoutVertexArray.emplaceBack((Dt<<1)+(xe?1:0),(Gt<<1)+(Re?1:0),Math.round(Ig*H)+128,Math.round(Ig*ne)+128,(qe===0?0:qe<0?-1:1)+1|(Pr&63)<<2,Pr>>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=pt.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,Oa),pt.primitiveLength++),Re?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,H){this.distance+=C.dist(H),this.updateScaledDistance()},de("LineBucket",Hf,{omit:["layers","patternFeatures"]});var Y1=new ma({"line-cap":new it(Gi.layout_line["line-cap"]),"line-join":new Zt(Gi.layout_line["line-join"]),"line-miter-limit":new it(Gi.layout_line["line-miter-limit"]),"line-round-limit":new it(Gi.layout_line["line-round-limit"]),"line-sort-key":new Zt(Gi.layout_line["line-sort-key"])}),K1=new ma({"line-opacity":new Zt(Gi.paint_line["line-opacity"]),"line-color":new Zt(Gi.paint_line["line-color"]),"line-translate":new it(Gi.paint_line["line-translate"]),"line-translate-anchor":new it(Gi.paint_line["line-translate-anchor"]),"line-width":new Zt(Gi.paint_line["line-width"]),"line-gap-width":new Zt(Gi.paint_line["line-gap-width"]),"line-offset":new Zt(Gi.paint_line["line-offset"]),"line-blur":new Zt(Gi.paint_line["line-blur"]),"line-dasharray":new oa(Gi.paint_line["line-dasharray"]),"line-pattern":new fr(Gi.paint_line["line-pattern"]),"line-gradient":new wa(Gi.paint_line["line-gradient"])}),Dg={paint:K1,layout:Y1},sA=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype.possiblyEvaluate=function(ne,xe){return xe=new gn(Math.floor(xe.zoom),{now:xe.now,fadeDuration:xe.fadeDuration,zoomHistory:xe.zoomHistory,transition:xe.transition}),k.prototype.possiblyEvaluate.call(this,ne,xe)},C.prototype.evaluate=function(ne,xe,Re,qe){return xe=g({},xe,{zoom:Math.floor(xe.zoom)}),k.prototype.evaluate.call(this,ne,xe,Re,qe)},C}(Zt),W=new sA(Dg.paint.properties["line-width"].specification);W.useIntegerZoom=!0;var D=function(k){function C(H){k.call(this,H,Dg),this.gradientVersion=0}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._handleSpecialPaintPropertyUpdate=function(ne){if(ne==="line-gradient"){var xe=this._transitionablePaint._values["line-gradient"].value.expression;this.stepInterpolant=xe._styleExpression.expression instanceof Tu,this.gradientVersion=(this.gradientVersion+1)%c}},C.prototype.gradientExpression=function(){return this._transitionablePaint._values["line-gradient"].value.expression},C.prototype.recalculate=function(ne,xe){k.prototype.recalculate.call(this,ne,xe),this.paint._values["line-floorwidth"]=W.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,ne)},C.prototype.createBucket=function(ne){return new Hf(ne)},C.prototype.queryRadius=function(ne){var xe=ne,Re=J(Rh("line-width",this,xe),Rh("line-gap-width",this,xe)),qe=Rh("line-offset",this,xe);return Re/2+Math.abs(qe)+Cp(this.paint.get("line-translate"))},C.prototype.queryIntersectsFeature=function(ne,xe,Re,qe,pt,Dt,Gt){var tr=Vp(ne,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),Dt.angle,Gt),Pr=Gt/2*J(this.paint.get("line-width").evaluate(xe,Re),this.paint.get("line-gap-width").evaluate(xe,Re)),Zr=this.paint.get("line-offset").evaluate(xe,Re);return Zr&&(qe=pe(qe,Zr*Gt)),mu(tr,qe,Pr)},C.prototype.isTileClipped=function(){return!0},C}(Ya);function J(k,C){return C>0?C+2*k:k}function pe(k,C){for(var H=[],ne=new n(0,0),xe=0;xe":"\uFE40","?":"\uFE16","@":"\uFF20","[":"\uFE47","\\":"\uFF3C","]":"\uFE48","^":"\uFF3E",_:"\uFE33","`":"\uFF40","{":"\uFE37","|":"\u2015","}":"\uFE38","~":"\uFF5E","\xA2":"\uFFE0","\xA3":"\uFFE1","\xA5":"\uFFE5","\xA6":"\uFFE4","\xAC":"\uFFE2","\xAF":"\uFFE3","\u2013":"\uFE32","\u2014":"\uFE31","\u2018":"\uFE43","\u2019":"\uFE44","\u201C":"\uFE41","\u201D":"\uFE42","\u2026":"\uFE19","\u2027":"\u30FB","\u20A9":"\uFFE6","\u3001":"\uFE11","\u3002":"\uFE12","\u3008":"\uFE3F","\u3009":"\uFE40","\u300A":"\uFE3D","\u300B":"\uFE3E","\u300C":"\uFE41","\u300D":"\uFE42","\u300E":"\uFE43","\u300F":"\uFE44","\u3010":"\uFE3B","\u3011":"\uFE3C","\u3014":"\uFE39","\u3015":"\uFE3A","\u3016":"\uFE17","\u3017":"\uFE18","\uFF01":"\uFE15","\uFF08":"\uFE35","\uFF09":"\uFE36","\uFF0C":"\uFE10","\uFF0D":"\uFE32","\uFF0E":"\u30FB","\uFF1A":"\uFE13","\uFF1B":"\uFE14","\uFF1C":"\uFE3F","\uFF1E":"\uFE40","\uFF1F":"\uFE16","\uFF3B":"\uFE47","\uFF3D":"\uFE48","\uFF3F":"\uFE33","\uFF5B":"\uFE37","\uFF5C":"\u2015","\uFF5D":"\uFE38","\uFF5F":"\uFE35","\uFF60":"\uFE36","\uFF61":"\uFE12","\uFF62":"\uFE41","\uFF63":"\uFE42"};function qi(k){for(var C="",H=0;H>1,tr=-7,Pr=H?xe-1:0,Zr=H?-1:1,Vr=k[C+Pr];for(Pr+=Zr,Re=Vr&(1<<-tr)-1,Vr>>=-tr,tr+=pt;tr>0;Re=Re*256+k[C+Pr],Pr+=Zr,tr-=8);for(qe=Re&(1<<-tr)-1,Re>>=-tr,tr+=ne;tr>0;qe=qe*256+k[C+Pr],Pr+=Zr,tr-=8);if(Re===0)Re=1-Gt;else{if(Re===Dt)return qe?NaN:(Vr?-1:1)*(1/0);qe=qe+Math.pow(2,ne),Re=Re-Gt}return(Vr?-1:1)*qe*Math.pow(2,Re-ne)},Eo=function(k,C,H,ne,xe,Re){var qe,pt,Dt,Gt=Re*8-xe-1,tr=(1<>1,Zr=xe===23?Math.pow(2,-24)-Math.pow(2,-77):0,Vr=ne?0:Re-1,ua=ne?1:-1,Oa=C<0||C===0&&1/C<0?1:0;for(C=Math.abs(C),isNaN(C)||C===1/0?(pt=isNaN(C)?1:0,qe=tr):(qe=Math.floor(Math.log(C)/Math.LN2),C*(Dt=Math.pow(2,-qe))<1&&(qe--,Dt*=2),qe+Pr>=1?C+=Zr/Dt:C+=Zr*Math.pow(2,1-Pr),C*Dt>=2&&(qe++,Dt/=2),qe+Pr>=tr?(pt=0,qe=tr):qe+Pr>=1?(pt=(C*Dt-1)*Math.pow(2,xe),qe=qe+Pr):(pt=C*Math.pow(2,Pr-1)*Math.pow(2,xe),qe=0));xe>=8;k[H+Vr]=pt&255,Vr+=ua,pt/=256,xe-=8);for(qe=qe<0;k[H+Vr]=qe&255,Vr+=ua,qe/=256,Gt-=8);k[H+Vr-ua]|=Oa*128},ys={read:qn,write:Eo},mo=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 ts=65536*65536,Uo=1/ts,zo=12,wn=typeof TextDecoder>"u"?null:new TextDecoder("utf8");zn.prototype={destroy:function(){this.buf=null},readFields:function(k,C,H){for(H=H||this.length;this.pos>3,Re=this.pos;this.type=ne&7,k(xe,C,this),this.pos===Re&&this.skip(ne)}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)*ts;return this.pos+=8,k},readSFixed64:function(){var k=dh(this.buf,this.pos)+Rp(this.buf,this.pos+4)*ts;return this.pos+=8,k},readFloat:function(){var k=ys.read(this.buf,this.pos,!0,23,4);return this.pos+=4,k},readDouble:function(){var k=ys.read(this.buf,this.pos,!0,52,8);return this.pos+=8,k},readVarint:function(k){var C=this.buf,H,ne;return ne=C[this.pos++],H=ne&127,ne<128||(ne=C[this.pos++],H|=(ne&127)<<7,ne<128)||(ne=C[this.pos++],H|=(ne&127)<<14,ne<128)||(ne=C[this.pos++],H|=(ne&127)<<21,ne<128)?H:(ne=C[this.pos],H|=(ne&15)<<28,os(H,k,this))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var k=this.readVarint();return k%2===1?(k+1)/-2:k/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var k=this.readVarint()+this.pos,C=this.pos;return this.pos=k,k-C>=zo&&wn?hu(this.buf,C,k):dp(this.buf,C,k)},readBytes:function(){var k=this.readVarint()+this.pos,C=this.buf.subarray(this.pos,k);return this.pos=k,C},readPackedVarint:function(k,C){if(this.type!==zn.Bytes)return k.push(this.readVarint(C));var H=Fo(this);for(k=k||[];this.pos127;);else if(C===zn.Bytes)this.pos=this.readVarint()+this.pos;else if(C===zn.Fixed32)this.pos+=4;else if(C===zn.Fixed64)this.pos+=8;else throw new Error("Unimplemented type: "+C)},writeTag:function(k,C){this.writeVarint(k<<3|C)},realloc:function(k){for(var C=this.length||16;C268435455||k<0){Ku(k,this);return}this.realloc(4),this.buf[this.pos++]=k&127|(k>127?128:0),!(k<=127)&&(this.buf[this.pos++]=(k>>>=7)&127|(k>127?128:0),!(k<=127)&&(this.buf[this.pos++]=(k>>>=7)&127|(k>127?128:0),!(k<=127)&&(this.buf[this.pos++]=k>>>7&127)))},writeSVarint:function(k){this.writeVarint(k<0?-k*2-1:k*2)},writeBoolean:function(k){this.writeVarint(!!k)},writeString:function(k){k=String(k),this.realloc(k.length*4),this.pos++;var C=this.pos;this.pos=fc(this.buf,k,this.pos);var H=this.pos-C;H>=128&&Hp(C,H,this),this.pos=C-1,this.writeVarint(H),this.pos+=H},writeFloat:function(k){this.realloc(4),ys.write(this.buf,k,this.pos,!0,23,4),this.pos+=4},writeDouble:function(k){this.realloc(8),ys.write(this.buf,k,this.pos,!0,52,8),this.pos+=8},writeBytes:function(k){var C=k.length;this.writeVarint(C),this.realloc(C);for(var H=0;H=128&&Hp(H,ne,this),this.pos=H-1,this.writeVarint(ne),this.pos+=ne},writeMessage:function(k,C,H){this.writeTag(k,zn.Bytes),this.writeRawMessage(C,H)},writePackedVarint:function(k,C){C.length&&this.writeMessage(k,Th,C)},writePackedSVarint:function(k,C){C.length&&this.writeMessage(k,rh,C)},writePackedBoolean:function(k,C){C.length&&this.writeMessage(k,Qh,C)},writePackedFloat:function(k,C){C.length&&this.writeMessage(k,Jh,C)},writePackedDouble:function(k,C){C.length&&this.writeMessage(k,$h,C)},writePackedFixed32:function(k,C){C.length&&this.writeMessage(k,ff,C)},writePackedSFixed32:function(k,C){C.length&&this.writeMessage(k,ah,C)},writePackedFixed64:function(k,C){C.length&&this.writeMessage(k,Fh,C)},writePackedSFixed64:function(k,C){C.length&&this.writeMessage(k,Ah,C)},writeBytesField:function(k,C){this.writeTag(k,zn.Bytes),this.writeBytes(C)},writeFixed32Field:function(k,C){this.writeTag(k,zn.Fixed32),this.writeFixed32(C)},writeSFixed32Field:function(k,C){this.writeTag(k,zn.Fixed32),this.writeSFixed32(C)},writeFixed64Field:function(k,C){this.writeTag(k,zn.Fixed64),this.writeFixed64(C)},writeSFixed64Field:function(k,C){this.writeTag(k,zn.Fixed64),this.writeSFixed64(C)},writeVarintField:function(k,C){this.writeTag(k,zn.Varint),this.writeVarint(C)},writeSVarintField:function(k,C){this.writeTag(k,zn.Varint),this.writeSVarint(C)},writeStringField:function(k,C){this.writeTag(k,zn.Bytes),this.writeString(C)},writeFloatField:function(k,C){this.writeTag(k,zn.Fixed32),this.writeFloat(C)},writeDoubleField:function(k,C){this.writeTag(k,zn.Fixed64),this.writeDouble(C)},writeBooleanField:function(k,C){this.writeVarintField(k,!!C)}};function os(k,C,H){var ne=H.buf,xe,Re;if(Re=ne[H.pos++],xe=(Re&112)>>4,Re<128||(Re=ne[H.pos++],xe|=(Re&127)<<3,Re<128)||(Re=ne[H.pos++],xe|=(Re&127)<<10,Re<128)||(Re=ne[H.pos++],xe|=(Re&127)<<17,Re<128)||(Re=ne[H.pos++],xe|=(Re&127)<<24,Re<128)||(Re=ne[H.pos++],xe|=(Re&1)<<31,Re<128))return Ls(k,xe,C);throw new Error("Expected varint not more than 10 bytes")}function Fo(k){return k.type===zn.Bytes?k.readVarint()+k.pos:k.pos+1}function Ls(k,C,H){return H?C*4294967296+(k>>>0):(C>>>0)*4294967296+(k>>>0)}function Ku(k,C){var H,ne;if(k>=0?(H=k%4294967296|0,ne=k/4294967296|0):(H=~(-k%4294967296),ne=~(-k/4294967296),H^4294967295?H=H+1|0:(H=0,ne=ne+1|0)),k>=18446744073709552e3||k<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");C.realloc(10),Uu(H,ne,C),th(ne,C)}function Uu(k,C,H){H.buf[H.pos++]=k&127|128,k>>>=7,H.buf[H.pos++]=k&127|128,k>>>=7,H.buf[H.pos++]=k&127|128,k>>>=7,H.buf[H.pos++]=k&127|128,k>>>=7,H.buf[H.pos]=k&127}function th(k,C){var H=(k&7)<<4;C.buf[C.pos++]|=H|((k>>>=3)?128:0),k&&(C.buf[C.pos++]=k&127|((k>>>=7)?128:0),k&&(C.buf[C.pos++]=k&127|((k>>>=7)?128:0),k&&(C.buf[C.pos++]=k&127|((k>>>=7)?128:0),k&&(C.buf[C.pos++]=k&127|((k>>>=7)?128:0),k&&(C.buf[C.pos++]=k&127)))))}function Hp(k,C,H){var ne=C<=16383?1:C<=2097151?2:C<=268435455?3:Math.floor(Math.log(C)/(Math.LN2*7));H.realloc(ne);for(var xe=H.pos-1;xe>=k;xe--)H.buf[xe+ne]=H.buf[xe]}function Th(k,C){for(var H=0;H>>8,k[H+2]=C>>>16,k[H+3]=C>>>24}function Rp(k,C){return(k[C]|k[C+1]<<8|k[C+2]<<16)+(k[C+3]<<24)}function dp(k,C,H){for(var ne="",xe=C;xe239?4:Re>223?3:Re>191?2:1;if(xe+pt>H)break;var Dt,Gt,tr;pt===1?Re<128&&(qe=Re):pt===2?(Dt=k[xe+1],(Dt&192)===128&&(qe=(Re&31)<<6|Dt&63,qe<=127&&(qe=null))):pt===3?(Dt=k[xe+1],Gt=k[xe+2],(Dt&192)===128&&(Gt&192)===128&&(qe=(Re&15)<<12|(Dt&63)<<6|Gt&63,(qe<=2047||qe>=55296&&qe<=57343)&&(qe=null))):pt===4&&(Dt=k[xe+1],Gt=k[xe+2],tr=k[xe+3],(Dt&192)===128&&(Gt&192)===128&&(tr&192)===128&&(qe=(Re&15)<<18|(Dt&63)<<12|(Gt&63)<<6|tr&63,(qe<=65535||qe>=1114112)&&(qe=null))),qe===null?(qe=65533,pt=1):qe>65535&&(qe-=65536,ne+=String.fromCharCode(qe>>>10&1023|55296),qe=56320|qe&1023),ne+=String.fromCharCode(qe),xe+=pt}return ne}function hu(k,C,H){return wn.decode(k.subarray(C,H))}function fc(k,C,H){for(var ne=0,xe,Re;ne55295&&xe<57344)if(Re)if(xe<56320){k[H++]=239,k[H++]=191,k[H++]=189,Re=xe;continue}else xe=Re-55296<<10|xe-56320|65536,Re=null;else{xe>56319||ne+1===C.length?(k[H++]=239,k[H++]=191,k[H++]=189):Re=xe;continue}else Re&&(k[H++]=239,k[H++]=191,k[H++]=189,Re=null);xe<128?k[H++]=xe:(xe<2048?k[H++]=xe>>6|192:(xe<65536?k[H++]=xe>>12|224:(k[H++]=xe>>18|240,k[H++]=xe>>12&63|128),k[H++]=xe>>6&63|128),k[H++]=xe&63|128)}return H}var Ju=3;function Dp(k,C,H){k===1&&H.readMessage($c,C)}function $c(k,C,H){if(k===3){var ne=H.readMessage(vm,{}),xe=ne.id,Re=ne.bitmap,qe=ne.width,pt=ne.height,Dt=ne.left,Gt=ne.top,tr=ne.advance;C.push({id:xe,bitmap:new Ip({width:qe+2*Ju,height:pt+2*Ju},Re),metrics:{width:qe,height:pt,left:Dt,top:Gt,advance:tr}})}}function vm(k,C,H){k===1?C.id=H.readVarint():k===2?C.bitmap=H.readBytes():k===3?C.width=H.readVarint():k===4?C.height=H.readVarint():k===5?C.left=H.readSVarint():k===6?C.top=H.readSVarint():k===7&&(C.advance=H.readVarint())}function _d(k){return new mo(k).readFields(Dp,[])}var fd=Ju;function Wp(k){for(var C=0,H=0,ne=0,xe=k;ne=0;Vr--){var ua=pt[Vr];if(!(Zr.w>ua.w||Zr.h>ua.h)){if(Zr.x=ua.x,Zr.y=ua.y,Gt=Math.max(Gt,Zr.y+Zr.h),Dt=Math.max(Dt,Zr.x+Zr.w),Zr.w===ua.w&&Zr.h===ua.h){var Oa=pt.pop();Vr=0&&xe>=C&&bd[this.text.charCodeAt(xe)];xe--)ne--;this.text=this.text.substring(C,ne),this.sectionIndex=this.sectionIndex.slice(C,ne)},vh.prototype.substring=function(C,H){var ne=new vh;return ne.text=this.text.substring(C,H),ne.sectionIndex=this.sectionIndex.slice(C,H),ne.sections=this.sections,ne},vh.prototype.toString=function(){return this.text},vh.prototype.getMaxScale=function(){var C=this;return this.sectionIndex.reduce(function(H,ne){return Math.max(H,C.sections[ne].scale)},0)},vh.prototype.addTextSection=function(C,H){this.text+=C.text,this.sections.push(Ov.forText(C.scale,C.fontStack||H));for(var ne=this.sections.length-1,xe=0;xe=xd?null:++this.imageSectionID:(this.imageSectionID=zg,this.imageSectionID)};function lA(k,C){for(var H=[],ne=k.text,xe=0,Re=0,qe=C;Re=0,tr=0,Pr=0;Pr0&&Zf>So&&(So=Zf)}else{var Yl=H[go.fontStack],Ol=Yl&&Yl[Mo];if(Ol&&Ol.rect)ws=Ol.rect,$s=Ol.metrics;else{var $u=C[go.fontStack],hc=$u&&$u[Mo];if(!hc)continue;$s=hc.metrics}Po=(ln-go.scale)*en}Zl?(k.verticalizable=!0,Nn.push({glyph:Mo,imageName:Xl,x:Zr,y:Vr+Po,vertical:Zl,scale:go.scale,fontStack:go.fontStack,sectionIndex:ks,metrics:$s,rect:ws}),Zr+=zu*go.scale+Gt):(Nn.push({glyph:Mo,imageName:Xl,x:Zr,y:Vr+Po,vertical:Zl,scale:go.scale,fontStack:go.fontStack,sectionIndex:ks,metrics:$s,rect:ws}),Zr+=$s.advance*go.scale+Gt)}if(Nn.length!==0){var tp=Zr-Gt;ua=Math.max(tp,ua),hA(Nn,0,Nn.length-1,Mi,So)}Zr=0;var rp=Re*ln+So;Vn.lineOffset=Math.max(So,Tn),Vr+=rp,Oa=Math.max(rp,Oa),++ii}var yh=Vr-mm,gp=$1(qe),yp=gp.horizontalAlign,ih=gp.verticalAlign;Oh(k.positionedLines,Mi,yp,ih,ua,Oa,Re,yh,xe.length),k.top+=-ih*yh,k.bottom=k.top+yh,k.left+=-yp*ua,k.right=k.left+ua}function hA(k,C,H,ne,xe){if(!(!ne&&!xe))for(var Re=k[H],qe=Re.metrics.advance*Re.scale,pt=(k[H].x+qe)*ne,Dt=C;Dt<=H;Dt++)k[Dt].x-=pt,k[Dt].y+=xe}function Oh(k,C,H,ne,xe,Re,qe,pt,Dt){var Gt=(C-H)*xe,tr=0;Re!==qe?tr=-pt*ne-mm:tr=(-ne*Dt+.5)*qe;for(var Pr=0,Zr=k;Pr-H/2;){if(qe--,qe<0)return!1;pt-=k[qe].dist(Re),Re=k[qe]}pt+=k[qe].dist(k[qe+1]),qe++;for(var Dt=[],Gt=0;ptne;)Gt-=Dt.shift().angleDelta;if(Gt>xe)return!1;qe++,pt+=Pr.dist(Zr)}return!0}function xk(k){for(var C=0,H=0;HGt){var ua=(Gt-Dt)/Vr,Oa=El(Pr.x,Zr.x,ua),Mi=El(Pr.y,Zr.y,ua),ii=new ep(Oa,Mi,Zr.angleTo(Pr),tr);return ii._round(),!qe||_k(k,ii,pt,qe,C)?ii:void 0}Dt+=Vr}}function _W(k,C,H,ne,xe,Re,qe,pt,Dt){var Gt=bk(ne,Re,qe),tr=wk(ne,xe),Pr=tr*qe,Zr=k[0].x===0||k[0].x===Dt||k[0].y===0||k[0].y===Dt;C-Pr=0&&Ji=0&&ln=0&&Zr+Gt<=tr){var Tn=new ep(Ji,ln,$i,ua);Tn._round(),(!ne||_k(k,Tn,Re,ne,xe))&&Vr.push(Tn)}}Pr+=ii}return!pt&&!Vr.length&&!qe&&(Vr=Tk(k,Pr/2,H,ne,xe,Re,qe,!0,Dt)),Vr}function Ak(k,C,H,ne,xe){for(var Re=[],qe=0;qe=ne&&Pr.x>=ne)&&(tr.x>=ne?tr=new n(ne,tr.y+(Pr.y-tr.y)*((ne-tr.x)/(Pr.x-tr.x)))._round():Pr.x>=ne&&(Pr=new n(ne,tr.y+(Pr.y-tr.y)*((ne-tr.x)/(Pr.x-tr.x)))._round()),!(tr.y>=xe&&Pr.y>=xe)&&(tr.y>=xe?tr=new n(tr.x+(Pr.x-tr.x)*((xe-tr.y)/(Pr.y-tr.y)),xe)._round():Pr.y>=xe&&(Pr=new n(tr.x+(Pr.x-tr.x)*((xe-tr.y)/(Pr.y-tr.y)),xe)._round()),(!Dt||!tr.equals(Dt[Dt.length-1]))&&(Dt=[tr],Re.push(Dt)),Dt.push(Pr)))))}return Re}var Bg=zc;function Sk(k,C,H,ne){var xe=[],Re=k.image,qe=Re.pixelRatio,pt=Re.paddedRect.w-2*Bg,Dt=Re.paddedRect.h-2*Bg,Gt=k.right-k.left,tr=k.bottom-k.top,Pr=Re.stretchX||[[0,pt]],Zr=Re.stretchY||[[0,Dt]],Vr=function(Yl,Ol){return Yl+Ol[1]-Ol[0]},ua=Pr.reduce(Vr,0),Oa=Zr.reduce(Vr,0),Mi=pt-ua,ii=Dt-Oa,$i=0,Oi=ua,Ji=0,ln=Oa,Tn=0,Vn=Mi,Nn=0,So=ii;if(Re.content&&ne){var oo=Re.content;$i=ub(Pr,0,oo[0]),Ji=ub(Zr,0,oo[1]),Oi=ub(Pr,oo[0],oo[2]),ln=ub(Zr,oo[1],oo[3]),Tn=oo[0]-$i,Nn=oo[1]-Ji,Vn=oo[2]-oo[0]-Oi,So=oo[3]-oo[1]-ln}var go=function(Yl,Ol,$u,hc){var hf=cb(Yl.stretch-$i,Oi,Gt,k.left),_f=fb(Yl.fixed-Tn,Vn,Yl.stretch,ua),gh=cb(Ol.stretch-Ji,ln,tr,k.top),Zf=fb(Ol.fixed-Nn,So,Ol.stretch,Oa),tp=cb($u.stretch-$i,Oi,Gt,k.left),rp=fb($u.fixed-Tn,Vn,$u.stretch,ua),yh=cb(hc.stretch-Ji,ln,tr,k.top),gp=fb(hc.fixed-Nn,So,hc.stretch,Oa),yp=new n(hf,gh),ih=new n(tp,gh),_p=new n(tp,yh),nd=new n(hf,yh),Uv=new n(_f/qe,Zf/qe),_m=new n(rp/qe,gp/qe),xm=C*Math.PI/180;if(xm){var bm=Math.sin(xm),Wg=Math.cos(xm),wd=[Wg,-bm,bm,Wg];yp._matMult(wd),ih._matMult(wd),nd._matMult(wd),_p._matMult(wd)}var gb=Yl.stretch+Yl.fixed,xA=$u.stretch+$u.fixed,yb=Ol.stretch+Ol.fixed,bA=hc.stretch+hc.fixed,hd={x:Re.paddedRect.x+Bg+gb,y:Re.paddedRect.y+Bg+yb,w:xA-gb,h:bA-yb},Xg=Vn/qe/Gt,_b=So/qe/tr;return{tl:yp,tr:ih,bl:nd,br:_p,tex:hd,writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:Uv,pixelOffsetBR:_m,minFontScaleX:Xg,minFontScaleY:_b,isSDF:H}};if(!ne||!Re.stretchX&&!Re.stretchY)xe.push(go({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:pt+1},{fixed:0,stretch:Dt+1}));else for(var ks=Mk(Pr,Mi,ua),Mo=Mk(Zr,ii,Oa),Po=0;Po0&&(ua=Math.max(10,ua),this.circleDiameter=ua)}else{var Oa=qe.top*pt-Dt,Mi=qe.bottom*pt+Dt,ii=qe.left*pt-Dt,$i=qe.right*pt+Dt,Oi=qe.collisionPadding;if(Oi&&(ii-=Oi[0]*pt,Oa-=Oi[1]*pt,$i+=Oi[2]*pt,Mi+=Oi[3]*pt),tr){var Ji=new n(ii,Oa),ln=new n($i,Oa),Tn=new n(ii,Mi),Vn=new n($i,Mi),Nn=tr*Math.PI/180;Ji._rotate(Nn),ln._rotate(Nn),Tn._rotate(Nn),Vn._rotate(Nn),ii=Math.min(Ji.x,ln.x,Tn.x,Vn.x),$i=Math.max(Ji.x,ln.x,Tn.x,Vn.x),Oa=Math.min(Ji.y,ln.y,Tn.y,Vn.y),Mi=Math.max(Ji.y,ln.y,Tn.y,Vn.y)}C.emplaceBack(H.x,H.y,ii,Oa,$i,Mi,ne,xe,Re)}this.boxEndIndex=C.length},Ng=function(C,H){if(C===void 0&&(C=[]),H===void 0&&(H=bW),this.data=C,this.length=this.data.length,this.compare=H,this.length>0)for(var ne=(this.length>>1)-1;ne>=0;ne--)this._down(ne)};Ng.prototype.push=function(C){this.data.push(C),this.length++,this._up(this.length-1)},Ng.prototype.pop=function(){if(this.length!==0){var C=this.data[0],H=this.data.pop();return this.length--,this.length>0&&(this.data[0]=H,this._down(0)),C}},Ng.prototype.peek=function(){return this.data[0]},Ng.prototype._up=function(C){for(var H=this,ne=H.data,xe=H.compare,Re=ne[C];C>0;){var qe=C-1>>1,pt=ne[qe];if(xe(Re,pt)>=0)break;ne[C]=pt,C=qe}ne[C]=Re},Ng.prototype._down=function(C){for(var H=this,ne=H.data,xe=H.compare,Re=this.length>>1,qe=ne[C];C=0)break;ne[C]=Dt,C=pt}ne[C]=qe};function bW(k,C){return kC?1:0}function wW(k,C,H){C===void 0&&(C=1),H===void 0&&(H=!1);for(var ne=1/0,xe=1/0,Re=-1/0,qe=-1/0,pt=k[0],Dt=0;DtRe)&&(Re=Gt.x),(!Dt||Gt.y>qe)&&(qe=Gt.y)}var tr=Re-ne,Pr=qe-xe,Zr=Math.min(tr,Pr),Vr=Zr/2,ua=new Ng([],TW);if(Zr===0)return new n(ne,xe);for(var Oa=ne;Oaii.d||!ii.d)&&(ii=Oi,H&&console.log("found best %d after %d probes",Math.round(1e4*Oi.d)/1e4,$i)),!(Oi.max-ii.d<=C)&&(Vr=Oi.h/2,ua.push(new Ug(Oi.p.x-Vr,Oi.p.y-Vr,Vr,k)),ua.push(new Ug(Oi.p.x+Vr,Oi.p.y-Vr,Vr,k)),ua.push(new Ug(Oi.p.x-Vr,Oi.p.y+Vr,Vr,k)),ua.push(new Ug(Oi.p.x+Vr,Oi.p.y+Vr,Vr,k)),$i+=4)}return H&&(console.log("num probes: "+$i),console.log("best distance: "+ii.d)),ii.p}function TW(k,C){return C.max-k.max}function Ug(k,C,H,ne){this.p=new n(k,C),this.h=H,this.d=AW(this.p,ne),this.max=this.d+this.h*Math.SQRT2}function AW(k,C){for(var H=!1,ne=1/0,xe=0;xek.y!=tr.y>k.y&&k.x<(tr.x-Gt.x)*(k.y-Gt.y)/(tr.y-Gt.y)+Gt.x&&(H=!H),ne=Math.min(ne,qd(k,Gt,tr))}return(H?1:-1)*Math.sqrt(ne)}function SW(k){for(var C=0,H=0,ne=0,xe=k[0],Re=0,qe=xe.length,pt=qe-1;Re=ui||wd.y<0||wd.y>=ui||kW(k,wd,Wg,H,ne,xe,Mo,k.layers[0],k.collisionBoxArray,C.index,C.sourceLayerIndex,k.index,ii,ln,Nn,Dt,Oi,Tn,So,Vr,C,Re,Gt,tr,qe)};if(oo==="line")for(var $s=0,ws=Ak(C.geometry,0,0,ui,ui);$s1){var gh=yW(_f,Vn,H.vertical||ua,ne,Oa,$i);gh&&Po(_f,gh)}}else if(C.type==="Polygon")for(var Zf=0,tp=Cg(C.geometry,0);Zfgm&&B(k.layerIds[0]+': Value for "text-size" is >= '+Q1+'. Reduce your "text-size".')):Mi.kind==="composite"&&(ii=[Bh*Vr.compositeTextSizes[0].evaluate(qe,{},ua),Bh*Vr.compositeTextSizes[1].evaluate(qe,{},ua)],(ii[0]>gm||ii[1]>gm)&&B(k.layerIds[0]+': Value for "text-size" is >= '+Q1+'. Reduce your "text-size".')),k.addSymbols(k.text,Oa,ii,pt,Re,qe,Gt,C,Dt.lineStartIndex,Dt.lineLength,Zr,ua);for(var $i=0,Oi=tr;$igm&&B(k.layerIds[0]+': Value for "icon-size" is >= '+Q1+'. Reduce your "icon-size".')):yp.kind==="composite"&&(ih=[Bh*ln.compositeIconSizes[0].evaluate(Ji,{},Vn),Bh*ln.compositeIconSizes[1].evaluate(Ji,{},Vn)],(ih[0]>gm||ih[1]>gm)&&B(k.layerIds[0]+': Value for "icon-size" is >= '+Q1+'. Reduce your "icon-size".')),k.addSymbols(k.icon,yh,ih,Oi,$i,Ji,!1,C,oo.lineStartIndex,oo.lineLength,-1,Vn),Zl=k.icon.placedSymbolArray.length-1,gp&&(ws=gp.length*4,k.addSymbols(k.icon,gp,ih,Oi,$i,Ji,vp.vertical,C,oo.lineStartIndex,oo.lineLength,-1,Vn),Yl=k.icon.placedSymbolArray.length-1)}for(var _p in ne.horizontal){var nd=ne.horizontal[_p];if(!go){$u=me(nd.text);var Uv=pt.layout.get("text-rotate").evaluate(Ji,{},Vn);go=new hb(Dt,C,Gt,tr,Pr,nd,Zr,Vr,ua,Uv)}var _m=nd.positionedLines.length===1;if(Xl+=kk(k,C,nd,Re,pt,ua,Ji,Oa,oo,ne.vertical?vp.horizontal:vp.horizontalOnly,_m?Object.keys(ne.horizontal):[_p],Ol,Zl,ln,Vn),_m)break}ne.vertical&&(zu+=kk(k,C,ne.vertical,Re,pt,ua,Ji,Oa,oo,vp.vertical,["vertical"],Ol,Yl,ln,Vn));var xm=go?go.boxStartIndex:k.collisionBoxArray.length,bm=go?go.boxEndIndex:k.collisionBoxArray.length,Wg=Mo?Mo.boxStartIndex:k.collisionBoxArray.length,wd=Mo?Mo.boxEndIndex:k.collisionBoxArray.length,gb=ks?ks.boxStartIndex:k.collisionBoxArray.length,xA=ks?ks.boxEndIndex:k.collisionBoxArray.length,yb=Po?Po.boxStartIndex:k.collisionBoxArray.length,bA=Po?Po.boxEndIndex:k.collisionBoxArray.length,hd=-1,Xg=function(r_,Hk){return r_&&r_.circleDiameter?Math.max(r_.circleDiameter,Hk):Hk};hd=Xg(go,hd),hd=Xg(Mo,hd),hd=Xg(ks,hd),hd=Xg(Po,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,Zl,Yl,$u,xm,bm,Wg,wd,gb,xA,yb,bA,Gt,Xl,zu,$s,ws,_b,0,Zr,hc,hf,hd)}function CW(k,C,H,ne){var xe=k.compareText;if(!(C in xe))xe[C]=[];else for(var Re=xe[C],qe=Re.length-1;qe>=0;qe--)if(ne.dist(Re[qe])0)&&(qe.value.kind!=="constant"||qe.value.value.length>0),tr=Dt.value.kind!=="constant"||!!Dt.value.value||Object.keys(Dt.parameters).length>0,Pr=Re.get("symbol-sort-key");if(this.features=[],!(!Gt&&!tr)){for(var Zr=H.iconDependencies,Vr=H.glyphDependencies,ua=H.availableImages,Oa=new gn(this.zoom),Mi=0,ii=C;Mi=0;for(var zu=0,Zl=So.sections;zu=0;Dt--)qe[Dt]={x:H[Dt].x,y:H[Dt].y,tileUnitDistanceFromAnchor:Re},Dt>0&&(Re+=H[Dt-1].dist(H[Dt]));for(var Gt=0;Gt0},Du.prototype.hasIconData=function(){return this.icon.segments.get().length>0},Du.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},Du.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},Du.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},Du.prototype.addIndicesForPlacedSymbol=function(C,H){for(var ne=C.placedSymbolArray.get(H),xe=ne.vertexStartIndex+ne.numGlyphs*4,Re=ne.vertexStartIndex;Re1||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 ne=0,xe=this.symbolInstanceIndexes;ne=0&&Gt.indexOf(pt)===Dt&&H.addIndicesForPlacedSymbol(H.text,pt)}),qe.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,qe.verticalPlacedTextSymbolIndex),qe.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,qe.placedIconSymbolIndex),qe.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,qe.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},de("SymbolBucket",Du,{omit:["layers","collisionBoxArray","features","compareText"]}),Du.MAX_GLYPHS=65535,Du.addDynamicAttributes=vA;function RW(k,C){return C.replace(/{([^{}]+)}/g,function(H,ne){return ne in k?String(k[ne]):""})}var DW=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 Zt(Gi.layout_symbol["symbol-sort-key"]),"symbol-z-order":new it(Gi.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new it(Gi.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new it(Gi.layout_symbol["icon-ignore-placement"]),"icon-optional":new it(Gi.layout_symbol["icon-optional"]),"icon-rotation-alignment":new it(Gi.layout_symbol["icon-rotation-alignment"]),"icon-size":new Zt(Gi.layout_symbol["icon-size"]),"icon-text-fit":new it(Gi.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new it(Gi.layout_symbol["icon-text-fit-padding"]),"icon-image":new Zt(Gi.layout_symbol["icon-image"]),"icon-rotate":new Zt(Gi.layout_symbol["icon-rotate"]),"icon-padding":new it(Gi.layout_symbol["icon-padding"]),"icon-keep-upright":new it(Gi.layout_symbol["icon-keep-upright"]),"icon-offset":new Zt(Gi.layout_symbol["icon-offset"]),"icon-anchor":new Zt(Gi.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new it(Gi.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new it(Gi.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new it(Gi.layout_symbol["text-rotation-alignment"]),"text-field":new Zt(Gi.layout_symbol["text-field"]),"text-font":new Zt(Gi.layout_symbol["text-font"]),"text-size":new Zt(Gi.layout_symbol["text-size"]),"text-max-width":new Zt(Gi.layout_symbol["text-max-width"]),"text-line-height":new it(Gi.layout_symbol["text-line-height"]),"text-letter-spacing":new Zt(Gi.layout_symbol["text-letter-spacing"]),"text-justify":new Zt(Gi.layout_symbol["text-justify"]),"text-radial-offset":new Zt(Gi.layout_symbol["text-radial-offset"]),"text-variable-anchor":new it(Gi.layout_symbol["text-variable-anchor"]),"text-anchor":new Zt(Gi.layout_symbol["text-anchor"]),"text-max-angle":new it(Gi.layout_symbol["text-max-angle"]),"text-writing-mode":new it(Gi.layout_symbol["text-writing-mode"]),"text-rotate":new Zt(Gi.layout_symbol["text-rotate"]),"text-padding":new it(Gi.layout_symbol["text-padding"]),"text-keep-upright":new it(Gi.layout_symbol["text-keep-upright"]),"text-transform":new Zt(Gi.layout_symbol["text-transform"]),"text-offset":new Zt(Gi.layout_symbol["text-offset"]),"text-allow-overlap":new it(Gi.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new it(Gi.layout_symbol["text-ignore-placement"]),"text-optional":new it(Gi.layout_symbol["text-optional"])}),zW=new ma({"icon-opacity":new Zt(Gi.paint_symbol["icon-opacity"]),"icon-color":new Zt(Gi.paint_symbol["icon-color"]),"icon-halo-color":new Zt(Gi.paint_symbol["icon-halo-color"]),"icon-halo-width":new Zt(Gi.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Zt(Gi.paint_symbol["icon-halo-blur"]),"icon-translate":new it(Gi.paint_symbol["icon-translate"]),"icon-translate-anchor":new it(Gi.paint_symbol["icon-translate-anchor"]),"text-opacity":new Zt(Gi.paint_symbol["text-opacity"]),"text-color":new Zt(Gi.paint_symbol["text-color"],{runtimeType:Is,getOverride:function(k){return k.textColor},hasOverride:function(k){return!!k.textColor}}),"text-halo-color":new Zt(Gi.paint_symbol["text-halo-color"]),"text-halo-width":new Zt(Gi.paint_symbol["text-halo-width"]),"text-halo-blur":new Zt(Gi.paint_symbol["text-halo-blur"]),"text-translate":new it(Gi.paint_symbol["text-translate"]),"text-translate-anchor":new it(Gi.paint_symbol["text-translate-anchor"])}),mA={paint:zW,layout:DW},Vg=function(C){this.type=C.property.overrides?C.property.overrides.runtimeType:il,this.defaultValue=C};Vg.prototype.evaluate=function(C){if(C.formattedSection){var H=this.defaultValue.property.overrides;if(H&&H.hasOverride(C.formattedSection))return H.getOverride(C.formattedSection)}return C.feature&&C.featureState?this.defaultValue.evaluate(C.feature,C.featureState):this.defaultValue.property.specification.default},Vg.prototype.eachChild=function(C){if(!this.defaultValue.isConstant()){var H=this.defaultValue.value;C(H._styleExpression.expression)}},Vg.prototype.outputDefined=function(){return!1},Vg.prototype.serialize=function(){return null},de("FormatSectionOverride",Vg,{omit:["defaultValue"]});var FW=function(k){function C(H){k.call(this,H,mA)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype.recalculate=function(ne,xe){if(k.prototype.recalculate.call(this,ne,xe),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 Re=this.layout.get("text-writing-mode");if(Re){for(var qe=[],pt=0,Dt=Re;pt",targetMapId:xe,sourceMapId:qe.mapId})}}},Gg.prototype.receive=function(C){var H=C.data,ne=H.id;if(ne&&!(H.targetMapId&&this.mapId!==H.targetMapId))if(H.type===""){delete this.tasks[ne];var xe=this.cancelCallbacks[ne];delete this.cancelCallbacks[ne],xe&&xe()}else le()||H.mustQueue?(this.tasks[ne]=H,this.taskQueue.push(ne),this.invoker.trigger()):this.processTask(ne,H)},Gg.prototype.process=function(){if(this.taskQueue.length){var C=this.taskQueue.shift(),H=this.tasks[C];delete this.tasks[C],this.taskQueue.length&&this.invoker.trigger(),H&&this.processTask(C,H)}},Gg.prototype.processTask=function(C,H){var ne=this;if(H.type===""){var xe=this.callbacks[C];delete this.callbacks[C],xe&&(H.error?xe(Mt(H.error)):xe(null,Mt(H.data)))}else{var Re=!1,qe=Y(this.globalScope)?void 0:[],pt=H.hasCallback?function(Zr,Vr){Re=!0,delete ne.cancelCallbacks[C],ne.target.postMessage({id:C,type:"",sourceMapId:ne.mapId,error:Zr?bt(Zr):null,data:bt(Vr,qe)},qe)}:function(Zr){Re=!0},Dt=null,Gt=Mt(H.data);if(this.parent[H.type])Dt=this.parent[H.type](H.sourceMapId,Gt,pt);else if(this.parent.getWorkerSource){var tr=H.type.split("."),Pr=this.parent.getWorkerSource(H.sourceMapId,tr[0],Gt.source);Dt=Pr[tr[1]](Gt,pt)}else pt(new Error("Could not find function "+H.type));!Re&&Dt&&Dt.cancel&&(this.cancelCallbacks[C]=Dt.cancel)}},Gg.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};function XW(k,C,H){C=Math.pow(2,H)-C-1;var ne=Dk(k*256,C*256,H),xe=Dk((k+1)*256,(C+1)*256,H);return ne[0]+","+ne[1]+","+xe[0]+","+xe[1]}function Dk(k,C,H){var ne=2*Math.PI*6378137/256/Math.pow(2,H),xe=k*ne-2*Math.PI*6378137/2,Re=C*ne-2*Math.PI*6378137/2;return[xe,Re]}var Wf=function(C,H){C&&(H?this.setSouthWest(C).setNorthEast(H):C.length===4?this.setSouthWest([C[0],C[1]]).setNorthEast([C[2],C[3]]):this.setSouthWest(C[0]).setNorthEast(C[1]))};Wf.prototype.setNorthEast=function(C){return this._ne=C instanceof Fc?new Fc(C.lng,C.lat):Fc.convert(C),this},Wf.prototype.setSouthWest=function(C){return this._sw=C instanceof Fc?new Fc(C.lng,C.lat):Fc.convert(C),this},Wf.prototype.extend=function(C){var H=this._sw,ne=this._ne,xe,Re;if(C instanceof Fc)xe=C,Re=C;else if(C instanceof Wf){if(xe=C._sw,Re=C._ne,!xe||!Re)return this}else{if(Array.isArray(C))if(C.length===4||C.every(Array.isArray)){var qe=C;return this.extend(Wf.convert(qe))}else{var pt=C;return this.extend(Fc.convert(pt))}return this}return!H&&!ne?(this._sw=new Fc(xe.lng,xe.lat),this._ne=new Fc(Re.lng,Re.lat)):(H.lng=Math.min(xe.lng,H.lng),H.lat=Math.min(xe.lat,H.lat),ne.lng=Math.max(Re.lng,ne.lng),ne.lat=Math.max(Re.lat,ne.lat)),this},Wf.prototype.getCenter=function(){return new Fc((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},Wf.prototype.getSouthWest=function(){return this._sw},Wf.prototype.getNorthEast=function(){return this._ne},Wf.prototype.getNorthWest=function(){return new Fc(this.getWest(),this.getNorth())},Wf.prototype.getSouthEast=function(){return new Fc(this.getEast(),this.getSouth())},Wf.prototype.getWest=function(){return this._sw.lng},Wf.prototype.getSouth=function(){return this._sw.lat},Wf.prototype.getEast=function(){return this._ne.lng},Wf.prototype.getNorth=function(){return this._ne.lat},Wf.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},Wf.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},Wf.prototype.isEmpty=function(){return!(this._sw&&this._ne)},Wf.prototype.contains=function(C){var H=Fc.convert(C),ne=H.lng,xe=H.lat,Re=this._sw.lat<=xe&&xe<=this._ne.lat,qe=this._sw.lng<=ne&&ne<=this._ne.lng;return this._sw.lng>this._ne.lng&&(qe=this._sw.lng>=ne&&ne>=this._ne.lng),Re&&qe},Wf.convert=function(C){return!C||C instanceof Wf?C:new Wf(C)};var zk=63710088e-1,Fc=function(C,H){if(isNaN(C)||isNaN(H))throw new Error("Invalid LngLat object: ("+C+", "+H+")");if(this.lng=+C,this.lat=+H,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};Fc.prototype.wrap=function(){return new Fc(_(this.lng,-180,180),this.lat)},Fc.prototype.toArray=function(){return[this.lng,this.lat]},Fc.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},Fc.prototype.distanceTo=function(C){var H=Math.PI/180,ne=this.lat*H,xe=C.lat*H,Re=Math.sin(ne)*Math.sin(xe)+Math.cos(ne)*Math.cos(xe)*Math.cos((C.lng-this.lng)*H),qe=zk*Math.acos(Math.min(Re,1));return qe},Fc.prototype.toBounds=function(C){C===void 0&&(C=0);var H=40075017,ne=360*C/H,xe=ne/Math.cos(Math.PI/180*this.lat);return new Wf(new Fc(this.lng-xe,this.lat-ne),new Fc(this.lng+xe,this.lat+ne))},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 ZW(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 YW(k,C){return k*Ok(yA(C))}function KW(k){return 1/Math.cos(k*Math.PI/180)}var U0=function(C,H,ne){ne===void 0&&(ne=0),this.x=+C,this.y=+H,this.z=+ne};U0.fromLngLat=function(C,H){H===void 0&&(H=0);var ne=Fc.convert(C);return new U0(Bk(ne.lng),Nk(ne.lat),Uk(H,ne.lat))},U0.prototype.toLngLat=function(){return new Fc(ZW(this.x),yA(this.y))},U0.prototype.toAltitude=function(){return YW(this.z,this.y)},U0.prototype.meterInMercatorCoordinateUnits=function(){return 1/Fk*KW(yA(this.y))};var j0=function(C,H,ne){this.z=C,this.x=H,this.y=ne,this.key=t_(0,C,C,H,ne)};j0.prototype.equals=function(C){return this.z===C.z&&this.x===C.x&&this.y===C.y},j0.prototype.url=function(C,H){var ne=XW(this.x,this.y,this.z),xe=JW(this.z,this.x,this.y);return C[(this.x+this.y)%C.length].replace("{prefix}",(this.x%16).toString(16)+(this.y%16).toString(16)).replace("{z}",String(this.z)).replace("{x}",String(this.x)).replace("{y}",String(H==="tms"?Math.pow(2,this.z)-this.y-1:this.y)).replace("{quadkey}",xe).replace("{bbox-epsg-3857}",ne)},j0.prototype.getTilePoint=function(C){var H=Math.pow(2,this.z);return new n((C.x*H-this.x)*ui,(C.y*H-this.y)*ui)},j0.prototype.toString=function(){return this.z+"/"+this.x+"/"+this.y};var jk=function(C,H){this.wrap=C,this.canonical=H,this.key=t_(C,H.z,H.z,H.x,H.y)},Xf=function(C,H,ne,xe,Re){this.overscaledZ=C,this.wrap=H,this.canonical=new j0(ne,+xe,+Re),this.key=t_(H,C,ne,xe,Re)};Xf.prototype.equals=function(C){return this.overscaledZ===C.overscaledZ&&this.wrap===C.wrap&&this.canonical.equals(C.canonical)},Xf.prototype.scaledTo=function(C){var H=this.canonical.z-C;return C>this.canonical.z?new Xf(C,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Xf(C,this.wrap,C,this.canonical.x>>H,this.canonical.y>>H)},Xf.prototype.calculateScaledKey=function(C,H){var ne=this.canonical.z-C;return C>this.canonical.z?t_(this.wrap*+H,C,this.canonical.z,this.canonical.x,this.canonical.y):t_(this.wrap*+H,C,C,this.canonical.x>>ne,this.canonical.y>>ne)},Xf.prototype.isChildOf=function(C){if(C.wrap!==this.wrap)return!1;var H=this.canonical.z-C.canonical.z;return C.overscaledZ===0||C.overscaledZ>H&&C.canonical.y===this.canonical.y>>H},Xf.prototype.children=function(C){if(this.overscaledZ>=C)return[new Xf(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var H=this.canonical.z+1,ne=this.canonical.x*2,xe=this.canonical.y*2;return[new Xf(H,this.wrap,H,ne,xe),new Xf(H,this.wrap,H,ne+1,xe),new Xf(H,this.wrap,H,ne,xe+1),new Xf(H,this.wrap,H,ne+1,xe+1)]},Xf.prototype.isLessThan=function(C){return this.wrapC.wrap?!1:this.overscaledZC.overscaledZ?!1:this.canonical.xC.canonical.x?!1:this.canonical.y0;Re--)xe=1<=this.dim+1||H<-1||H>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(H+1)*this.stride+(C+1)},Bv.prototype._unpackMapbox=function(C,H,ne){return(C*256*256+H*256+ne)/10-1e4},Bv.prototype._unpackTerrarium=function(C,H,ne){return C*256+H+ne/256-32768},Bv.prototype.getPixels=function(){return new eh({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},Bv.prototype.backfillBorder=function(C,H,ne){if(this.dim!==C.dim)throw new Error("dem dimension mismatch");var xe=H*this.dim,Re=H*this.dim+this.dim,qe=ne*this.dim,pt=ne*this.dim+this.dim;switch(H){case-1:xe=Re-1;break;case 1:Re=xe+1;break}switch(ne){case-1:qe=pt-1;break;case 1:pt=qe+1;break}for(var Dt=-H*this.dim,Gt=-ne*this.dim,tr=qe;tr=0&&Pr[3]>=0&&Dt.insert(pt,Pr[0],Pr[1],Pr[2],Pr[3])}},Nv.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new Xd.VectorTile(new mo(this.rawTileData)).layers,this.sourceLayerCoder=new vb(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},Nv.prototype.query=function(C,H,ne,xe){var Re=this;this.loadVTLayers();for(var qe=C.params||{},pt=ui/C.tileSize/C.scale,Dt=Je(qe.filter),Gt=C.queryGeometry,tr=C.queryPadding*pt,Pr=Vk(Gt),Zr=this.grid.query(Pr.minX-tr,Pr.minY-tr,Pr.maxX+tr,Pr.maxY+tr),Vr=Vk(C.cameraQueryGeometry),ua=this.grid3D.query(Vr.minX-tr,Vr.minY-tr,Vr.maxX+tr,Vr.maxY+tr,function(Tn,Vn,Nn,So){return td(C.cameraQueryGeometry,Tn-tr,Vn-tr,Nn+tr,So+tr)}),Oa=0,Mi=ua;Oaxe)Re=!1;else if(!H)Re=!0;else if(this.expirationTime=Ir.maxzoom)&&Ir.visibility!=="none"){h(xr,this.zoom,Jt);var Ur=$a[Ir.id]=Ir.createBucket({index:Ba.bucketLayerIDs.length,layers:xr,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:tn,sourceID:this.source});Ur.populate(on,Za,this.tileID.canonical),Ba.bucketLayerIDs.push(xr.map(function(la){return la.id}))}}}}var Hr,xt,Xt,vr,Or=e.mapObject(Za.glyphDependencies,function(la){return Object.keys(la).map(Number)});Object.keys(Or).length?Fr.send("getGlyphs",{uid:this.uid,stacks:Or},function(la,Ta){Hr||(Hr=la,xt=Ta,ya.call(ra))}):xt={};var ba=Object.keys(Za.iconDependencies);ba.length?Fr.send("getImages",{icons:ba,source:this.source,tileID:this.tileID,type:"icons"},function(la,Ta){Hr||(Hr=la,Xt=Ta,ya.call(ra))}):Xt={};var Pa=Object.keys(Za.patternDependencies);Pa.length?Fr.send("getImages",{icons:Pa,source:this.source,tileID:this.tileID,type:"patterns"},function(la,Ta){Hr||(Hr=la,vr=Ta,ya.call(ra))}):vr={},ya.call(this);function ya(){if(Hr)return ta(Hr);if(xt&&Xt&&vr){var la=new i(xt),Ta=new e.ImageAtlas(Xt,vr);for(var Ai in $a){var ki=$a[Ai];ki instanceof e.SymbolBucket?(h(ki.layers,this.zoom,Jt),e.performSymbolLayout(ki,xt,la.positions,Xt,Ta.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,Ta.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:Ta,glyphMap:this.returnDependencies?xt:null,iconMap:this.returnDependencies?Xt:null,glyphPositions:this.returnDependencies?la.positions:null})}}};function h(Kt,Ft,Yt){for(var Jt=new e.EvaluationParameters(Ft),Fr=0,ta=Kt;Fr=0!=!!Ft&&Kt.reverse()}var M=e.vectorTile.VectorTileFeature.prototype.toGeoJSON,g=function(Ft){this._feature=Ft,this.extent=e.EXTENT,this.type=Ft.type,this.properties=Ft.tags,"id"in Ft&&!isNaN(Ft.id)&&(this.id=parseInt(Ft.id,10))};g.prototype.loadGeometry=function(){if(this._feature.type===1){for(var Ft=[],Yt=0,Jt=this._feature.geometry;Yt"u"&&(Jt.push(ca),Ba=Jt.length-1,ta[ca]=Ba),Ft.writeVarint(Ba);var $a=Yt.properties[ca],Za=typeof $a;Za!=="string"&&Za!=="boolean"&&Za!=="number"&&($a=JSON.stringify($a));var ri=Za+":"+$a,pi=ra[ri];typeof pi>"u"&&(Fr.push($a),pi=Fr.length-1,ra[ri]=pi),Ft.writeVarint(pi)}}function $(Kt,Ft){return(Ft<<3)+(Kt&7)}function se(Kt){return Kt<<1^Kt>>31}function le(Kt,Ft){for(var Yt=Kt.loadGeometry(),Jt=Kt.type,Fr=0,ta=0,ra=Yt.length,ca=0;ca>1;Y(Kt,Ft,ra,Jt,Fr,ta%2),V(Kt,Ft,Yt,Jt,ra-1,ta+1),V(Kt,Ft,Yt,ra+1,Fr,ta+1)}}function Y(Kt,Ft,Yt,Jt,Fr,ta){for(;Fr>Jt;){if(Fr-Jt>600){var ra=Fr-Jt+1,ca=Yt-Jt+1,Ba=Math.log(ra),$a=.5*Math.exp(2*Ba/3),Za=.5*Math.sqrt(Ba*$a*(ra-$a)/ra)*(ca-ra/2<0?-1:1),ri=Math.max(Jt,Math.floor(Yt-ca*$a/ra+Za)),pi=Math.min(Fr,Math.floor(Yt+(ra-ca)*$a/ra+Za));Y(Kt,Ft,Yt,ri,pi,ta)}var Ra=Ft[2*Yt+ta],tn=Jt,on=Fr;for(ee(Kt,Ft,Jt,Yt),Ft[2*Fr+ta]>Ra&&ee(Kt,Ft,Jt,Fr);tnRa;)on--}Ft[2*Jt+ta]===Ra?ee(Kt,Ft,Jt,on):(on++,ee(Kt,Ft,on,Fr)),on<=Yt&&(Jt=on+1),Yt<=on&&(Fr=on-1)}}function ee(Kt,Ft,Yt,Jt){q(Kt,Yt,Jt),q(Ft,2*Yt,2*Jt),q(Ft,2*Yt+1,2*Jt+1)}function q(Kt,Ft,Yt){var Jt=Kt[Ft];Kt[Ft]=Kt[Yt],Kt[Yt]=Jt}function oe(Kt,Ft,Yt,Jt,Fr,ta,ra){for(var ca=[0,Kt.length-1,0],Ba=[],$a,Za;ca.length;){var ri=ca.pop(),pi=ca.pop(),Ra=ca.pop();if(pi-Ra<=ra){for(var tn=Ra;tn<=pi;tn++)$a=Ft[2*tn],Za=Ft[2*tn+1],$a>=Yt&&$a<=Fr&&Za>=Jt&&Za<=ta&&Ba.push(Kt[tn]);continue}var on=Math.floor((Ra+pi)/2);$a=Ft[2*on],Za=Ft[2*on+1],$a>=Yt&&$a<=Fr&&Za>=Jt&&Za<=ta&&Ba.push(Kt[on]);var hn=(ri+1)%2;(ri===0?Yt<=$a:Jt<=Za)&&(ca.push(Ra),ca.push(on-1),ca.push(hn)),(ri===0?Fr>=$a:ta>=Za)&&(ca.push(on+1),ca.push(pi),ca.push(hn))}return Ba}function ae(Kt,Ft,Yt,Jt,Fr,ta){for(var ra=[0,Kt.length-1,0],ca=[],Ba=Fr*Fr;ra.length;){var $a=ra.pop(),Za=ra.pop(),ri=ra.pop();if(Za-ri<=ta){for(var pi=ri;pi<=Za;pi++)j(Ft[2*pi],Ft[2*pi+1],Yt,Jt)<=Ba&&ca.push(Kt[pi]);continue}var Ra=Math.floor((ri+Za)/2),tn=Ft[2*Ra],on=Ft[2*Ra+1];j(tn,on,Yt,Jt)<=Ba&&ca.push(Kt[Ra]);var hn=($a+1)%2;($a===0?Yt-Fr<=tn:Jt-Fr<=on)&&(ra.push(ri),ra.push(Ra-1),ra.push(hn)),($a===0?Yt+Fr>=tn:Jt+Fr>=on)&&(ra.push(Ra+1),ra.push(Za),ra.push(hn))}return ca}function j(Kt,Ft,Yt,Jt){var Fr=Kt-Yt,ta=Ft-Jt;return Fr*Fr+ta*ta}var Q=function(Kt){return Kt[0]},re=function(Kt){return Kt[1]},ce=function(Ft,Yt,Jt,Fr,ta){Yt===void 0&&(Yt=Q),Jt===void 0&&(Jt=re),Fr===void 0&&(Fr=64),ta===void 0&&(ta=Float64Array),this.nodeSize=Fr,this.points=Ft;for(var ra=Ft.length<65536?Uint16Array:Uint32Array,ca=this.ids=new ra(Ft.length),Ba=this.coords=new ta(Ft.length*2),$a=0;$a=Fr;Za--){var ri=+Date.now();Ba=this._cluster(Ba,Za),this.trees[Za]=new ce(Ba,he,Oe,ra,Float32Array),Jt&&console.log("z%d: %d clusters in %dms",Za,Ba.length,+Date.now()-ri)}return Jt&&console.timeEnd("total time"),this},Ae.prototype.getClusters=function(Ft,Yt){var Jt=((Ft[0]+180)%360+360)%360-180,Fr=Math.max(-90,Math.min(90,Ft[1])),ta=Ft[2]===180?180:((Ft[2]+180)%360+360)%360-180,ra=Math.max(-90,Math.min(90,Ft[3]));if(Ft[2]-Ft[0]>=360)Jt=-180,ta=180;else if(Jt>ta){var ca=this.getClusters([Jt,Fr,180,ra],Yt),Ba=this.getClusters([-180,Fr,ta,ra],Yt);return ca.concat(Ba)}for(var $a=this.trees[this._limitZoom(Yt)],Za=$a.range(nt(Jt),rt(ra),nt(ta),rt(Fr)),ri=[],pi=0,Ra=Za;piYt&&(on+=Br.numPoints||1)}if(on>=Ba){for(var Cr=ri.x*tn,xr=ri.y*tn,Ir=ca&&tn>1?this._map(ri,!0):null,Ur=(Za<<5)+(Yt+1)+this.points.length,Hr=0,xt=Ra;Hr1)for(var ba=0,Pa=Ra;ba>5},Ae.prototype._getOriginZoom=function(Ft){return(Ft-this.points.length)%32},Ae.prototype._map=function(Ft,Yt){if(Ft.numPoints)return Yt?ye({},Ft.properties):Ft.properties;var Jt=this.points[Ft.index].properties,Fr=this.options.map(Jt);return Yt&&Fr===Jt?ye({},Fr):Fr};function De(Kt,Ft,Yt,Jt,Fr){return{x:Kt,y:Ft,zoom:1/0,id:Yt,parentId:-1,numPoints:Jt,properties:Fr}}function ze(Kt,Ft){var Yt=Kt.geometry.coordinates,Jt=Yt[0],Fr=Yt[1];return{x:nt(Jt),y:rt(Fr),zoom:1/0,index:Ft,parentId:-1}}function Ze(Kt){return{type:"Feature",id:Kt.id,properties:at(Kt),geometry:{type:"Point",coordinates:[st(Kt.x),Me(Kt.y)]}}}function at(Kt){var Ft=Kt.numPoints,Yt=Ft>=1e4?Math.round(Ft/1e3)+"k":Ft>=1e3?Math.round(Ft/100)/10+"k":Ft;return ye(ye({},Kt.properties),{cluster:!0,cluster_id:Kt.id,point_count:Ft,point_count_abbreviated:Yt})}function nt(Kt){return Kt/360+.5}function rt(Kt){var Ft=Math.sin(Kt*Math.PI/180),Yt=.5-.25*Math.log((1+Ft)/(1-Ft))/Math.PI;return Yt<0?0:Yt>1?1:Yt}function st(Kt){return(Kt-.5)*360}function Me(Kt){var Ft=(180-Kt*360)*Math.PI/180;return 360*Math.atan(Math.exp(Ft))/Math.PI-90}function ye(Kt,Ft){for(var Yt in Ft)Kt[Yt]=Ft[Yt];return Kt}function he(Kt){return Kt.x}function Oe(Kt){return Kt.y}function tt(Kt,Ft,Yt,Jt){for(var Fr=Jt,ta=Yt-Ft>>1,ra=Yt-Ft,ca,Ba=Kt[Ft],$a=Kt[Ft+1],Za=Kt[Yt],ri=Kt[Yt+1],pi=Ft+3;piFr)ca=pi,Fr=Ra;else if(Ra===Fr){var tn=Math.abs(pi-ta);tnJt&&(ca-Ft>3&&tt(Kt,Ft,ca,Jt),Kt[ca+2]=Fr,Yt-ca>3&&tt(Kt,ca,Yt,Jt))}function ot(Kt,Ft,Yt,Jt,Fr,ta){var ra=Fr-Yt,ca=ta-Jt;if(ra!==0||ca!==0){var Ba=((Kt-Yt)*ra+(Ft-Jt)*ca)/(ra*ra+ca*ca);Ba>1?(Yt=Fr,Jt=ta):Ba>0&&(Yt+=ra*Ba,Jt+=ca*Ba)}return ra=Kt-Yt,ca=Ft-Jt,ra*ra+ca*ca}function Qe(Kt,Ft,Yt,Jt){var Fr={id:typeof Kt>"u"?null:Kt,type:Ft,geometry:Yt,tags:Jt,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return Pt(Fr),Fr}function Pt(Kt){var Ft=Kt.geometry,Yt=Kt.type;if(Yt==="Point"||Yt==="MultiPoint"||Yt==="LineString")It(Kt,Ft);else if(Yt==="Polygon"||Yt==="MultiLineString")for(var Jt=0;Jt0&&(Jt?ra+=(Fr*$a-Ba*ta)/2:ra+=Math.sqrt(Math.pow(Ba-Fr,2)+Math.pow($a-ta,2))),Fr=Ba,ta=$a}var Za=Ft.length-3;Ft[2]=1,tt(Ft,0,Za,Yt),Ft[Za+2]=1,Ft.size=Math.abs(ra),Ft.start=0,Ft.end=Ft.size}function qr(Kt,Ft,Yt,Jt){for(var Fr=0;Fr1?1:Yt}function wt(Kt,Ft,Yt,Jt,Fr,ta,ra,ca){if(Yt/=Ft,Jt/=Ft,ta>=Yt&&ra=Jt)return null;for(var Ba=[],$a=0;$a=Yt&&tn=Jt)continue;var on=[];if(pi==="Point"||pi==="MultiPoint")Ne(ri,on,Yt,Jt,Fr);else if(pi==="LineString")Ke(ri,on,Yt,Jt,Fr,!1,ca.lineMetrics);else if(pi==="MultiLineString")Ie(ri,on,Yt,Jt,Fr,!1);else if(pi==="Polygon")Ie(ri,on,Yt,Jt,Fr,!0);else if(pi==="MultiPolygon")for(var hn=0;hn=Yt&&ra<=Jt&&(Ft.push(Kt[ta]),Ft.push(Kt[ta+1]),Ft.push(Kt[ta+2]))}}function Ke(Kt,Ft,Yt,Jt,Fr,ta,ra){for(var ca=Te(Kt),Ba=Fr===0?Ce:Ee,$a=Kt.start,Za,ri,pi=0;piYt&&(ri=Ba(ca,Ra,tn,hn,Tt,Yt),ra&&(ca.start=$a+Za*ri)):ut>Jt?Br=Yt&&(ri=Ba(ca,Ra,tn,hn,Tt,Yt),Cr=!0),Br>Jt&&ut<=Jt&&(ri=Ba(ca,Ra,tn,hn,Tt,Jt),Cr=!0),!ta&&Cr&&(ra&&(ca.end=$a+Za*ri),Ft.push(ca),ca=Te(Kt)),ra&&($a+=Za)}var xr=Kt.length-3;Ra=Kt[xr],tn=Kt[xr+1],on=Kt[xr+2],ut=Fr===0?Ra:tn,ut>=Yt&&ut<=Jt&&Ve(ca,Ra,tn,on),xr=ca.length-3,ta&&xr>=3&&(ca[xr]!==ca[0]||ca[xr+1]!==ca[1])&&Ve(ca,ca[0],ca[1],ca[2]),ca.length&&Ft.push(ca)}function Te(Kt){var Ft=[];return Ft.size=Kt.size,Ft.start=Kt.start,Ft.end=Kt.end,Ft}function Ie(Kt,Ft,Yt,Jt,Fr,ta){for(var ra=0;rara.maxX&&(ra.maxX=Za),ri>ra.maxY&&(ra.maxY=ri)}return ra}function rr(Kt,Ft,Yt,Jt){var Fr=Ft.geometry,ta=Ft.type,ra=[];if(ta==="Point"||ta==="MultiPoint")for(var ca=0;ca0&&Ft.size<(Fr?ra:Jt)){Yt.numPoints+=Ft.length/3;return}for(var ca=[],Ba=0;Bara)&&(Yt.numSimplified++,ca.push(Ft[Ba]),ca.push(Ft[Ba+1])),Yt.numPoints++;Fr&&Lr(ca,ta),Kt.push(ca)}function Lr(Kt,Ft){for(var Yt=0,Jt=0,Fr=Kt.length,ta=Fr-2;Jt0===Ft)for(Jt=0,Fr=Kt.length;Jt24)throw new Error("maxZoom should be in the 0-24 range");if(Ft.promoteId&&Ft.generateId)throw new Error("promoteId and generateId cannot be used together.");var Jt=qt(Kt,Ft);this.tiles={},this.tileCoords=[],Yt&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",Ft.indexMaxZoom,Ft.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),Jt=Pe(Jt,Ft),Jt.length&&this.splitTile(Jt,0,0,0),Yt&&(Jt.length&&console.log("features: %d, points: %d",this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd("generate tiles"),console.log("tiles generated:",this.total,JSON.stringify(this.stats)))}Da.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},Da.prototype.splitTile=function(Kt,Ft,Yt,Jt,Fr,ta,ra){for(var ca=[Kt,Ft,Yt,Jt],Ba=this.options,$a=Ba.debug;ca.length;){Jt=ca.pop(),Yt=ca.pop(),Ft=ca.pop(),Kt=ca.pop();var Za=1<1&&console.time("creation"),pi=this.tiles[ri]=ir(Kt,Ft,Yt,Jt,Ba),this.tileCoords.push({z:Ft,x:Yt,y:Jt}),$a)){$a>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",Ft,Yt,Jt,pi.numFeatures,pi.numPoints,pi.numSimplified),console.timeEnd("creation"));var Ra="z"+Ft;this.stats[Ra]=(this.stats[Ra]||0)+1,this.total++}if(pi.source=Kt,Fr){if(Ft===Ba.maxZoom||Ft===Fr)continue;var tn=1<1&&console.time("clipping");var on=.5*Ba.buffer/Ba.extent,hn=.5-on,Tt=.5+on,ut=1+on,Br,Cr,xr,Ir,Ur,Hr;Br=Cr=xr=Ir=null,Ur=wt(Kt,Za,Yt-on,Yt+Tt,0,pi.minX,pi.maxX,Ba),Hr=wt(Kt,Za,Yt+hn,Yt+ut,0,pi.minX,pi.maxX,Ba),Kt=null,Ur&&(Br=wt(Ur,Za,Jt-on,Jt+Tt,1,pi.minY,pi.maxY,Ba),Cr=wt(Ur,Za,Jt+hn,Jt+ut,1,pi.minY,pi.maxY,Ba),Ur=null),Hr&&(xr=wt(Hr,Za,Jt-on,Jt+Tt,1,pi.minY,pi.maxY,Ba),Ir=wt(Hr,Za,Jt+hn,Jt+ut,1,pi.minY,pi.maxY,Ba),Hr=null),$a>1&&console.timeEnd("clipping"),ca.push(Br||[],Ft+1,Yt*2,Jt*2),ca.push(Cr||[],Ft+1,Yt*2,Jt*2+1),ca.push(xr||[],Ft+1,Yt*2+1,Jt*2),ca.push(Ir||[],Ft+1,Yt*2+1,Jt*2+1)}}},Da.prototype.getTile=function(Kt,Ft,Yt){var Jt=this.options,Fr=Jt.extent,ta=Jt.debug;if(Kt<0||Kt>24)return null;var ra=1<1&&console.log("drilling down to z%d-%d-%d",Kt,Ft,Yt);for(var Ba=Kt,$a=Ft,Za=Yt,ri;!ri&&Ba>0;)Ba--,$a=Math.floor($a/2),Za=Math.floor(Za/2),ri=this.tiles[Ia(Ba,$a,Za)];return!ri||!ri.source?null:(ta>1&&console.log("found parent tile z%d-%d-%d",Ba,$a,Za),ta>1&&console.time("drilling down"),this.splitTile(ri.source,Ba,$a,Za,Kt,Ft,Yt),ta>1&&console.timeEnd("drilling down"),this.tiles[ca]?_t(this.tiles[ca],Fr):null)};function Ia(Kt,Ft,Yt){return((1<=0?0:ve.button},r.remove=function(ve){ve.parentNode&&ve.parentNode.removeChild(ve)};function p(ve,K,_e){var te,me,Ge,Le=e.browser.devicePixelRatio>1?"@2x":"",$e=e.getJSON(K.transformRequest(K.normalizeSpriteURL(ve,Le,".json"),e.ResourceType.SpriteJSON),function(wr,Nr){$e=null,Ge||(Ge=wr,te=Nr,jt())}),gt=e.getImage(K.transformRequest(K.normalizeSpriteURL(ve,Le,".png"),e.ResourceType.SpriteImage),function(wr,Nr){gt=null,Ge||(Ge=wr,me=Nr,jt())});function jt(){if(Ge)_e(Ge);else if(te&&me){var wr=e.browser.getImageData(me),Nr={};for(var pr in te){var yt=te[pr],kt=yt.width,Bt=yt.height,nr=yt.x,hr=yt.y,lr=yt.sdf,dr=yt.pixelRatio,ur=yt.stretchX,Ht=yt.stretchY,sr=yt.content,Vt=new e.RGBAImage({width:kt,height:Bt});e.RGBAImage.copy(wr,Vt,{x:nr,y:hr},{x:0,y:0},{width:kt,height:Bt}),Nr[pr]={data:Vt,pixelRatio:dr,sdf:lr,stretchX:ur,stretchY:Ht,content:sr}}_e(null,Nr)}}return{cancel:function(){$e&&($e.cancel(),$e=null),gt&&(gt.cancel(),gt=null)}}}function T(ve){var K=ve.userImage;if(K&&K.render){var _e=K.render();if(_e)return ve.data.replace(new Uint8Array(K.data.buffer)),!0}return!1}var l=1,_=function(ve){function K(){ve.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 ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.prototype),K.prototype.constructor=K,K.prototype.isLoaded=function(){return this.loaded},K.prototype.setLoaded=function(te){if(this.loaded!==te&&(this.loaded=te,te)){for(var me=0,Ge=this.requestors;me=0?1.2:1))}b.prototype.draw=function(ve){this.ctx.clearRect(0,0,this.size,this.size),this.ctx.fillText(ve,this.buffer,this.middle);for(var K=this.ctx.getImageData(0,0,this.size,this.size),_e=new Uint8ClampedArray(this.size*this.size),te=0;te65535){wr(new Error("glyphs > 65535 not supported"));return}if(yt.ranges[Bt]){wr(null,{stack:Nr,id:pr,glyph:kt});return}var nr=yt.requests[Bt];nr||(nr=yt.requests[Bt]=[],y.loadGlyphRange(Nr,Bt,te.url,te.requestManager,function(hr,lr){if(lr){for(var dr in lr)te._doesCharSupportLocalGlyph(+dr)||(yt.glyphs[+dr]=lr[+dr]);yt.ranges[Bt]=!0}for(var ur=0,Ht=nr;ur1&&(jt=K[++gt]);var Nr=Math.abs(wr-jt.left),pr=Math.abs(wr-jt.right),yt=Math.min(Nr,pr),kt=void 0,Bt=Ge/te*(me+1);if(jt.isDash){var nr=me-Math.abs(Bt);kt=Math.sqrt(yt*yt+nr*nr)}else kt=me-Math.sqrt(yt*yt+Bt*Bt);this.data[$e+wr]=Math.max(0,Math.min(255,kt+128))}},F.prototype.addRegularDash=function(K){for(var _e=K.length-1;_e>=0;--_e){var te=K[_e],me=K[_e+1];te.zeroLength?K.splice(_e,1):me&&me.isDash===te.isDash&&(me.left=te.left,K.splice(_e,1))}var Ge=K[0],Le=K[K.length-1];Ge.isDash===Le.isDash&&(Ge.left=Le.left-this.width,Le.right=Ge.right+this.width);for(var $e=this.width*this.nextRow,gt=0,jt=K[gt],wr=0;wr1&&(jt=K[++gt]);var Nr=Math.abs(wr-jt.left),pr=Math.abs(wr-jt.right),yt=Math.min(Nr,pr),kt=jt.isDash?yt:-yt;this.data[$e+wr]=Math.max(0,Math.min(255,kt+128))}},F.prototype.addDash=function(K,_e){var te=_e?7:0,me=2*te+1;if(this.nextRow+me>this.height)return e.warnOnce("LineAtlas out of space"),null;for(var Ge=0,Le=0;Le=te.minX&&K.x=te.minY&&K.y0&&(wr[new e.OverscaledTileID(te.overscaledZ,$e,me.z,Le,me.y-1).key]={backfilled:!1},wr[new e.OverscaledTileID(te.overscaledZ,te.wrap,me.z,me.x,me.y-1).key]={backfilled:!1},wr[new e.OverscaledTileID(te.overscaledZ,jt,me.z,gt,me.y-1).key]={backfilled:!1}),me.y+10&&(Ge.resourceTiming=te._resourceTiming,te._resourceTiming=[]),te.fire(new e.Event("data",Ge))})},K.prototype.onAdd=function(te){this.map=te,this.load()},K.prototype.setData=function(te){var me=this;return this._data=te,this.fire(new e.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(Ge){if(Ge){me.fire(new e.ErrorEvent(Ge));return}var Le={dataType:"source",sourceDataType:"content"};me._collectResourceTiming&&me._resourceTiming&&me._resourceTiming.length>0&&(Le.resourceTiming=me._resourceTiming,me._resourceTiming=[]),me.fire(new e.Event("data",Le))}),this},K.prototype.getClusterExpansionZoom=function(te,me){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:te,source:this.id},me),this},K.prototype.getClusterChildren=function(te,me){return this.actor.send("geojson.getClusterChildren",{clusterId:te,source:this.id},me),this},K.prototype.getClusterLeaves=function(te,me,Ge,Le){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:te,limit:me,offset:Ge},Le),this},K.prototype._updateWorkerData=function(te){var me=this;this._loaded=!1;var Ge=e.extend({},this.workerOptions),Le=this._data;typeof Le=="string"?(Ge.request=this.map._requestManager.transformRequest(e.browser.resolveURL(Le),e.ResourceType.Source),Ge.request.collectResourceTiming=this._collectResourceTiming):Ge.data=JSON.stringify(Le),this.actor.send(this.type+".loadData",Ge,function($e,gt){me._removed||gt&>.abandoned||(me._loaded=!0,gt&>.resourceTiming&>.resourceTiming[me.id]&&(me._resourceTiming=gt.resourceTiming[me.id].slice(0)),me.actor.send(me.type+".coalesce",{source:Ge.source},null),te($e))})},K.prototype.loaded=function(){return this._loaded},K.prototype.loadTile=function(te,me){var Ge=this,Le=te.actor?"reloadTile":"loadTile";te.actor=this.actor;var $e={type:this.type,uid:te.uid,tileID:te.tileID,zoom:te.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:e.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};te.request=this.actor.send(Le,$e,function(gt,jt){return delete te.request,te.unloadVectorData(),te.aborted?me(null):gt?me(gt):(te.loadVectorData(jt,Ge.map.painter,Le==="reloadTile"),me(null))})},K.prototype.abortTile=function(te){te.request&&(te.request.cancel(),delete te.request),te.aborted=!0},K.prototype.unloadTile=function(te){te.unloadVectorData(),this.actor.send("removeTile",{uid:te.uid,type:this.type,source:this.id})},K.prototype.onRemove=function(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})},K.prototype.serialize=function(){return e.extend({},this._options,{type:this.type,data:this._data})},K.prototype.hasTransition=function(){return!1},K}(e.Evented),se=e.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),le=function(ve){function K(_e,te,me,Ge){ve.call(this),this.id=_e,this.dispatcher=me,this.coordinates=te.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(Ge),this.options=te}return ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.prototype),K.prototype.constructor=K,K.prototype.load=function(te,me){var Ge=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(Le,$e){Ge._loaded=!0,Le?Ge.fire(new e.ErrorEvent(Le)):$e&&(Ge.image=$e,te&&(Ge.coordinates=te),me&&me(),Ge._finishLoading())})},K.prototype.loaded=function(){return this._loaded},K.prototype.updateImage=function(te){var me=this;return!this.image||!te.url?this:(this.options.url=te.url,this.load(te.coordinates,function(){me.texture=null}),this)},K.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new e.Event("data",{dataType:"source",sourceDataType:"metadata"})))},K.prototype.onAdd=function(te){this.map=te,this.load()},K.prototype.setCoordinates=function(te){var me=this;this.coordinates=te;var Ge=te.map(e.MercatorCoordinate.fromLngLat);this.tileID=fe(Ge),this.minzoom=this.maxzoom=this.tileID.z;var Le=Ge.map(function($e){return me.tileID.getTilePoint($e)._round()});return this._boundsArray=new e.StructArrayLayout4i8,this._boundsArray.emplaceBack(Le[0].x,Le[0].y,0,0),this._boundsArray.emplaceBack(Le[1].x,Le[1].y,e.EXTENT,0),this._boundsArray.emplaceBack(Le[3].x,Le[3].y,0,e.EXTENT),this._boundsArray.emplaceBack(Le[2].x,Le[2].y,e.EXTENT,e.EXTENT),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new e.Event("data",{dataType:"source",sourceDataType:"content"})),this},K.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||!this.image)){var te=this.map.painter.context,me=te.gl;this.boundsBuffer||(this.boundsBuffer=te.createVertexBuffer(this._boundsArray,se.members)),this.boundsSegments||(this.boundsSegments=e.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new e.Texture(te,this.image,me.RGBA),this.texture.bind(me.LINEAR,me.CLAMP_TO_EDGE));for(var Ge in this.tiles){var Le=this.tiles[Ge];Le.state!=="loaded"&&(Le.state="loaded",Le.texture=this.texture)}}},K.prototype.loadTile=function(te,me){this.tileID&&this.tileID.equals(te.tileID.canonical)?(this.tiles[String(te.tileID.wrap)]=te,te.buckets={},me(null)):(te.state="errored",me(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 fe(ve){for(var K=1/0,_e=1/0,te=-1/0,me=-1/0,Ge=0,Le=ve;Geme.end(0)?this.fire(new e.ErrorEvent(new e.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+me.start(0)+" and "+me.end(0)+"-second mark."))):this.video.currentTime=te}},K.prototype.getVideo=function(){return this.video},K.prototype.onAdd=function(te){this.map||(this.map=te,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},K.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||this.video.readyState<2)){var te=this.map.painter.context,me=te.gl;this.boundsBuffer||(this.boundsBuffer=te.createVertexBuffer(this._boundsArray,se.members)),this.boundsSegments||(this.boundsSegments=e.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(me.LINEAR,me.CLAMP_TO_EDGE),me.texSubImage2D(me.TEXTURE_2D,0,0,0,me.RGBA,me.UNSIGNED_BYTE,this.video)):(this.texture=new e.Texture(te,this.video,me.RGBA),this.texture.bind(me.LINEAR,me.CLAMP_TO_EDGE));for(var Ge in this.tiles){var Le=this.tiles[Ge];Le.state!=="loaded"&&(Le.state="loaded",Le.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}(le),Y=function(ve){function K(_e,te,me,Ge){ve.call(this,_e,te,me,Ge),te.coordinates?(!Array.isArray(te.coordinates)||te.coordinates.length!==4||te.coordinates.some(function(Le){return!Array.isArray(Le)||Le.length!==2||Le.some(function($e){return typeof $e!="number"})}))&&this.fire(new e.ErrorEvent(new e.ValidationError("sources."+_e,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new e.ErrorEvent(new e.ValidationError("sources."+_e,null,'missing required property "coordinates"'))),te.animate&&typeof te.animate!="boolean"&&this.fire(new e.ErrorEvent(new e.ValidationError("sources."+_e,null,'optional "animate" property must be a boolean value'))),te.canvas?typeof te.canvas!="string"&&!(te.canvas instanceof e.window.HTMLCanvasElement)&&this.fire(new e.ErrorEvent(new e.ValidationError("sources."+_e,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."+_e,null,'missing required property "canvas"'))),this.options=te,this.animate=te.animate!==void 0?te.animate:!0}return ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.prototype),K.prototype.constructor=K,K.prototype.load=function(){if(this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof e.window.HTMLCanvasElement?this.options.canvas:e.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()){this.fire(new e.ErrorEvent(new Error("Canvas dimensions cannot be less than or equal to zero.")));return}this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading()},K.prototype.getCanvas=function(){return this.canvas},K.prototype.onAdd=function(te){this.map=te,this.load(),this.canvas&&this.animate&&this.play()},K.prototype.onRemove=function(){this.pause()},K.prototype.prepare=function(){var te=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,te=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,te=!0),!this._hasInvalidDimensions()&&Object.keys(this.tiles).length!==0){var me=this.map.painter.context,Ge=me.gl;this.boundsBuffer||(this.boundsBuffer=me.createVertexBuffer(this._boundsArray,se.members)),this.boundsSegments||(this.boundsSegments=e.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(te||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new e.Texture(me,this.canvas,Ge.RGBA,{premultiply:!0});for(var Le in this.tiles){var $e=this.tiles[Le];$e.state!=="loaded"&&($e.state="loaded",$e.texture=this.texture)}}},K.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},K.prototype.hasTransition=function(){return this._playing},K.prototype._hasInvalidDimensions=function(){for(var te=0,me=[this.canvas.width,this.canvas.height];tethis.max){var $e=this._getAndRemoveByKey(this.order[0]);$e&&this.onRemove($e)}return this},ze.prototype.has=function(K){return K.wrapped().key in this.data},ze.prototype.getAndRemove=function(K){return this.has(K)?this._getAndRemoveByKey(K.wrapped().key):null},ze.prototype._getAndRemoveByKey=function(K){var _e=this.data[K].shift();return _e.timeout&&clearTimeout(_e.timeout),this.data[K].length===0&&delete this.data[K],this.order.splice(this.order.indexOf(K),1),_e.value},ze.prototype.getByKey=function(K){var _e=this.data[K];return _e?_e[0].value:null},ze.prototype.get=function(K){if(!this.has(K))return null;var _e=this.data[K.wrapped().key][0];return _e.value},ze.prototype.remove=function(K,_e){if(!this.has(K))return this;var te=K.wrapped().key,me=_e===void 0?0:this.data[te].indexOf(_e),Ge=this.data[te][me];return this.data[te].splice(me,1),Ge.timeout&&clearTimeout(Ge.timeout),this.data[te].length===0&&delete this.data[te],this.onRemove(Ge.value),this.order.splice(this.order.indexOf(te),1),this},ze.prototype.setMaxSize=function(K){for(this.max=K;this.order.length>this.max;){var _e=this._getAndRemoveByKey(this.order[0]);_e&&this.onRemove(_e)}return this},ze.prototype.filter=function(K){var _e=[];for(var te in this.data)for(var me=0,Ge=this.data[te];me1||(Math.abs(Nr)>1&&(Math.abs(Nr+yt)===1?Nr+=yt:Math.abs(Nr-yt)===1&&(Nr-=yt)),!(!wr.dem||!jt.dem)&&(jt.dem.backfillBorder(wr.dem,Nr,pr),jt.neighboringTiles&&jt.neighboringTiles[kt]&&(jt.neighboringTiles[kt].backfilled=!0)))}},K.prototype.getTile=function(te){return this.getTileByID(te.key)},K.prototype.getTileByID=function(te){return this._tiles[te]},K.prototype._retainLoadedChildren=function(te,me,Ge,Le){for(var $e in this._tiles){var gt=this._tiles[$e];if(!(Le[$e]||!gt.hasData()||gt.tileID.overscaledZ<=me||gt.tileID.overscaledZ>Ge)){for(var jt=gt.tileID;gt&>.tileID.overscaledZ>me+1;){var wr=gt.tileID.scaledTo(gt.tileID.overscaledZ-1);gt=this._tiles[wr.key],gt&>.hasData()&&(jt=wr)}for(var Nr=jt;Nr.overscaledZ>me;)if(Nr=Nr.scaledTo(Nr.overscaledZ-1),te[Nr.key]){Le[jt.key]=jt;break}}}},K.prototype.findLoadedParent=function(te,me){if(te.key in this._loadedParentTiles){var Ge=this._loadedParentTiles[te.key];return Ge&&Ge.tileID.overscaledZ>=me?Ge:null}for(var Le=te.overscaledZ-1;Le>=me;Le--){var $e=te.scaledTo(Le),gt=this._getLoadedTile($e);if(gt)return gt}},K.prototype._getLoadedTile=function(te){var me=this._tiles[te.key];if(me&&me.hasData())return me;var Ge=this._cache.getByKey(te.wrapped().key);return Ge},K.prototype.updateCacheSize=function(te){var me=Math.ceil(te.width/this._source.tileSize)+1,Ge=Math.ceil(te.height/this._source.tileSize)+1,Le=me*Ge,$e=5,gt=Math.floor(Le*$e),jt=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,gt):gt;this._cache.setMaxSize(jt)},K.prototype.handleWrapJump=function(te){var me=this._prevLng===void 0?te:this._prevLng,Ge=te-me,Le=Ge/360,$e=Math.round(Le);if(this._prevLng=te,$e){var gt={};for(var jt in this._tiles){var wr=this._tiles[jt];wr.tileID=wr.tileID.unwrapTo(wr.tileID.wrap+$e),gt[wr.tileID.key]=wr}this._tiles=gt;for(var Nr in this._timers)clearTimeout(this._timers[Nr]),delete this._timers[Nr];for(var pr in this._tiles){var yt=this._tiles[pr];this._setTileReloadTimer(pr,yt)}}},K.prototype.update=function(te){var me=this;if(this.transform=te,!(!this._sourceLoaded||this._paused)){this.updateCacheSize(te),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={};var Ge;this.used?this._source.tileID?Ge=te.getVisibleUnwrappedCoordinates(this._source.tileID).map(function(ga){return new e.OverscaledTileID(ga.canonical.z,ga.wrap,ga.canonical.z,ga.canonical.x,ga.canonical.y)}):(Ge=te.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(Ge=Ge.filter(function(ga){return me._source.hasTile(ga)}))):Ge=[];var Le=te.coveringZoomLevel(this._source),$e=Math.max(Le-K.maxOverzooming,this._source.minzoom),gt=Math.max(Le+K.maxUnderzooming,this._source.minzoom),jt=this._updateRetainedTiles(Ge,Le);if(Ba(this._source.type)){for(var wr={},Nr={},pr=Object.keys(jt),yt=0,kt=pr;ytthis._source.maxzoom){var lr=nr.children(this._source.maxzoom)[0],dr=this.getTile(lr);if(dr&&dr.hasData()){Ge[lr.key]=lr;continue}}else{var ur=nr.children(this._source.maxzoom);if(Ge[ur[0].key]&&Ge[ur[1].key]&&Ge[ur[2].key]&&Ge[ur[3].key])continue}for(var Ht=hr.wasRequested(),sr=nr.overscaledZ-1;sr>=$e;--sr){var Vt=nr.scaledTo(sr);if(Le[Vt.key]||(Le[Vt.key]=!0,hr=this.getTile(Vt),!hr&&Ht&&(hr=this._addTile(Vt)),hr&&(Ge[Vt.key]=Vt,Ht=hr.wasRequested(),hr.hasData())))break}}}return Ge},K.prototype._updateLoadedParentTileCache=function(){this._loadedParentTiles={};for(var te in this._tiles){for(var me=[],Ge=void 0,Le=this._tiles[te].tileID;Le.overscaledZ>0;){if(Le.key in this._loadedParentTiles){Ge=this._loadedParentTiles[Le.key];break}me.push(Le.key);var $e=Le.scaledTo(Le.overscaledZ-1);if(Ge=this._getLoadedTile($e),Ge)break;Le=$e}for(var gt=0,jt=me;gt0)&&(me.hasData()&&me.state!=="reloading"?this._cache.add(me.tileID,me,me.getExpiryTimeout()):(me.aborted=!0,this._abortTile(me),this._unloadTile(me))))},K.prototype.clearTiles=function(){this._shouldReloadOnResume=!1,this._paused=!1;for(var te in this._tiles)this._removeTile(te);this._cache.reset()},K.prototype.tilesIn=function(te,me,Ge){var Le=this,$e=[],gt=this.transform;if(!gt)return $e;for(var jt=Ge?gt.getCameraQueryGeometry(te):te,wr=te.map(function(sr){return gt.pointCoordinate(sr)}),Nr=jt.map(function(sr){return gt.pointCoordinate(sr)}),pr=this.getIds(),yt=1/0,kt=1/0,Bt=-1/0,nr=-1/0,hr=0,lr=Nr;hr=0&&vi[1].y+ga>=0){var Ga=wr.map(function(Zi){return Dr.getTilePoint(Zi)}),ai=Nr.map(function(Zi){return Dr.getTilePoint(Zi)});$e.push({tile:Vt,tileID:Dr,queryGeometry:Ga,cameraQueryGeometry:ai,scale:Jr})}}},Ht=0;Ht=e.browser.now())return!0}return!1},K.prototype.setFeatureState=function(te,me,Ge){te=te||"_geojsonTileLayer",this._state.updateState(te,me,Ge)},K.prototype.removeFeatureState=function(te,me,Ge){te=te||"_geojsonTileLayer",this._state.removeFeatureState(te,me,Ge)},K.prototype.getFeatureState=function(te,me){return te=te||"_geojsonTileLayer",this._state.getState(te,me)},K.prototype.setDependencies=function(te,me,Ge){var Le=this._tiles[te];Le&&Le.setDependencies(me,Ge)},K.prototype.reloadTilesForDependencies=function(te,me){for(var Ge in this._tiles){var Le=this._tiles[Ge];Le.hasDependency(te,me)&&this._reloadTile(Ge,"reloading")}this._cache.filter(function($e){return!$e.hasDependency(te,me)})},K}(e.Evented);ra.maxOverzooming=10,ra.maxUnderzooming=3;function ca(ve,K){var _e=Math.abs(ve.wrap*2)-+(ve.wrap<0),te=Math.abs(K.wrap*2)-+(K.wrap<0);return ve.overscaledZ-K.overscaledZ||te-_e||K.canonical.y-ve.canonical.y||K.canonical.x-ve.canonical.x}function Ba(ve){return ve==="raster"||ve==="image"||ve==="video"}function $a(){return new e.window.Worker(Co.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?(me-Le)/$e:0;return this.points[Ge].mult(1-gt).add(this.points[_e].mult(gt))};var la=function(K,_e,te){var me=this.boxCells=[],Ge=this.circleCells=[];this.xCellCount=Math.ceil(K/te),this.yCellCount=Math.ceil(_e/te);for(var Le=0;Lethis.width||me<0||_e>this.height)return Ge?!1:[];var $e=[];if(K<=0&&_e<=0&&this.width<=te&&this.height<=me){if(Ge)return!0;for(var gt=0;gt0:$e}},la.prototype._queryCircle=function(K,_e,te,me,Ge){var Le=K-te,$e=K+te,gt=_e-te,jt=_e+te;if($e<0||Le>this.width||jt<0||gt>this.height)return me?!1:[];var wr=[],Nr={hitTest:me,circle:{x:K,y:_e,radius:te},seenUids:{box:{},circle:{}}};return this._forEachCell(Le,gt,$e,jt,this._queryCellCircle,wr,Nr,Ge),me?wr.length>0:wr},la.prototype.query=function(K,_e,te,me,Ge){return this._query(K,_e,te,me,!1,Ge)},la.prototype.hitTest=function(K,_e,te,me,Ge){return this._query(K,_e,te,me,!0,Ge)},la.prototype.hitTestCircle=function(K,_e,te,me){return this._queryCircle(K,_e,te,!0,me)},la.prototype._queryCell=function(K,_e,te,me,Ge,Le,$e,gt){var jt=$e.seenUids,wr=this.boxCells[Ge];if(wr!==null)for(var Nr=this.bboxes,pr=0,yt=wr;pr=Nr[Bt+0]&&me>=Nr[Bt+1]&&(!gt||gt(this.boxKeys[kt]))){if($e.hitTest)return Le.push(!0),!0;Le.push({key:this.boxKeys[kt],x1:Nr[Bt],y1:Nr[Bt+1],x2:Nr[Bt+2],y2:Nr[Bt+3]})}}}var nr=this.circleCells[Ge];if(nr!==null)for(var hr=this.circles,lr=0,dr=nr;lr$e*$e+gt*gt},la.prototype._circleAndRectCollide=function(K,_e,te,me,Ge,Le,$e){var gt=(Le-me)/2,jt=Math.abs(K-(me+gt));if(jt>gt+te)return!1;var wr=($e-Ge)/2,Nr=Math.abs(_e-(Ge+wr));if(Nr>wr+te)return!1;if(jt<=gt||Nr<=wr)return!0;var pr=jt-gt,yt=Nr-wr;return pr*pr+yt*yt<=te*te};function Ta(ve,K,_e,te,me){var Ge=e.create();return K?(e.scale(Ge,Ge,[1/me,1/me,1]),_e||e.rotateZ(Ge,Ge,te.angle)):e.multiply(Ge,te.labelPlaneMatrix,ve),Ge}function Ai(ve,K,_e,te,me){if(K){var Ge=e.clone(ve);return e.scale(Ge,Ge,[me,me,1]),_e||e.rotateZ(Ge,Ge,-te.angle),Ge}else return te.glCoordMatrix}function ki(ve,K){var _e=[ve.x,ve.y,0,1];Oo(_e,_e,K);var te=_e[3];return{point:new e.Point(_e[0]/te,_e[1]/te),signedDistanceFromCamera:te}}function Ki(ve,K){return .5+.5*(ve/K)}function _n(ve,K){var _e=ve[0]/ve[3],te=ve[1]/ve[3],me=_e>=-K[0]&&_e<=K[0]&&te>=-K[1]&&te<=K[1];return me}function Rn(ve,K,_e,te,me,Ge,Le,$e){var gt=te?ve.textSizeData:ve.iconSizeData,jt=e.evaluateSizeForZoom(gt,_e.transform.zoom),wr=[256/_e.width*2+1,256/_e.height*2+1],Nr=te?ve.text.dynamicLayoutVertexArray:ve.icon.dynamicLayoutVertexArray;Nr.clear();for(var pr=ve.lineVertexArray,yt=te?ve.text.placedSymbolArray:ve.icon.placedSymbolArray,kt=_e.transform.width/_e.transform.height,Bt=!1,nr=0;nrGe)return{useVertical:!0}}return(ve===e.WritingMode.vertical?K.y<_e.y:K.x>_e.x)?{needsFlipping:!0}:null}function no(ve,K,_e,te,me,Ge,Le,$e,gt,jt,wr,Nr,pr,yt){var kt=K/24,Bt=ve.lineOffsetX*kt,nr=ve.lineOffsetY*kt,hr;if(ve.numGlyphs>1){var lr=ve.glyphStartIndex+ve.numGlyphs,dr=ve.lineStartIndex,ur=ve.lineStartIndex+ve.lineLength,Ht=En(kt,$e,Bt,nr,_e,wr,Nr,ve,gt,Ge,pr);if(!Ht)return{notEnoughRoom:!0};var sr=ki(Ht.first.point,Le).point,Vt=ki(Ht.last.point,Le).point;if(te&&!_e){var Dr=On(ve.writingMode,sr,Vt,yt);if(Dr)return Dr}hr=[Ht.first];for(var Jr=ve.glyphStartIndex+1;Jr0?ai.point:cn(Nr,Ga,ga,1,me),Fi=On(ve.writingMode,ga,Zi,yt);if(Fi)return Fi}var ui=lo(kt*$e.getoffsetX(ve.glyphStartIndex),Bt,nr,_e,wr,Nr,ve.segment,ve.lineStartIndex,ve.lineStartIndex+ve.lineLength,gt,Ge,pr);if(!ui)return{notEnoughRoom:!0};hr=[ui]}for(var _i=0,Si=hr;_i0?1:-1,kt=0;te&&(yt*=-1,kt=Math.PI),yt<0&&(kt+=Math.PI);for(var Bt=yt>0?$e+Le:$e+Le+1,nr=me,hr=me,lr=0,dr=0,ur=Math.abs(pr),Ht=[];lr+dr<=ur;){if(Bt+=yt,Bt<$e||Bt>=gt)return null;if(hr=nr,Ht.push(nr),nr=Nr[Bt],nr===void 0){var sr=new e.Point(jt.getx(Bt),jt.gety(Bt)),Vt=ki(sr,wr);if(Vt.signedDistanceFromCamera>0)nr=Nr[Bt]=Vt.point;else{var Dr=Bt-yt,Jr=lr===0?Ge:new e.Point(jt.getx(Dr),jt.gety(Dr));nr=cn(Jr,sr,hr,ur-lr+1,wr)}}lr+=dr,dr=hr.dist(nr)}var ga=(ur-lr)/dr,vi=nr.sub(hr),Ga=vi.mult(ga)._add(hr);Ga._add(vi._unit()._perp()._mult(_e*yt));var ai=kt+Math.atan2(nr.y-hr.y,nr.x-hr.x);return Ht.push(Ga),{point:Ga,angle:ai,path:Ht}}var Wo=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function hs(ve,K){for(var _e=0;_e=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(gt){var Bo=Si.map(function(Lp){return ki(Lp,gt)});Bo.some(function(Lp){return Lp.signedDistanceFromCamera<=0})?Si=[]:Si=Bo.map(function(Lp){return Lp.point})}var Ps=[];if(Si.length>0){for(var Do=Si[0].clone(),Ms=Si[0].clone(),Ys=1;Ys=ai.x&&Ms.x<=Zi.x&&Do.y>=ai.y&&Ms.y<=Zi.y?Ps=[Si]:Ms.xZi.x||Ms.yZi.y?Ps=[]:Ps=e.clipLine([Si],ai.x,ai.y,Zi.x,Zi.y)}for(var mu=0,Ep=Ps;mu=this.screenRightBoundary||methis.screenBottomBoundary},No.prototype.isInsideGrid=function(K,_e,te,me){return te>=0&&K=0&&_e0){var ur;return this.prevPlacement&&this.prevPlacement.variableOffsets[pr.crossTileID]&&this.prevPlacement.placements[pr.crossTileID]&&this.prevPlacement.placements[pr.crossTileID].text&&(ur=this.prevPlacement.variableOffsets[pr.crossTileID].anchor),this.variableOffsets[pr.crossTileID]={textOffset:nr,width:te,height:me,anchor:K,textBoxScale:Ge,prevAnchor:ur},this.markUsedJustification(yt,K,pr,kt),yt.allowVerticalPlacement&&(this.markUsedOrientation(yt,kt,pr),this.placedOrientations[pr.crossTileID]=kt),{shift:hr,placedGlyphBoxes:lr}}},Xo.prototype.placeLayerBucketPart=function(K,_e,te){var me=this,Ge=K.parameters,Le=Ge.bucket,$e=Ge.layout,gt=Ge.posMatrix,jt=Ge.textLabelPlaneMatrix,wr=Ge.labelToScreenMatrix,Nr=Ge.textPixelRatio,pr=Ge.holdingForFade,yt=Ge.collisionBoxArray,kt=Ge.partiallyEvaluatedTextSize,Bt=Ge.collisionGroup,nr=$e.get("text-optional"),hr=$e.get("icon-optional"),lr=$e.get("text-allow-overlap"),dr=$e.get("icon-allow-overlap"),ur=$e.get("text-rotation-alignment")==="map",Ht=$e.get("text-pitch-alignment")==="map",sr=$e.get("icon-text-fit")!=="none",Vt=$e.get("symbol-z-order")==="viewport-y",Dr=lr&&(dr||!Le.hasIconData()||hr),Jr=dr&&(lr||!Le.hasTextData()||nr);!Le.collisionArrays&&yt&&Le.deserializeCollisionBoxes(yt);var ga=function(ui,_i){if(!_e[ui.crossTileID]){if(pr){me.placements[ui.crossTileID]=new uo(!1,!1,!1);return}var Si=!1,Ui=!1,fn=!0,_o=null,Bo={box:null,offscreen:null},Ps={box:null,offscreen:null},Do=null,Ms=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 fu=e.WritingMode.horizontal;if(Le.allowVerticalPlacement&&!cc&&me.prevPlacement){var Dh=me.prevPlacement.placedOrientations[ui.crossTileID];Dh&&(me.placedOrientations[ui.crossTileID]=Dh,fu=Dh,me.markUsedOrientation(Le,fu,ui))}return fu},qd=function(cc,fu){if(Le.allowVerticalPlacement&&ui.numVerticalGlyphVertices>0&&_i.verticalTextBox)for(var Dh=0,Iv=Le.writingModes;Dh0&&(Kh=Kh.filter(function(cc){return cc!==Rh.anchor}),Kh.unshift(Rh.anchor))}var Cp=function(cc,fu,Dh){for(var Iv=cc.x2-cc.x1,sm=cc.y2-cc.y1,Mu=ui.textBoxScale,w0=sr&&!dr?fu:null,sv={box:[],offscreen:!1},xg=lr?Kh.length*2:Kh.length,Pp=0;Pp=Kh.length,T0=me.attemptAnchorPlacement(lv,cc,Iv,sm,Mu,ur,Ht,Nr,gt,Bt,bg,ui,Le,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,fu=Bo&&Bo.box&&Bo.box.length;return Le.allowVerticalPlacement&&!fu&&ui.numVerticalGlyphVertices>0&&cc?Cp(cc,_i.verticalIconBox,e.WritingMode.vertical):{box:null,offscreen:null}};qd(Vp,Lp),Bo&&(Si=Bo.box,fn=Bo.offscreen);var Cv=qp(Bo&&Bo.box);if(!Si&&me.prevPlacement){var Vd=me.prevPlacement.variableOffsets[ui.crossTileID];Vd&&(me.variableOffsets[ui.crossTileID]=Vd,me.markUsedJustification(Le,Vd.anchor,ui,Cv))}}else{var ed=function(cc,fu){var Dh=me.collisionIndex.placeCollisionBox(cc,lr,Nr,gt,Bt.predicate);return Dh&&Dh.box&&Dh.box.length&&(me.markUsedOrientation(Le,fu,ui),me.placedOrientations[ui.crossTileID]=fu),Dh},Ih=function(){return ed(Ph,e.WritingMode.horizontal)},td=function(){var cc=_i.verticalTextBox;return Le.allowVerticalPlacement&&ui.numVerticalGlyphVertices>0&&cc?ed(cc,e.WritingMode.vertical):{box:null,offscreen:null}};qd(Ih,td),qp(Bo&&Bo.box&&Bo.box.length)}}if(Do=Bo,Si=Do&&Do.box&&Do.box.length>0,fn=Do&&Do.offscreen,ui.useRuntimeCollisionCircles){var Gf=Le.text.placedSymbolArray.get(ui.centerJustifiedTextSymbolIndex),Gd=e.evaluateSizeForFeature(Le.textSizeData,kt,Gf),Lv=$e.get("text-padding"),ph=ui.collisionCircleDiameter;Ms=me.collisionIndex.placeCollisionCircles(lr,Gf,Le.lineVertexArray,Le.glyphOffsetArray,Gd,gt,jt,wr,te,Ht,Bt.predicate,ph,Lv),Si=lr||Ms.circles.length>0&&!Ms.collisionDetected,fn=fn&&Ms.offscreen}if(_i.iconFeatureIndex&&(kp=_i.iconFeatureIndex),_i.iconBox){var iv=function(cc){var fu=sr&&_o?Ks(cc,_o.x,_o.y,ur,Ht,me.transform.angle):cc;return me.collisionIndex.placeCollisionBox(fu,dr,Nr,gt,Bt.predicate)};Ps&&Ps.box&&Ps.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 nm=nr||ui.numHorizontalGlyphVertices===0&&ui.numVerticalGlyphVertices===0,om=hr||ui.numIconVertices===0;if(!nm&&!om?Ui=Si=Ui&&Si:om?nm||(Ui=Ui&&Si):Si=Ui&&Si,Si&&Do&&Do.box&&(Ps&&Ps.box&&Ep?me.collisionIndex.insertCollisionBox(Do.box,$e.get("text-ignore-placement"),Le.bucketInstanceId,Ep,Bt.ID):me.collisionIndex.insertCollisionBox(Do.box,$e.get("text-ignore-placement"),Le.bucketInstanceId,mu,Bt.ID)),Ui&&Ys&&me.collisionIndex.insertCollisionBox(Ys.box,$e.get("icon-ignore-placement"),Le.bucketInstanceId,kp,Bt.ID),Ms&&(Si&&me.collisionIndex.insertCollisionCircles(Ms.circles,$e.get("text-ignore-placement"),Le.bucketInstanceId,mu,Bt.ID),te)){var Pv=Le.bucketInstanceId,nv=me.collisionCircleArrays[Pv];nv===void 0&&(nv=me.collisionCircleArrays[Pv]=new jn);for(var ov=0;ov=0;--Ga){var ai=vi[Ga];ga(Le.symbolInstances.get(ai),Le.collisionArrays[ai])}else for(var Zi=K.symbolInstanceStart;Zi=0&&(Le>=0&&wr!==Le?K.text.placedSymbolArray.get(wr).crossTileID=0:K.text.placedSymbolArray.get(wr).crossTileID=te.crossTileID)}},Xo.prototype.markUsedOrientation=function(K,_e,te){for(var me=_e===e.WritingMode.horizontal||_e===e.WritingMode.horizontalOnly?_e:0,Ge=_e===e.WritingMode.vertical?_e:0,Le=[te.leftJustifiedTextSymbolIndex,te.centerJustifiedTextSymbolIndex,te.rightJustifiedTextSymbolIndex],$e=0,gt=Le;$e0||Ht>0,ga=dr.numIconVertices>0,vi=me.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?xn:Zi;kt(K.text,ur,Fi);var ui=ai?xn:Zi;kt(K.text,Ht,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=me.variableOffsets[dr.crossTileID];Si&&me.markUsedJustification(K,Si.anchor,dr,vi);var Ui=me.placedOrientations[dr.crossTileID];Ui&&(me.markUsedJustification(K,"left",dr,Ui),me.markUsedOrientation(K,Ui,dr))}if(ga){var fn=il(Dr.icon),_o=!(pr&&dr.verticalPlacedIconSymbolIndex&&Ga);if(dr.placedIconSymbolIndex>=0){var Bo=_o?fn:xn;kt(K.icon,dr.numIconVertices,Bo),K.icon.placedSymbolArray.get(dr.placedIconSymbolIndex).hidden=Dr.icon.isHidden()}if(dr.verticalPlacedIconSymbolIndex>=0){var Ps=_o?xn:fn;kt(K.icon,dr.numVerticalIconVertices,Ps),K.icon.placedSymbolArray.get(dr.verticalPlacedIconSymbolIndex).hidden=Dr.icon.isHidden()}}if(K.hasIconCollisionBoxData()||K.hasTextCollisionBoxData()){var Do=K.collisionArrays[lr];if(Do){var Ms=new e.Point(0,0);if(Do.textBox||Do.verticalTextBox){var Ys=!0;if(jt){var mu=me.variableOffsets[sr];mu?(Ms=Cs(mu.anchor,mu.width,mu.height,mu.textOffset,mu.textBoxScale),wr&&Ms._rotate(Nr?me.transform.angle:-me.transform.angle)):Ys=!1}Do.textBox&&Gi(K.textCollisionBox.collisionVertexArray,Dr.text.placed,!Ys||Ga,Ms.x,Ms.y),Do.verticalTextBox&&Gi(K.textCollisionBox.collisionVertexArray,Dr.text.placed,!Ys||ai,Ms.x,Ms.y)}var Ep=!!(!ai&&Do.verticalIconBox);Do.iconBox&&Gi(K.iconCollisionBox.collisionVertexArray,Dr.icon.placed,Ep,pr?Ms.x:0,pr?Ms.y:0),Do.verticalIconBox&&Gi(K.iconCollisionBox.collisionVertexArray,Dr.icon.placed,!Ep,pr?Ms.x:0,pr?Ms.y:0)}}},nr=0;nrK},Xo.prototype.setStale=function(){this.stale=!0};function Gi(ve,K,_e,te,me){ve.emplaceBack(K?1:0,_e?1:0,te||0,me||0),ve.emplaceBack(K?1:0,_e?1:0,te||0,me||0),ve.emplaceBack(K?1:0,_e?1:0,te||0,me||0),ve.emplaceBack(K?1:0,_e?1:0,te||0,me||0)}var Ln=Math.pow(2,25),Us=Math.pow(2,24),_s=Math.pow(2,17),Gn=Math.pow(2,16),zs=Math.pow(2,9),vs=Math.pow(2,8),Ws=Math.pow(2,1);function il(ve){if(ve.opacity===0&&!ve.placed)return 0;if(ve.opacity===1&&ve.placed)return 4294967295;var K=ve.placed?1:0,_e=Math.floor(ve.opacity*127);return _e*Ln+K*Us+_e*_s+K*Gn+_e*zs+K*vs+_e*Ws+K}var xn=0,ko=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=[]};ko.prototype.continuePlacement=function(K,_e,te,me,Ge){for(var Le=this._bucketParts;this._currentTileIndex2};this._currentPlacementIndex>=0;){var $e=K[this._currentPlacementIndex],gt=_e[$e],jt=this.placement.collisionIndex.transform.zoom;if(gt.type==="symbol"&&(!gt.minzoom||gt.minzoom<=jt)&&(!gt.maxzoom||gt.maxzoom>jt)){this._inProgressLayer||(this._inProgressLayer=new ko(gt));var wr=this._inProgressLayer.continuePlacement(te[gt.source],this.placement,this._showCollisionBoxes,gt,Le);if(wr)return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},bo.prototype.commit=function(K){return this.placement.commit(K),this.placement};var Is=512/e.EXTENT/2,pu=function(K,_e,te){this.tileID=K,this.indexedSymbolInstances={},this.bucketInstanceId=te;for(var me=0;me<_e.length;me++){var Ge=_e.get(me),Le=Ge.key;this.indexedSymbolInstances[Le]||(this.indexedSymbolInstances[Le]=[]),this.indexedSymbolInstances[Le].push({crossTileID:Ge.crossTileID,coord:this.getScaledCoordinates(Ge,K)})}};pu.prototype.getScaledCoordinates=function(K,_e){var te=_e.canonical.z-this.tileID.canonical.z,me=Is/Math.pow(2,te);return{x:Math.floor((_e.canonical.x*e.EXTENT+K.anchorX)*me),y:Math.floor((_e.canonical.y*e.EXTENT+K.anchorY)*me)}},pu.prototype.findMatches=function(K,_e,te){for(var me=this.tileID.canonical.z<_e.canonical.z?1:Math.pow(2,this.tileID.canonical.z-_e.canonical.z),Ge=0;GeK.overscaledZ)for(var jt in gt){var wr=gt[jt];wr.tileID.isChildOf(K)&&wr.findMatches(_e.symbolInstances,K,Le)}else{var Nr=K.scaledTo(Number($e)),pr=gt[Nr.key];pr&&pr.findMatches(_e.symbolInstances,K,Le)}}for(var yt=0;yt<_e.symbolInstances.length;yt++){var kt=_e.symbolInstances.get(yt);kt.crossTileID||(kt.crossTileID=te.generate(),Le[kt.crossTileID]=!0)}return this.indexes[K.overscaledZ]===void 0&&(this.indexes[K.overscaledZ]={}),this.indexes[K.overscaledZ][K.key]=new pu(K,_e.symbolInstances,_e.bucketInstanceId),!0},Vs.prototype.removeBucketCrossTileIDs=function(K,_e){for(var te in _e.indexedSymbolInstances)for(var me=0,Ge=_e.indexedSymbolInstances[te];me0)throw new Error("Unimplemented: "+Le.map(function($e){return $e.command}).join(", ")+".");return Ge.forEach(function($e){$e.command!=="setTransition"&&me[$e.command].apply(me,$e.args)}),this.stylesheet=te,!0},K.prototype.addImage=function(te,me){if(this.getImage(te))return this.fire(new e.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(te,me),this._afterImageUpdated(te)},K.prototype.updateImage=function(te,me){this.imageManager.updateImage(te,me)},K.prototype.getImage=function(te){return this.imageManager.getImage(te)},K.prototype.removeImage=function(te){if(!this.getImage(te))return this.fire(new e.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(te),this._afterImageUpdated(te)},K.prototype._afterImageUpdated=function(te){this._availableImages=this.imageManager.listImages(),this._changedImages[te]=!0,this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new e.Event("data",{dataType:"style"}))},K.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},K.prototype.addSource=function(te,me,Ge){var Le=this;if(Ge===void 0&&(Ge={}),this._checkLoaded(),this.sourceCaches[te]!==void 0)throw new Error("There is already a source with this ID");if(!me.type)throw new Error("The type property must be defined, but only the following properties were given: "+Object.keys(me).join(", ")+".");var $e=["vector","raster","geojson","video","image"],gt=$e.indexOf(me.type)>=0;if(!(gt&&this._validate(e.validateStyle.source,"sources."+te,me,null,Ge))){this.map&&this.map._collectResourceTiming&&(me.collectResourceTiming=!0);var jt=this.sourceCaches[te]=new ra(te,me,this.dispatcher);jt.style=this,jt.setEventedParent(this,function(){return{isSourceLoaded:Le.loaded(),source:jt.serialize(),sourceId:te}}),jt.onAdd(this.map),this._changed=!0}},K.prototype.removeSource=function(te){if(this._checkLoaded(),this.sourceCaches[te]===void 0)throw new Error("There is no source with this ID");for(var me in this._layers)if(this._layers[me].source===te)return this.fire(new e.ErrorEvent(new Error('Source "'+te+'" cannot be removed while layer "'+me+'" is using it.')));var Ge=this.sourceCaches[te];delete this.sourceCaches[te],delete this._updatedSources[te],Ge.fire(new e.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:te})),Ge.setEventedParent(null),Ge.clearTiles(),Ge.onRemove&&Ge.onRemove(this.map),this._changed=!0},K.prototype.setGeoJSONSourceData=function(te,me){this._checkLoaded();var Ge=this.sourceCaches[te].getSource();Ge.setData(me),this._changed=!0},K.prototype.getSource=function(te){return this.sourceCaches[te]&&this.sourceCaches[te].getSource()},K.prototype.addLayer=function(te,me,Ge){Ge===void 0&&(Ge={}),this._checkLoaded();var Le=te.id;if(this.getLayer(Le)){this.fire(new e.ErrorEvent(new Error('Layer with id "'+Le+'" already exists on this map')));return}var $e;if(te.type==="custom"){if(Ts(this,e.validateCustomStyleLayer(te)))return;$e=e.createStyleLayer(te)}else{if(typeof te.source=="object"&&(this.addSource(Le,te.source),te=e.clone$1(te),te=e.extend(te,{source:Le})),this._validate(e.validateStyle.layer,"layers."+Le,te,{arrayIndex:-1},Ge))return;$e=e.createStyleLayer(te),this._validateLayer($e),$e.setEventedParent(this,{layer:{id:Le}}),this._serializedLayers[$e.id]=$e.serialize()}var gt=me?this._order.indexOf(me):this._order.length;if(me&>===-1){this.fire(new e.ErrorEvent(new Error('Layer with id "'+me+'" does not exist on this map.')));return}if(this._order.splice(gt,0,Le),this._layerOrderChanged=!0,this._layers[Le]=$e,this._removedLayers[Le]&&$e.source&&$e.type!=="custom"){var jt=this._removedLayers[Le];delete this._removedLayers[Le],jt.type!==$e.type?this._updatedSources[$e.source]="clear":(this._updatedSources[$e.source]="reload",this.sourceCaches[$e.source].pause())}this._updateLayer($e),$e.onAdd&&$e.onAdd(this.map)},K.prototype.moveLayer=function(te,me){this._checkLoaded(),this._changed=!0;var Ge=this._layers[te];if(!Ge){this.fire(new e.ErrorEvent(new Error("The layer '"+te+"' does not exist in the map's style and cannot be moved.")));return}if(te!==me){var Le=this._order.indexOf(te);this._order.splice(Le,1);var $e=me?this._order.indexOf(me):this._order.length;if(me&&$e===-1){this.fire(new e.ErrorEvent(new Error('Layer with id "'+me+'" does not exist on this map.')));return}this._order.splice($e,0,te),this._layerOrderChanged=!0}},K.prototype.removeLayer=function(te){this._checkLoaded();var me=this._layers[te];if(!me){this.fire(new e.ErrorEvent(new Error("The layer '"+te+"' does not exist in the map's style and cannot be removed.")));return}me.setEventedParent(null);var Ge=this._order.indexOf(te);this._order.splice(Ge,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[te]=me,delete this._layers[te],delete this._serializedLayers[te],delete this._updatedLayers[te],delete this._updatedPaintProps[te],me.onRemove&&me.onRemove(this.map)},K.prototype.getLayer=function(te){return this._layers[te]},K.prototype.hasLayer=function(te){return te in this._layers},K.prototype.setLayerZoomRange=function(te,me,Ge){this._checkLoaded();var Le=this.getLayer(te);if(!Le){this.fire(new e.ErrorEvent(new Error("The layer '"+te+"' does not exist in the map's style and cannot have zoom extent.")));return}Le.minzoom===me&&Le.maxzoom===Ge||(me!=null&&(Le.minzoom=me),Ge!=null&&(Le.maxzoom=Ge),this._updateLayer(Le))},K.prototype.setFilter=function(te,me,Ge){Ge===void 0&&(Ge={}),this._checkLoaded();var Le=this.getLayer(te);if(!Le){this.fire(new e.ErrorEvent(new Error("The layer '"+te+"' does not exist in the map's style and cannot be filtered.")));return}if(!e.deepEqual(Le.filter,me)){if(me==null){Le.filter=void 0,this._updateLayer(Le);return}this._validate(e.validateStyle.filter,"layers."+Le.id+".filter",me,null,Ge)||(Le.filter=e.clone$1(me),this._updateLayer(Le))}},K.prototype.getFilter=function(te){return e.clone$1(this.getLayer(te).filter)},K.prototype.setLayoutProperty=function(te,me,Ge,Le){Le===void 0&&(Le={}),this._checkLoaded();var $e=this.getLayer(te);if(!$e){this.fire(new e.ErrorEvent(new Error("The layer '"+te+"' does not exist in the map's style and cannot be styled.")));return}e.deepEqual($e.getLayoutProperty(me),Ge)||($e.setLayoutProperty(me,Ge,Le),this._updateLayer($e))},K.prototype.getLayoutProperty=function(te,me){var Ge=this.getLayer(te);if(!Ge){this.fire(new e.ErrorEvent(new Error("The layer '"+te+"' does not exist in the map's style.")));return}return Ge.getLayoutProperty(me)},K.prototype.setPaintProperty=function(te,me,Ge,Le){Le===void 0&&(Le={}),this._checkLoaded();var $e=this.getLayer(te);if(!$e){this.fire(new e.ErrorEvent(new Error("The layer '"+te+"' does not exist in the map's style and cannot be styled.")));return}if(!e.deepEqual($e.getPaintProperty(me),Ge)){var gt=$e.setPaintProperty(me,Ge,Le);gt&&this._updateLayer($e),this._changed=!0,this._updatedPaintProps[te]=!0}},K.prototype.getPaintProperty=function(te,me){return this.getLayer(te).getPaintProperty(me)},K.prototype.setFeatureState=function(te,me){this._checkLoaded();var Ge=te.source,Le=te.sourceLayer,$e=this.sourceCaches[Ge];if($e===void 0){this.fire(new e.ErrorEvent(new Error("The source '"+Ge+"' does not exist in the map's style.")));return}var gt=$e.getSource().type;if(gt==="geojson"&&Le){this.fire(new e.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter.")));return}if(gt==="vector"&&!Le){this.fire(new e.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}te.id===void 0&&this.fire(new e.ErrorEvent(new Error("The feature id parameter must be provided."))),$e.setFeatureState(Le,te.id,me)},K.prototype.removeFeatureState=function(te,me){this._checkLoaded();var Ge=te.source,Le=this.sourceCaches[Ge];if(Le===void 0){this.fire(new e.ErrorEvent(new Error("The source '"+Ge+"' does not exist in the map's style.")));return}var $e=Le.getSource().type,gt=$e==="vector"?te.sourceLayer:void 0;if($e==="vector"&&!gt){this.fire(new e.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}if(me&&typeof te.id!="string"&&typeof te.id!="number"){this.fire(new e.ErrorEvent(new Error("A feature id is required to remove its specific state property.")));return}Le.removeFeatureState(gt,te.id,me)},K.prototype.getFeatureState=function(te){this._checkLoaded();var me=te.source,Ge=te.sourceLayer,Le=this.sourceCaches[me];if(Le===void 0){this.fire(new e.ErrorEvent(new Error("The source '"+me+"' does not exist in the map's style.")));return}var $e=Le.getSource().type;if($e==="vector"&&!Ge){this.fire(new e.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}return te.id===void 0&&this.fire(new e.ErrorEvent(new Error("The feature id parameter must be provided."))),Le.getFeatureState(Ge,te.id)},K.prototype.getTransition=function(){return e.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},K.prototype.serialize=function(){return e.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:e.mapObject(this.sourceCaches,function(te){return te.serialize()}),layers:this._serializeLayers(this._order)},function(te){return te!==void 0})},K.prototype._updateLayer=function(te){this._updatedLayers[te.id]=!0,te.source&&!this._updatedSources[te.source]&&this.sourceCaches[te.source].getSource().type!=="raster"&&(this._updatedSources[te.source]="reload",this.sourceCaches[te.source].pause()),this._changed=!0},K.prototype._flattenAndSortRenderedFeatures=function(te){for(var me=this,Ge=function(ai){return me._layers[ai].type==="fill-extrusion"},Le={},$e=[],gt=this._order.length-1;gt>=0;gt--){var jt=this._order[gt];if(Ge(jt)){Le[jt]=gt;for(var wr=0,Nr=te;wr=0;lr--){var dr=this._order[lr];if(Ge(dr))for(var ur=$e.length-1;ur>=0;ur--){var Ht=$e[ur].feature;if(Le[Ht.layer.id] 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}`,$l=`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting; #pragma mapbox: define lowp float base #pragma mapbox: define lowp float height #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to #pragma mapbox: define lowp float pixel_ratio_from #pragma mapbox: define lowp float pixel_ratio_to void main() { #pragma mapbox: initialize lowp float base #pragma mapbox: initialize lowp float height #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_to #pragma mapbox: initialize lowp float pixel_ratio_from #pragma mapbox: initialize lowp float pixel_ratio_to vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,Jf=`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting; #pragma mapbox: define lowp float base #pragma mapbox: define lowp float height #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to #pragma mapbox: define lowp float pixel_ratio_from #pragma mapbox: define lowp float pixel_ratio_to void main() { #pragma mapbox: initialize lowp float base #pragma mapbox: initialize lowp float height #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_to #pragma mapbox: initialize lowp float pixel_ratio_from #pragma mapbox: initialize lowp float pixel_ratio_to vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0 ? a_pos : vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}`,Of=`#ifdef GL_ES precision highp float; #endif uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/pow(2.0,exaggeration+(19.2562-u_zoom));gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,of="uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}",jc=`uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent; #define PI 3.141592653589793 void main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,Bf="uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}",Nf=`uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale; #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);gl_FragColor=color*(alpha*opacity); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,Gu=` #define scale 0.015873016 attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar; #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define mediump float gapwidth #pragma mapbox: define lowp float offset #pragma mapbox: define mediump float width void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump float gapwidth #pragma mapbox: initialize lowp float offset #pragma mapbox: initialize mediump float width float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}`,Ef=`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp vec2 v_uv; #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture2D(u_image,v_uv);gl_FragColor=color*(alpha*opacity); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,oc=` #define scale 0.015873016 attribute vec2 a_pos_normal;attribute vec4 a_data;attribute float a_uv_x;attribute float a_split_index;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp vec2 v_uv; #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define mediump float gapwidth #pragma mapbox: define lowp float offset #pragma mapbox: define mediump float width void main() { #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump float gapwidth #pragma mapbox: initialize lowp float offset #pragma mapbox: initialize mediump float width float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}`,Xc=`uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width; #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to #pragma mapbox: define lowp float pixel_ratio_from #pragma mapbox: define lowp float pixel_ratio_to #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_to #pragma mapbox: initialize lowp float pixel_ratio_from #pragma mapbox: initialize lowp float pixel_ratio_to #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,Ql=` #define scale 0.015873016 #define LINE_DISTANCE_SCALE 2.0 attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width; #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp float offset #pragma mapbox: define mediump float gapwidth #pragma mapbox: define mediump float width #pragma mapbox: define lowp float floorwidth #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to #pragma mapbox: define lowp float pixel_ratio_from #pragma mapbox: define lowp float pixel_ratio_to void main() { #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize lowp float offset #pragma mapbox: initialize mediump float gapwidth #pragma mapbox: initialize mediump float width #pragma mapbox: initialize lowp float floorwidth #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_to #pragma mapbox: initialize lowp float pixel_ratio_from #pragma mapbox: initialize lowp float pixel_ratio_to float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`,qc=`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale; #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define mediump float width #pragma mapbox: define lowp float floorwidth void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump float width #pragma mapbox: initialize lowp float floorwidth float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,Sc=` #define scale 0.015873016 #define LINE_DISTANCE_SCALE 2.0 attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale; #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define mediump float gapwidth #pragma mapbox: define lowp float offset #pragma mapbox: define mediump float width #pragma mapbox: define lowp float floorwidth void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump float gapwidth #pragma mapbox: initialize lowp float offset #pragma mapbox: initialize mediump float width #pragma mapbox: initialize lowp float floorwidth float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}`,Zs=`uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,kf="uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}",fh=`uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity; #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize lowp float opacity lowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,Uf=`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;varying vec2 v_tex;varying float v_fade_opacity; #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize lowp float opacity vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? camera_to_anchor_distance/u_camera_to_center_distance : u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0),0.0,1.0);v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;v_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));}`,Zc=`#define SDF_PX 8.0 uniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1; #pragma mapbox: define highp vec4 fill_color #pragma mapbox: define highp vec4 halo_color #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp float halo_width #pragma mapbox: define lowp float halo_blur void main() { #pragma mapbox: initialize highp vec4 fill_color #pragma mapbox: initialize highp vec4 halo_color #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize lowp float halo_width #pragma mapbox: initialize lowp float halo_blur float EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,$f=`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;varying vec2 v_data0;varying vec3 v_data1; #pragma mapbox: define highp vec4 fill_color #pragma mapbox: define highp vec4 halo_color #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp float halo_width #pragma mapbox: define lowp float halo_blur void main() { #pragma mapbox: initialize highp vec4 fill_color #pragma mapbox: initialize highp vec4 halo_color #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize lowp float halo_width #pragma mapbox: initialize lowp float halo_blur vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? camera_to_anchor_distance/u_camera_to_center_distance : u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}`,Cu=`#define SDF_PX 8.0 #define SDF 1.0 #define ICON 0.0 uniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;varying vec4 v_data0;varying vec4 v_data1; #pragma mapbox: define highp vec4 fill_color #pragma mapbox: define highp vec4 halo_color #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp float halo_width #pragma mapbox: define lowp float halo_blur void main() { #pragma mapbox: initialize highp vec4 fill_color #pragma mapbox: initialize highp vec4 halo_color #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize lowp float halo_width #pragma mapbox: initialize lowp float halo_blur float fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif return;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,jf=`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;varying vec4 v_data0;varying vec4 v_data1; #pragma mapbox: define highp vec4 fill_color #pragma mapbox: define highp vec4 halo_color #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp float halo_width #pragma mapbox: define lowp float halo_blur void main() { #pragma mapbox: initialize highp vec4 fill_color #pragma mapbox: initialize highp vec4 halo_color #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize lowp float halo_width #pragma mapbox: initialize lowp float halo_blur vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? camera_to_anchor_distance/u_camera_to_center_distance : u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}`,yl=hl(Tc,du),Lu=hl(Sf,Uc),Mc=hl(Fs,dc),ol=hl(Hc,lu),vc=hl(Pl,ic),yu=hl(Ou,nl),Tu=hl(ml,xs),El=hl(Xs,nc),qf=hl(Ul,qu),Qf=hl(fl,xh),Bu=hl(ns,bh),Ec=hl(Es,to),mc=hl(Wc,Vu),Lh=hl(jl,Mf),sf=hl(Ac,nf),vf=hl($l,Jf),Nu=hl(Of,of),lf=hl(jc,Bf),au=hl(Nf,Gu),Yc=hl(Ef,oc),hh=hl(Xc,Ql),mf=hl(qc,Sc),sl=hl(Zs,kf),_u=hl(fh,Uf),Pu=hl(Zc,$f),Cf=hl(Cu,jf);function hl(ve,K){var _e=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,te=K.match(/attribute ([\w]+) ([\w]+)/g),me=ve.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),Ge=K.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),Le=Ge?Ge.concat(me):me,$e={};return ve=ve.replace(_e,function(gt,jt,wr,Nr,pr){return $e[pr]=!0,jt==="define"?` #ifndef HAS_UNIFORM_u_`+pr+` varying `+wr+" "+Nr+" "+pr+`; #else uniform `+wr+" "+Nr+" u_"+pr+`; #endif `:` #ifdef HAS_UNIFORM_u_`+pr+` `+wr+" "+Nr+" "+pr+" = u_"+pr+`; #endif `}),K=K.replace(_e,function(gt,jt,wr,Nr,pr){var yt=Nr==="float"?"vec2":"vec4",kt=pr.match(/color/)?"color":yt;return $e[pr]?jt==="define"?` #ifndef HAS_UNIFORM_u_`+pr+` uniform lowp float u_`+pr+`_t; attribute `+wr+" "+yt+" a_"+pr+`; varying `+wr+" "+Nr+" "+pr+`; #else uniform `+wr+" "+Nr+" u_"+pr+`; #endif `:kt==="vec4"?` #ifndef HAS_UNIFORM_u_`+pr+` `+pr+" = a_"+pr+`; #else `+wr+" "+Nr+" "+pr+" = u_"+pr+`; #endif `:` #ifndef HAS_UNIFORM_u_`+pr+` `+pr+" = unpack_mix_"+kt+"(a_"+pr+", u_"+pr+`_t); #else `+wr+" "+Nr+" "+pr+" = u_"+pr+`; #endif `:jt==="define"?` #ifndef HAS_UNIFORM_u_`+pr+` uniform lowp float u_`+pr+`_t; attribute `+wr+" "+yt+" a_"+pr+`; #else uniform `+wr+" "+Nr+" u_"+pr+`; #endif `:kt==="vec4"?` #ifndef HAS_UNIFORM_u_`+pr+` `+wr+" "+Nr+" "+pr+" = a_"+pr+`; #else `+wr+" "+Nr+" "+pr+" = u_"+pr+`; #endif `:` #ifndef HAS_UNIFORM_u_`+pr+` `+wr+" "+Nr+" "+pr+" = unpack_mix_"+kt+"(a_"+pr+", u_"+pr+`_t); #else `+wr+" "+Nr+" "+pr+" = u_"+pr+`; #endif `}),{fragmentSource:ve,vertexSource:K,staticAttributes:te,staticUniforms:Le}}var uf=Object.freeze({__proto__:null,prelude:yl,background:Lu,backgroundPattern:Mc,circle:ol,clippingMask:vc,heatmap:yu,heatmapTexture:Tu,collisionBox:El,collisionCircle:qf,debug:Qf,fill:Bu,fillOutline:Ec,fillOutlinePattern:mc,fillPattern:Lh,fillExtrusion:sf,fillExtrusionPattern:vf,hillshadePrepare:Nu,hillshade:lf,line:au,lineGradient:Yc,linePattern:hh,lineSDF:mf,raster:sl,symbolIcon:_u,symbolSDF:Pu,symbolTextAndIcon:Cf}),kc=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};kc.prototype.bind=function(K,_e,te,me,Ge,Le,$e,gt){this.context=K;for(var jt=this.boundPaintVertexBuffers.length!==me.length,wr=0;!jt&&wr>16,$e>>16],u_pixel_coord_lower:[Le&65535,$e&65535]}}function Kc(ve,K,_e,te){var me=_e.imageManager.getPattern(ve.from.toString()),Ge=_e.imageManager.getPattern(ve.to.toString()),Le=_e.imageManager.getPixelSize(),$e=Le.width,gt=Le.height,jt=Math.pow(2,te.tileID.overscaledZ),wr=te.tileSize*Math.pow(2,_e.transform.tileZoom)/jt,Nr=wr*(te.tileID.canonical.x+te.tileID.wrap*jt),pr=wr*te.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:me.tl,u_pattern_br_a:me.br,u_pattern_tl_b:Ge.tl,u_pattern_br_b:Ge.br,u_texsize:[$e,gt],u_mix:K.t,u_pattern_size_a:me.displaySize,u_pattern_size_b:Ge.displaySize,u_scale_a:K.fromScale,u_scale_b:K.toScale,u_tile_units_to_pixels:1/as(te,1,_e.transform.tileZoom),u_pixel_coord_upper:[Nr>>16,pr>>16],u_pixel_coord_lower:[Nr&65535,pr&65535]}}var Lf=function(ve,K){return{u_matrix:new e.UniformMatrix4f(ve,K.u_matrix),u_lightpos:new e.Uniform3f(ve,K.u_lightpos),u_lightintensity:new e.Uniform1f(ve,K.u_lightintensity),u_lightcolor:new e.Uniform3f(ve,K.u_lightcolor),u_vertical_gradient:new e.Uniform1f(ve,K.u_vertical_gradient),u_opacity:new e.Uniform1f(ve,K.u_opacity)}},iu=function(ve,K){return{u_matrix:new e.UniformMatrix4f(ve,K.u_matrix),u_lightpos:new e.Uniform3f(ve,K.u_lightpos),u_lightintensity:new e.Uniform1f(ve,K.u_lightintensity),u_lightcolor:new e.Uniform3f(ve,K.u_lightcolor),u_vertical_gradient:new e.Uniform1f(ve,K.u_vertical_gradient),u_height_factor:new e.Uniform1f(ve,K.u_height_factor),u_image:new e.Uniform1i(ve,K.u_image),u_texsize:new e.Uniform2f(ve,K.u_texsize),u_pixel_coord_upper:new e.Uniform2f(ve,K.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(ve,K.u_pixel_coord_lower),u_scale:new e.Uniform3f(ve,K.u_scale),u_fade:new e.Uniform1f(ve,K.u_fade),u_opacity:new e.Uniform1f(ve,K.u_opacity)}},Vf=function(ve,K,_e,te){var me=K.style.light,Ge=me.properties.get("position"),Le=[Ge.x,Ge.y,Ge.z],$e=e.create$1();me.properties.get("anchor")==="viewport"&&e.fromRotation($e,-K.transform.angle),e.transformMat3(Le,Le,$e);var gt=me.properties.get("color");return{u_matrix:ve,u_lightpos:Le,u_lightintensity:me.properties.get("intensity"),u_lightcolor:[gt.r,gt.g,gt.b],u_vertical_gradient:+_e,u_opacity:te}},Xu=function(ve,K,_e,te,me,Ge,Le){return e.extend(Vf(ve,K,_e,te),Wu(Ge,K,Le),{u_height_factor:-Math.pow(2,me.overscaledZ)/Le.tileSize/8})},Cc=function(ve,K){return{u_matrix:new e.UniformMatrix4f(ve,K.u_matrix)}},gc=function(ve,K){return{u_matrix:new e.UniformMatrix4f(ve,K.u_matrix),u_image:new e.Uniform1i(ve,K.u_image),u_texsize:new e.Uniform2f(ve,K.u_texsize),u_pixel_coord_upper:new e.Uniform2f(ve,K.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(ve,K.u_pixel_coord_lower),u_scale:new e.Uniform3f(ve,K.u_scale),u_fade:new e.Uniform1f(ve,K.u_fade)}},ql=function(ve,K){return{u_matrix:new e.UniformMatrix4f(ve,K.u_matrix),u_world:new e.Uniform2f(ve,K.u_world)}},xu=function(ve,K){return{u_matrix:new e.UniformMatrix4f(ve,K.u_matrix),u_world:new e.Uniform2f(ve,K.u_world),u_image:new e.Uniform1i(ve,K.u_image),u_texsize:new e.Uniform2f(ve,K.u_texsize),u_pixel_coord_upper:new e.Uniform2f(ve,K.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(ve,K.u_pixel_coord_lower),u_scale:new e.Uniform3f(ve,K.u_scale),u_fade:new e.Uniform1f(ve,K.u_fade)}},Lc=function(ve){return{u_matrix:ve}},Jc=function(ve,K,_e,te){return e.extend(Lc(ve),Wu(_e,K,te))},sc=function(ve,K){return{u_matrix:ve,u_world:K}},Pc=function(ve,K,_e,te,me){return e.extend(Jc(ve,K,_e,te),{u_world:me})},Qt=function(ve,K){return{u_camera_to_center_distance:new e.Uniform1f(ve,K.u_camera_to_center_distance),u_scale_with_map:new e.Uniform1i(ve,K.u_scale_with_map),u_pitch_with_map:new e.Uniform1i(ve,K.u_pitch_with_map),u_extrude_scale:new e.Uniform2f(ve,K.u_extrude_scale),u_device_pixel_ratio:new e.Uniform1f(ve,K.u_device_pixel_ratio),u_matrix:new e.UniformMatrix4f(ve,K.u_matrix)}},br=function(ve,K,_e,te){var me=ve.transform,Ge,Le;if(te.paint.get("circle-pitch-alignment")==="map"){var $e=as(_e,1,me.zoom);Ge=!0,Le=[$e,$e]}else Ge=!1,Le=me.pixelsToGLUnits;return{u_camera_to_center_distance:me.cameraToCenterDistance,u_scale_with_map:+(te.paint.get("circle-pitch-scale")==="map"),u_matrix:ve.translatePosMatrix(K.posMatrix,_e,te.paint.get("circle-translate"),te.paint.get("circle-translate-anchor")),u_pitch_with_map:+Ge,u_device_pixel_ratio:e.browser.devicePixelRatio,u_extrude_scale:Le}},aa=function(ve,K){return{u_matrix:new e.UniformMatrix4f(ve,K.u_matrix),u_camera_to_center_distance:new e.Uniform1f(ve,K.u_camera_to_center_distance),u_pixels_to_tile_units:new e.Uniform1f(ve,K.u_pixels_to_tile_units),u_extrude_scale:new e.Uniform2f(ve,K.u_extrude_scale),u_overscale_factor:new e.Uniform1f(ve,K.u_overscale_factor)}},$r=function(ve,K){return{u_matrix:new e.UniformMatrix4f(ve,K.u_matrix),u_inv_matrix:new e.UniformMatrix4f(ve,K.u_inv_matrix),u_camera_to_center_distance:new e.Uniform1f(ve,K.u_camera_to_center_distance),u_viewport_size:new e.Uniform2f(ve,K.u_viewport_size)}},ka=function(ve,K,_e){var te=as(_e,1,K.zoom),me=Math.pow(2,K.zoom-_e.tileID.overscaledZ),Ge=_e.tileID.overscaleFactor();return{u_matrix:ve,u_camera_to_center_distance:K.cameraToCenterDistance,u_pixels_to_tile_units:te,u_extrude_scale:[K.pixelsToGLUnits[0]/(te*me),K.pixelsToGLUnits[1]/(te*me)],u_overscale_factor:Ge}},li=function(ve,K,_e){return{u_matrix:ve,u_inv_matrix:K,u_camera_to_center_distance:_e.cameraToCenterDistance,u_viewport_size:[_e.width,_e.height]}},Ci=function(ve,K){return{u_color:new e.UniformColor(ve,K.u_color),u_matrix:new e.UniformMatrix4f(ve,K.u_matrix),u_overlay:new e.Uniform1i(ve,K.u_overlay),u_overlay_scale:new e.Uniform1f(ve,K.u_overlay_scale)}},Hi=function(ve,K,_e){return _e===void 0&&(_e=1),{u_matrix:ve,u_color:K,u_overlay:0,u_overlay_scale:_e}},Qi=function(ve,K){return{u_matrix:new e.UniformMatrix4f(ve,K.u_matrix)}},dn=function(ve){return{u_matrix:ve}},Pi=function(ve,K){return{u_extrude_scale:new e.Uniform1f(ve,K.u_extrude_scale),u_intensity:new e.Uniform1f(ve,K.u_intensity),u_matrix:new e.UniformMatrix4f(ve,K.u_matrix)}},Di=function(ve,K){return{u_matrix:new e.UniformMatrix4f(ve,K.u_matrix),u_world:new e.Uniform2f(ve,K.u_world),u_image:new e.Uniform1i(ve,K.u_image),u_color_ramp:new e.Uniform1i(ve,K.u_color_ramp),u_opacity:new e.Uniform1f(ve,K.u_opacity)}},Ni=function(ve,K,_e,te){return{u_matrix:ve,u_extrude_scale:as(K,1,_e),u_intensity:te}},mi=function(ve,K,_e,te){var me=e.create();e.ortho(me,0,ve.width,ve.height,0,0,1);var Ge=ve.context.gl;return{u_matrix:me,u_world:[Ge.drawingBufferWidth,Ge.drawingBufferHeight],u_image:_e,u_color_ramp:te,u_opacity:K.paint.get("heatmap-opacity")}},Mn=function(ve,K){return{u_matrix:new e.UniformMatrix4f(ve,K.u_matrix),u_image:new e.Uniform1i(ve,K.u_image),u_latrange:new e.Uniform2f(ve,K.u_latrange),u_light:new e.Uniform2f(ve,K.u_light),u_shadow:new e.UniformColor(ve,K.u_shadow),u_highlight:new e.UniformColor(ve,K.u_highlight),u_accent:new e.UniformColor(ve,K.u_accent)}},Qn=function(ve,K){return{u_matrix:new e.UniformMatrix4f(ve,K.u_matrix),u_image:new e.Uniform1i(ve,K.u_image),u_dimension:new e.Uniform2f(ve,K.u_dimension),u_zoom:new e.Uniform1f(ve,K.u_zoom),u_unpack:new e.Uniform4f(ve,K.u_unpack)}},ao=function(ve,K,_e){var te=_e.paint.get("hillshade-shadow-color"),me=_e.paint.get("hillshade-highlight-color"),Ge=_e.paint.get("hillshade-accent-color"),Le=_e.paint.get("hillshade-illumination-direction")*(Math.PI/180);_e.paint.get("hillshade-illumination-anchor")==="viewport"&&(Le-=ve.transform.angle);var $e=!ve.options.moving;return{u_matrix:ve.transform.calculatePosMatrix(K.tileID.toUnwrapped(),$e),u_image:0,u_latrange:fo(ve,K.tileID),u_light:[_e.paint.get("hillshade-exaggeration"),Le],u_shadow:te,u_highlight:me,u_accent:Ge}},eo=function(ve,K){var _e=K.stride,te=e.create();return e.ortho(te,0,e.EXTENT,-e.EXTENT,0,0,1),e.translate(te,te,[0,-e.EXTENT,0]),{u_matrix:te,u_image:1,u_dimension:[_e,_e],u_zoom:ve.overscaledZ,u_unpack:K.getUnpackVector()}};function fo(ve,K){var _e=Math.pow(2,K.canonical.z),te=K.canonical.y;return[new e.MercatorCoordinate(0,te/_e).toLngLat().lat,new e.MercatorCoordinate(0,(te+1)/_e).toLngLat().lat]}var An=function(ve,K){return{u_matrix:new e.UniformMatrix4f(ve,K.u_matrix),u_ratio:new e.Uniform1f(ve,K.u_ratio),u_device_pixel_ratio:new e.Uniform1f(ve,K.u_device_pixel_ratio),u_units_to_pixels:new e.Uniform2f(ve,K.u_units_to_pixels)}},un=function(ve,K){return{u_matrix:new e.UniformMatrix4f(ve,K.u_matrix),u_ratio:new e.Uniform1f(ve,K.u_ratio),u_device_pixel_ratio:new e.Uniform1f(ve,K.u_device_pixel_ratio),u_units_to_pixels:new e.Uniform2f(ve,K.u_units_to_pixels),u_image:new e.Uniform1i(ve,K.u_image),u_image_height:new e.Uniform1f(ve,K.u_image_height)}},yo=function(ve,K){return{u_matrix:new e.UniformMatrix4f(ve,K.u_matrix),u_texsize:new e.Uniform2f(ve,K.u_texsize),u_ratio:new e.Uniform1f(ve,K.u_ratio),u_device_pixel_ratio:new e.Uniform1f(ve,K.u_device_pixel_ratio),u_image:new e.Uniform1i(ve,K.u_image),u_units_to_pixels:new e.Uniform2f(ve,K.u_units_to_pixels),u_scale:new e.Uniform3f(ve,K.u_scale),u_fade:new e.Uniform1f(ve,K.u_fade)}},Ko=function(ve,K){return{u_matrix:new e.UniformMatrix4f(ve,K.u_matrix),u_ratio:new e.Uniform1f(ve,K.u_ratio),u_device_pixel_ratio:new e.Uniform1f(ve,K.u_device_pixel_ratio),u_units_to_pixels:new e.Uniform2f(ve,K.u_units_to_pixels),u_patternscale_a:new e.Uniform2f(ve,K.u_patternscale_a),u_patternscale_b:new e.Uniform2f(ve,K.u_patternscale_b),u_sdfgamma:new e.Uniform1f(ve,K.u_sdfgamma),u_image:new e.Uniform1i(ve,K.u_image),u_tex_y_a:new e.Uniform1f(ve,K.u_tex_y_a),u_tex_y_b:new e.Uniform1f(ve,K.u_tex_y_b),u_mix:new e.Uniform1f(ve,K.u_mix)}},Ss=function(ve,K,_e){var te=ve.transform;return{u_matrix:Fl(ve,K,_e),u_ratio:1/as(K,1,te.zoom),u_device_pixel_ratio:e.browser.devicePixelRatio,u_units_to_pixels:[1/te.pixelsToGLUnits[0],1/te.pixelsToGLUnits[1]]}},rl=function(ve,K,_e,te){return e.extend(Ss(ve,K,_e),{u_image:0,u_image_height:te})},Os=function(ve,K,_e,te){var me=ve.transform,Ge=bs(K,me);return{u_matrix:Fl(ve,K,_e),u_texsize:K.imageAtlasTexture.size,u_ratio:1/as(K,1,me.zoom),u_device_pixel_ratio:e.browser.devicePixelRatio,u_image:0,u_scale:[Ge,te.fromScale,te.toScale],u_fade:te.t,u_units_to_pixels:[1/me.pixelsToGLUnits[0],1/me.pixelsToGLUnits[1]]}},el=function(ve,K,_e,te,me){var Ge=ve.transform,Le=ve.lineAtlas,$e=bs(K,Ge),gt=_e.layout.get("line-cap")==="round",jt=Le.getDash(te.from,gt),wr=Le.getDash(te.to,gt),Nr=jt.width*me.fromScale,pr=wr.width*me.toScale;return e.extend(Ss(ve,K,_e),{u_patternscale_a:[$e/Nr,-jt.height/2],u_patternscale_b:[$e/pr,-wr.height/2],u_sdfgamma:Le.width/(Math.min(Nr,pr)*256*e.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:jt.y,u_tex_y_b:wr.y,u_mix:me.t})};function bs(ve,K){return 1/as(ve,1,K.tileZoom)}function Fl(ve,K,_e){return ve.translatePosMatrix(K.tileID.posMatrix,K,_e.paint.get("line-translate"),_e.paint.get("line-translate-anchor"))}var _l=function(ve,K){return{u_matrix:new e.UniformMatrix4f(ve,K.u_matrix),u_tl_parent:new e.Uniform2f(ve,K.u_tl_parent),u_scale_parent:new e.Uniform1f(ve,K.u_scale_parent),u_buffer_scale:new e.Uniform1f(ve,K.u_buffer_scale),u_fade_t:new e.Uniform1f(ve,K.u_fade_t),u_opacity:new e.Uniform1f(ve,K.u_opacity),u_image0:new e.Uniform1i(ve,K.u_image0),u_image1:new e.Uniform1i(ve,K.u_image1),u_brightness_low:new e.Uniform1f(ve,K.u_brightness_low),u_brightness_high:new e.Uniform1f(ve,K.u_brightness_high),u_saturation_factor:new e.Uniform1f(ve,K.u_saturation_factor),u_contrast_factor:new e.Uniform1f(ve,K.u_contrast_factor),u_spin_weights:new e.Uniform3f(ve,K.u_spin_weights)}},ll=function(ve,K,_e,te,me){return{u_matrix:ve,u_tl_parent:K,u_scale_parent:_e,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:Js(me.paint.get("raster-saturation")),u_contrast_factor:Lo(me.paint.get("raster-contrast")),u_spin_weights:Un(me.paint.get("raster-hue-rotate"))}};function Un(ve){ve*=Math.PI/180;var K=Math.sin(ve),_e=Math.cos(ve);return[(2*_e+1)/3,(-Math.sqrt(3)*K-_e+1)/3,(Math.sqrt(3)*K-_e+1)/3]}function Lo(ve){return ve>0?1/(1-ve):1+ve}function Js(ve){return ve>0?1-1/(1.001-ve):-ve}var Rs=function(ve,K){return{u_is_size_zoom_constant:new e.Uniform1i(ve,K.u_is_size_zoom_constant),u_is_size_feature_constant:new e.Uniform1i(ve,K.u_is_size_feature_constant),u_size_t:new e.Uniform1f(ve,K.u_size_t),u_size:new e.Uniform1f(ve,K.u_size),u_camera_to_center_distance:new e.Uniform1f(ve,K.u_camera_to_center_distance),u_pitch:new e.Uniform1f(ve,K.u_pitch),u_rotate_symbol:new e.Uniform1i(ve,K.u_rotate_symbol),u_aspect_ratio:new e.Uniform1f(ve,K.u_aspect_ratio),u_fade_change:new e.Uniform1f(ve,K.u_fade_change),u_matrix:new e.UniformMatrix4f(ve,K.u_matrix),u_label_plane_matrix:new e.UniformMatrix4f(ve,K.u_label_plane_matrix),u_coord_matrix:new e.UniformMatrix4f(ve,K.u_coord_matrix),u_is_text:new e.Uniform1i(ve,K.u_is_text),u_pitch_with_map:new e.Uniform1i(ve,K.u_pitch_with_map),u_texsize:new e.Uniform2f(ve,K.u_texsize),u_texture:new e.Uniform1i(ve,K.u_texture)}},uu=function(ve,K){return{u_is_size_zoom_constant:new e.Uniform1i(ve,K.u_is_size_zoom_constant),u_is_size_feature_constant:new e.Uniform1i(ve,K.u_is_size_feature_constant),u_size_t:new e.Uniform1f(ve,K.u_size_t),u_size:new e.Uniform1f(ve,K.u_size),u_camera_to_center_distance:new e.Uniform1f(ve,K.u_camera_to_center_distance),u_pitch:new e.Uniform1f(ve,K.u_pitch),u_rotate_symbol:new e.Uniform1i(ve,K.u_rotate_symbol),u_aspect_ratio:new e.Uniform1f(ve,K.u_aspect_ratio),u_fade_change:new e.Uniform1f(ve,K.u_fade_change),u_matrix:new e.UniformMatrix4f(ve,K.u_matrix),u_label_plane_matrix:new e.UniformMatrix4f(ve,K.u_label_plane_matrix),u_coord_matrix:new e.UniformMatrix4f(ve,K.u_coord_matrix),u_is_text:new e.Uniform1i(ve,K.u_is_text),u_pitch_with_map:new e.Uniform1i(ve,K.u_pitch_with_map),u_texsize:new e.Uniform2f(ve,K.u_texsize),u_texture:new e.Uniform1i(ve,K.u_texture),u_gamma_scale:new e.Uniform1f(ve,K.u_gamma_scale),u_device_pixel_ratio:new e.Uniform1f(ve,K.u_device_pixel_ratio),u_is_halo:new e.Uniform1i(ve,K.u_is_halo)}},Iu=function(ve,K){return{u_is_size_zoom_constant:new e.Uniform1i(ve,K.u_is_size_zoom_constant),u_is_size_feature_constant:new e.Uniform1i(ve,K.u_is_size_feature_constant),u_size_t:new e.Uniform1f(ve,K.u_size_t),u_size:new e.Uniform1f(ve,K.u_size),u_camera_to_center_distance:new e.Uniform1f(ve,K.u_camera_to_center_distance),u_pitch:new e.Uniform1f(ve,K.u_pitch),u_rotate_symbol:new e.Uniform1i(ve,K.u_rotate_symbol),u_aspect_ratio:new e.Uniform1f(ve,K.u_aspect_ratio),u_fade_change:new e.Uniform1f(ve,K.u_fade_change),u_matrix:new e.UniformMatrix4f(ve,K.u_matrix),u_label_plane_matrix:new e.UniformMatrix4f(ve,K.u_label_plane_matrix),u_coord_matrix:new e.UniformMatrix4f(ve,K.u_coord_matrix),u_is_text:new e.Uniform1i(ve,K.u_is_text),u_pitch_with_map:new e.Uniform1i(ve,K.u_pitch_with_map),u_texsize:new e.Uniform2f(ve,K.u_texsize),u_texsize_icon:new e.Uniform2f(ve,K.u_texsize_icon),u_texture:new e.Uniform1i(ve,K.u_texture),u_texture_icon:new e.Uniform1i(ve,K.u_texture_icon),u_gamma_scale:new e.Uniform1f(ve,K.u_gamma_scale),u_device_pixel_ratio:new e.Uniform1f(ve,K.u_device_pixel_ratio),u_is_halo:new e.Uniform1i(ve,K.u_is_halo)}},Zu=function(ve,K,_e,te,me,Ge,Le,$e,gt,jt){var wr=me.transform;return{u_is_size_zoom_constant:+(ve==="constant"||ve==="source"),u_is_size_feature_constant:+(ve==="constant"||ve==="camera"),u_size_t:K?K.uSizeT:0,u_size:K?K.uSize:0,u_camera_to_center_distance:wr.cameraToCenterDistance,u_pitch:wr.pitch/360*2*Math.PI,u_rotate_symbol:+_e,u_aspect_ratio:wr.width/wr.height,u_fade_change:me.options.fadeDuration?me.symbolFadeChange:1,u_matrix:Ge,u_label_plane_matrix:Le,u_coord_matrix:$e,u_is_text:+gt,u_pitch_with_map:+te,u_texsize:jt,u_texture:0}},Ic=function(ve,K,_e,te,me,Ge,Le,$e,gt,jt,wr){var Nr=me.transform;return e.extend(Zu(ve,K,_e,te,me,Ge,Le,$e,gt,jt),{u_gamma_scale:te?Math.cos(Nr._pitch)*Nr.cameraToCenterDistance:1,u_device_pixel_ratio:e.browser.devicePixelRatio,u_is_halo:+wr})},bu=function(ve,K,_e,te,me,Ge,Le,$e,gt,jt){return e.extend(Ic(ve,K,_e,te,me,Ge,Le,$e,!0,gt,!0),{u_texsize_icon:jt,u_texture_icon:1})},Rc=function(ve,K){return{u_matrix:new e.UniformMatrix4f(ve,K.u_matrix),u_opacity:new e.Uniform1f(ve,K.u_opacity),u_color:new e.UniformColor(ve,K.u_color)}},Au=function(ve,K){return{u_matrix:new e.UniformMatrix4f(ve,K.u_matrix),u_opacity:new e.Uniform1f(ve,K.u_opacity),u_image:new e.Uniform1i(ve,K.u_image),u_pattern_tl_a:new e.Uniform2f(ve,K.u_pattern_tl_a),u_pattern_br_a:new e.Uniform2f(ve,K.u_pattern_br_a),u_pattern_tl_b:new e.Uniform2f(ve,K.u_pattern_tl_b),u_pattern_br_b:new e.Uniform2f(ve,K.u_pattern_br_b),u_texsize:new e.Uniform2f(ve,K.u_texsize),u_mix:new e.Uniform1f(ve,K.u_mix),u_pattern_size_a:new e.Uniform2f(ve,K.u_pattern_size_a),u_pattern_size_b:new e.Uniform2f(ve,K.u_pattern_size_b),u_scale_a:new e.Uniform1f(ve,K.u_scale_a),u_scale_b:new e.Uniform1f(ve,K.u_scale_b),u_pixel_coord_upper:new e.Uniform2f(ve,K.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(ve,K.u_pixel_coord_lower),u_tile_units_to_pixels:new e.Uniform1f(ve,K.u_tile_units_to_pixels)}},yc=function(ve,K,_e){return{u_matrix:ve,u_opacity:K,u_color:_e}},ho=function(ve,K,_e,te,me,Ge){return e.extend(Kc(te,Ge,_e,me),{u_matrix:ve,u_opacity:K})},Ro={fillExtrusion:Lf,fillExtrusionPattern:iu,fill:Cc,fillPattern:gc,fillOutline:ql,fillOutlinePattern:xu,circle:Qt,collisionBox:aa,collisionCircle:$r,debug:Ci,clippingMask:Qi,heatmap:Pi,heatmapTexture:Di,hillshade:Mn,hillshadePrepare:Qn,line:An,lineGradient:un,linePattern:yo,lineSDF:Ko,raster:_l,symbolIcon:Rs,symbolSDF:uu,symbolTextAndIcon:Iu,background:Rc,backgroundPattern:Au},Dc;function lc(ve,K,_e,te,me,Ge,Le){for(var $e=ve.context,gt=$e.gl,jt=ve.useProgram("collisionBox"),wr=[],Nr=0,pr=0,yt=0;yt0){var ur=e.create(),Ht=hr;e.mul(ur,nr.placementInvProjMatrix,ve.transform.glCoordMatrix),e.mul(ur,ur,nr.placementViewportMatrix),wr.push({circleArray:dr,circleOffset:pr,transform:Ht,invTransform:ur}),Nr+=dr.length/4,pr=Nr}lr&&jt.draw($e,gt.LINES,Ia.disabled,Ca.disabled,ve.colorModeForRenderPass(),Fr.disabled,ka(hr,ve.transform,Bt),_e.id,lr.layoutVertexBuffer,lr.indexBuffer,lr.segments,null,ve.transform.zoom,null,null,lr.collisionVertexBuffer)}}if(!(!Le||!wr.length)){var sr=ve.useProgram("collisionCircle"),Vt=new e.StructArrayLayout2f1f2i16;Vt.resize(Nr*4),Vt._trim();for(var Dr=0,Jr=0,ga=wr;Jr=0&&(kt[nr.associatedIconIndex]={shiftedAnchor:ai,angle:Zi})}}if(wr){yt.clear();for(var ui=ve.icon.placedSymbolArray,_i=0;_i0){var Le=e.browser.now(),$e=(Le-ve.timeAdded)/Ge,gt=K?(Le-K.timeAdded)/Ge:-1,jt=_e.getSource(),wr=me.coveringZoomLevel({tileSize:jt.tileSize,roundZoom:jt.roundZoom}),Nr=!K||Math.abs(K.tileID.overscaledZ-wr)>Math.abs(ve.tileID.overscaledZ-wr),pr=Nr&&ve.refreshedUponExpiration?1:e.clamp(Nr?$e:1-gt,0,1);return ve.refreshedUponExpiration&&$e>=1&&(ve.refreshedUponExpiration=!1),K?{opacity:1,mix:1-pr}:{opacity:pr,mix:0}}else return{opacity:1,mix:0}}function Er(ve,K,_e){var te=_e.paint.get("background-color"),me=_e.paint.get("background-opacity");if(me!==0){var Ge=ve.context,Le=Ge.gl,$e=ve.transform,gt=$e.tileSize,jt=_e.paint.get("background-pattern");if(!ve.isPatternMissing(jt)){var wr=!jt&&te.a===1&&me===1&&ve.opaquePassEnabledForLayer()?"opaque":"translucent";if(ve.renderPass===wr){var Nr=Ca.disabled,pr=ve.depthModeForSublayer(0,wr==="opaque"?Ia.ReadWrite:Ia.ReadOnly),yt=ve.colorModeForRenderPass(),kt=ve.useProgram(jt?"backgroundPattern":"background"),Bt=$e.coveringTiles({tileSize:gt});jt&&(Ge.activeTexture.set(Le.TEXTURE0),ve.imageManager.bind(ve.context));for(var nr=_e.getCrossfadeParameters(),hr=0,lr=Bt;hr "+_e.overscaledZ);var hr=nr+" "+yt+"kb";wo(ve,hr),Le.draw(te,me.TRIANGLES,$e,gt,Ft.alphaBlended,Fr.disabled,Hi(Ge,e.Color.transparent,Bt),wr,ve.debugBuffer,ve.quadTriangleIndexBuffer,ve.debugSegments)}function wo(ve,K){ve.initDebugOverlayCanvas();var _e=ve.debugOverlayCanvas,te=ve.context.gl,me=ve.debugOverlayCanvas.getContext("2d");me.clearRect(0,0,_e.width,_e.height),me.shadowColor="white",me.shadowBlur=2,me.lineWidth=1.5,me.strokeStyle="white",me.textBaseline="top",me.font="bold 36px Open Sans, sans-serif",me.fillText(K,5,5),me.strokeText(K,5,5),ve.debugOverlayTexture.update(_e),ve.debugOverlayTexture.bind(te.LINEAR,te.CLAMP_TO_EDGE)}function is(ve,K,_e){var te=ve.context,me=_e.implementation;if(ve.renderPass==="offscreen"){var Ge=me.prerender;Ge&&(ve.setCustomLayerDefaults(),te.setColorMode(ve.colorModeForRenderPass()),Ge.call(me,te.gl,ve.transform.customLayerMatrix()),te.setDirty(),ve.setBaseState())}else if(ve.renderPass==="translucent"){ve.setCustomLayerDefaults(),te.setColorMode(ve.colorModeForRenderPass()),te.setStencilMode(Ca.disabled);var Le=me.renderingMode==="3d"?new Ia(ve.context.gl.LEQUAL,Ia.ReadWrite,ve.depthRangeFor3D):ve.depthModeForSublayer(0,Ia.ReadOnly);te.setDepthMode(Le),me.render(te.gl,ve.transform.customLayerMatrix()),te.setDirty(),ve.setBaseState(),te.bindFramebuffer.set(null)}}var Ao={symbol:I,circle:Nt,heatmap:$t,line:na,fill:He,"fill-extrusion":lt,hillshade:Lt,raster:cr,background:Er,debug:Kn,custom:is},Zo=function(K,_e){this.context=new ta(K),this.transform=_e,this._tileTextures={},this.setup(),this.numSublayers=ra.maxUnderzooming+ra.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new vl,this.gpuTimers={}};Zo.prototype.resize=function(K,_e){if(this.width=K*e.browser.devicePixelRatio,this.height=_e*e.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var te=0,me=this.style._order;te256&&this.clearStencil(),te.setColorMode(Ft.disabled),te.setDepthMode(Ia.disabled);var Ge=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var Le=0,$e=_e;Le<$e.length;Le+=1){var gt=$e[Le],jt=this._tileClippingMaskIDs[gt.key]=this.nextStencilID++;Ge.draw(te,me.TRIANGLES,Ia.disabled,new Ca({func:me.ALWAYS,mask:0},jt,255,me.KEEP,me.KEEP,me.REPLACE),Ft.disabled,Fr.disabled,dn(gt.posMatrix),"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}},Zo.prototype.stencilModeFor3D=function(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();var K=this.nextStencilID++,_e=this.context.gl;return new Ca({func:_e.NOTEQUAL,mask:255},K,255,_e.KEEP,_e.KEEP,_e.REPLACE)},Zo.prototype.stencilModeForClipping=function(K){var _e=this.context.gl;return new Ca({func:_e.EQUAL,mask:255},this._tileClippingMaskIDs[K.key],0,_e.KEEP,_e.KEEP,_e.REPLACE)},Zo.prototype.stencilConfigForOverlap=function(K){var _e,te=this.context.gl,me=K.sort(function(jt,wr){return wr.overscaledZ-jt.overscaledZ}),Ge=me[me.length-1].overscaledZ,Le=me[0].overscaledZ-Ge+1;if(Le>1){this.currentStencilSource=void 0,this.nextStencilID+Le>256&&this.clearStencil();for(var $e={},gt=0;gt=0;this.currentLayer--){var ur=this.style._layers[me[this.currentLayer]],Ht=Ge[ur.source],sr=gt[ur.source];this._renderTileClippingMasks(ur,sr),this.renderLayer(this,Ht,ur,sr)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer0?_e.pop():null},Zo.prototype.isPatternMissing=function(K){if(!K)return!1;if(!K.from||!K.to)return!0;var _e=this.imageManager.getPattern(K.from.toString()),te=this.imageManager.getPattern(K.to.toString());return!_e||!te},Zo.prototype.useProgram=function(K,_e){this.cache=this.cache||{};var te=""+K+(_e?_e.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[te]||(this.cache[te]=new gf(this.context,K,uf[K],_e,Ro[K],this._showOverdrawInspector)),this.cache[te]},Zo.prototype.setCustomLayerDefaults=function(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()},Zo.prototype.setBaseState=function(){var K=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(K.FUNC_ADD)},Zo.prototype.initDebugOverlayCanvas=function(){if(this.debugOverlayCanvas==null){this.debugOverlayCanvas=e.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;var K=this.context.gl;this.debugOverlayTexture=new e.Texture(this.context,this.debugOverlayCanvas,K.RGBA)}},Zo.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var ps=function(K,_e){this.points=K,this.planes=_e};ps.fromInvProjectionMatrix=function(K,_e,te){var me=[[-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]],Ge=Math.pow(2,te),Le=me.map(function(jt){return e.transformMat4([],jt,K)}).map(function(jt){return e.scale$1([],jt,1/jt[3]/_e*Ge)}),$e=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]],gt=$e.map(function(jt){var wr=e.sub([],Le[jt[0]],Le[jt[1]]),Nr=e.sub([],Le[jt[2]],Le[jt[1]]),pr=e.normalize([],e.cross([],wr,Nr)),yt=-e.dot(pr,Le[jt[1]]);return pr.concat(yt)});return new ps(Le,gt)};var ul=function(K,_e){this.min=K,this.max=_e,this.center=e.scale$2([],e.add([],this.min,this.max),.5)};ul.prototype.quadrant=function(K){for(var _e=[K%2===0,K<2],te=e.clone$2(this.min),me=e.clone$2(this.max),Ge=0;Ge<_e.length;Ge++)te[Ge]=_e[Ge]?this.min[Ge]:this.center[Ge],me[Ge]=_e[Ge]?this.center[Ge]:this.max[Ge];return me[2]=this.max[2],new ul(te,me)},ul.prototype.distanceX=function(K){var _e=Math.max(Math.min(this.max[0],K[0]),this.min[0]);return _e-K[0]},ul.prototype.distanceY=function(K){var _e=Math.max(Math.min(this.max[1],K[1]),this.min[1]);return _e-K[1]},ul.prototype.intersects=function(K){for(var _e=[[this.min[0],this.min[1],0,1],[this.max[0],this.min[1],0,1],[this.max[0],this.max[1],0,1],[this.min[0],this.max[1],0,1]],te=!0,me=0;me=0;if(Le===0)return 0;Le!==_e.length&&(te=!1)}if(te)return 2;for(var gt=0;gt<3;gt++){for(var jt=Number.MAX_VALUE,wr=-Number.MAX_VALUE,Nr=0;Nrthis.max[gt]-this.min[gt])return 0}return 1};var tl=function(K,_e,te,me){if(K===void 0&&(K=0),_e===void 0&&(_e=0),te===void 0&&(te=0),me===void 0&&(me=0),isNaN(K)||K<0||isNaN(_e)||_e<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=K,this.bottom=_e,this.left=te,this.right=me};tl.prototype.interpolate=function(K,_e,te){return _e.top!=null&&K.top!=null&&(this.top=e.number(K.top,_e.top,te)),_e.bottom!=null&&K.bottom!=null&&(this.bottom=e.number(K.bottom,_e.bottom,te)),_e.left!=null&&K.left!=null&&(this.left=e.number(K.left,_e.left,te)),_e.right!=null&&K.right!=null&&(this.right=e.number(K.right,_e.right,te)),this},tl.prototype.getCenter=function(K,_e){var te=e.clamp((this.left+K-this.right)/2,0,K),me=e.clamp((this.top+_e-this.bottom)/2,0,_e);return new e.Point(te,me)},tl.prototype.equals=function(K){return this.top===K.top&&this.bottom===K.bottom&&this.left===K.left&&this.right===K.right},tl.prototype.clone=function(){return new tl(this.top,this.bottom,this.left,this.right)},tl.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var Jo=function(K,_e,te,me,Ge){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=Ge===void 0?!0:Ge,this._minZoom=K||0,this._maxZoom=_e||22,this._minPitch=te??0,this._maxPitch=me??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new e.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new tl,this._posMatrixCache={},this._alignedPosMatrixCache={}},$o={minZoom:{configurable:!0},maxZoom:{configurable:!0},minPitch:{configurable:!0},maxPitch:{configurable:!0},renderWorldCopies:{configurable:!0},worldSize:{configurable:!0},centerOffset:{configurable:!0},size:{configurable:!0},bearing:{configurable:!0},pitch:{configurable:!0},fov:{configurable:!0},zoom:{configurable:!0},center:{configurable:!0},padding:{configurable:!0},centerPoint:{configurable:!0},unmodified:{configurable:!0},point:{configurable:!0}};Jo.prototype.clone=function(){var K=new Jo(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return K.tileSize=this.tileSize,K.latRange=this.latRange,K.width=this.width,K.height=this.height,K._center=this._center,K.zoom=this.zoom,K.angle=this.angle,K._fov=this._fov,K._pitch=this._pitch,K._unmodified=this._unmodified,K._edgeInsets=this._edgeInsets.clone(),K._calcMatrices(),K},$o.minZoom.get=function(){return this._minZoom},$o.minZoom.set=function(ve){this._minZoom!==ve&&(this._minZoom=ve,this.zoom=Math.max(this.zoom,ve))},$o.maxZoom.get=function(){return this._maxZoom},$o.maxZoom.set=function(ve){this._maxZoom!==ve&&(this._maxZoom=ve,this.zoom=Math.min(this.zoom,ve))},$o.minPitch.get=function(){return this._minPitch},$o.minPitch.set=function(ve){this._minPitch!==ve&&(this._minPitch=ve,this.pitch=Math.max(this.pitch,ve))},$o.maxPitch.get=function(){return this._maxPitch},$o.maxPitch.set=function(ve){this._maxPitch!==ve&&(this._maxPitch=ve,this.pitch=Math.min(this.pitch,ve))},$o.renderWorldCopies.get=function(){return this._renderWorldCopies},$o.renderWorldCopies.set=function(ve){ve===void 0?ve=!0:ve===null&&(ve=!1),this._renderWorldCopies=ve},$o.worldSize.get=function(){return this.tileSize*this.scale},$o.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},$o.size.get=function(){return new e.Point(this.width,this.height)},$o.bearing.get=function(){return-this.angle/Math.PI*180},$o.bearing.set=function(ve){var K=-e.wrap(ve,-180,180)*Math.PI/180;this.angle!==K&&(this._unmodified=!1,this.angle=K,this._calcMatrices(),this.rotationMatrix=e.create$2(),e.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},$o.pitch.get=function(){return this._pitch/Math.PI*180},$o.pitch.set=function(ve){var K=e.clamp(ve,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==K&&(this._unmodified=!1,this._pitch=K,this._calcMatrices())},$o.fov.get=function(){return this._fov/Math.PI*180},$o.fov.set=function(ve){ve=Math.max(.01,Math.min(60,ve)),this._fov!==ve&&(this._unmodified=!1,this._fov=ve/180*Math.PI,this._calcMatrices())},$o.zoom.get=function(){return this._zoom},$o.zoom.set=function(ve){var K=Math.min(Math.max(ve,this.minZoom),this.maxZoom);this._zoom!==K&&(this._unmodified=!1,this._zoom=K,this.scale=this.zoomScale(K),this.tileZoom=Math.floor(K),this.zoomFraction=K-this.tileZoom,this._constrain(),this._calcMatrices())},$o.center.get=function(){return this._center},$o.center.set=function(ve){ve.lat===this._center.lat&&ve.lng===this._center.lng||(this._unmodified=!1,this._center=ve,this._constrain(),this._calcMatrices())},$o.padding.get=function(){return this._edgeInsets.toJSON()},$o.padding.set=function(ve){this._edgeInsets.equals(ve)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,ve,1),this._calcMatrices())},$o.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},Jo.prototype.isPaddingEqual=function(K){return this._edgeInsets.equals(K)},Jo.prototype.interpolatePadding=function(K,_e,te){this._unmodified=!1,this._edgeInsets.interpolate(K,_e,te),this._constrain(),this._calcMatrices()},Jo.prototype.coveringZoomLevel=function(K){var _e=(K.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/K.tileSize));return Math.max(0,_e)},Jo.prototype.getVisibleUnwrappedCoordinates=function(K){var _e=[new e.UnwrappedTileID(0,K)];if(this._renderWorldCopies)for(var te=this.pointCoordinate(new e.Point(0,0)),me=this.pointCoordinate(new e.Point(this.width,0)),Ge=this.pointCoordinate(new e.Point(this.width,this.height)),Le=this.pointCoordinate(new e.Point(0,this.height)),$e=Math.floor(Math.min(te.x,me.x,Ge.x,Le.x)),gt=Math.floor(Math.max(te.x,me.x,Ge.x,Le.x)),jt=1,wr=$e-jt;wr<=gt+jt;wr++)wr!==0&&_e.push(new e.UnwrappedTileID(wr,K));return _e},Jo.prototype.coveringTiles=function(K){var _e=this.coveringZoomLevel(K),te=_e;if(K.minzoom!==void 0&&_eK.maxzoom&&(_e=K.maxzoom);var me=e.MercatorCoordinate.fromLngLat(this.center),Ge=Math.pow(2,_e),Le=[Ge*me.x,Ge*me.y,0],$e=ps.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,_e),gt=K.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(gt=_e);var jt=3,wr=function(Ga){return{aabb:new ul([Ga*Ge,0,0],[(Ga+1)*Ge,Ge,0]),zoom:0,x:0,y:0,wrap:Ga,fullyVisible:!1}},Nr=[],pr=[],yt=_e,kt=K.reparseOverscaled?te:_e;if(this._renderWorldCopies)for(var Bt=1;Bt<=3;Bt++)Nr.push(wr(-Bt)),Nr.push(wr(Bt));for(Nr.push(wr(0));Nr.length>0;){var nr=Nr.pop(),hr=nr.x,lr=nr.y,dr=nr.fullyVisible;if(!dr){var ur=nr.aabb.intersects($e);if(ur===0)continue;dr=ur===2}var Ht=nr.aabb.distanceX(Le),sr=nr.aabb.distanceY(Le),Vt=Math.max(Math.abs(Ht),Math.abs(sr)),Dr=jt+(1<Dr&&nr.zoom>=gt){pr.push({tileID:new e.OverscaledTileID(nr.zoom===yt?kt:nr.zoom,nr.wrap,nr.zoom,hr,lr),distanceSq:e.sqrLen([Le[0]-.5-hr,Le[1]-.5-lr])});continue}for(var Jr=0;Jr<4;Jr++){var ga=(hr<<1)+Jr%2,vi=(lr<<1)+(Jr>>1);Nr.push({aabb:nr.aabb.quadrant(Jr),zoom:nr.zoom+1,x:ga,y:vi,wrap:nr.wrap,fullyVisible:dr})}}return pr.sort(function(Ga,ai){return Ga.distanceSq-ai.distanceSq}).map(function(Ga){return Ga.tileID})},Jo.prototype.resize=function(K,_e){this.width=K,this.height=_e,this.pixelsToGLUnits=[2/K,-2/_e],this._constrain(),this._calcMatrices()},$o.unmodified.get=function(){return this._unmodified},Jo.prototype.zoomScale=function(K){return Math.pow(2,K)},Jo.prototype.scaleZoom=function(K){return Math.log(K)/Math.LN2},Jo.prototype.project=function(K){var _e=e.clamp(K.lat,-this.maxValidLatitude,this.maxValidLatitude);return new e.Point(e.mercatorXfromLng(K.lng)*this.worldSize,e.mercatorYfromLat(_e)*this.worldSize)},Jo.prototype.unproject=function(K){return new e.MercatorCoordinate(K.x/this.worldSize,K.y/this.worldSize).toLngLat()},$o.point.get=function(){return this.project(this.center)},Jo.prototype.setLocationAtPoint=function(K,_e){var te=this.pointCoordinate(_e),me=this.pointCoordinate(this.centerPoint),Ge=this.locationCoordinate(K),Le=new e.MercatorCoordinate(Ge.x-(te.x-me.x),Ge.y-(te.y-me.y));this.center=this.coordinateLocation(Le),this._renderWorldCopies&&(this.center=this.center.wrap())},Jo.prototype.locationPoint=function(K){return this.coordinatePoint(this.locationCoordinate(K))},Jo.prototype.pointLocation=function(K){return this.coordinateLocation(this.pointCoordinate(K))},Jo.prototype.locationCoordinate=function(K){return e.MercatorCoordinate.fromLngLat(K)},Jo.prototype.coordinateLocation=function(K){return K.toLngLat()},Jo.prototype.pointCoordinate=function(K){var _e=0,te=[K.x,K.y,0,1],me=[K.x,K.y,1,1];e.transformMat4(te,te,this.pixelMatrixInverse),e.transformMat4(me,me,this.pixelMatrixInverse);var Ge=te[3],Le=me[3],$e=te[0]/Ge,gt=me[0]/Le,jt=te[1]/Ge,wr=me[1]/Le,Nr=te[2]/Ge,pr=me[2]/Le,yt=Nr===pr?0:(_e-Nr)/(pr-Nr);return new e.MercatorCoordinate(e.number($e,gt,yt)/this.worldSize,e.number(jt,wr,yt)/this.worldSize)},Jo.prototype.coordinatePoint=function(K){var _e=[K.x*this.worldSize,K.y*this.worldSize,0,1];return e.transformMat4(_e,_e,this.pixelMatrix),new e.Point(_e[0]/_e[3],_e[1]/_e[3])},Jo.prototype.getBounds=function(){return new e.LngLatBounds().extend(this.pointLocation(new e.Point(0,0))).extend(this.pointLocation(new e.Point(this.width,0))).extend(this.pointLocation(new e.Point(this.width,this.height))).extend(this.pointLocation(new e.Point(0,this.height)))},Jo.prototype.getMaxBounds=function(){return!this.latRange||this.latRange.length!==2||!this.lngRange||this.lngRange.length!==2?null:new e.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]])},Jo.prototype.setMaxBounds=function(K){K?(this.lngRange=[K.getWest(),K.getEast()],this.latRange=[K.getSouth(),K.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},Jo.prototype.calculatePosMatrix=function(K,_e){_e===void 0&&(_e=!1);var te=K.key,me=_e?this._alignedPosMatrixCache:this._posMatrixCache;if(me[te])return me[te];var Ge=K.canonical,Le=this.worldSize/this.zoomScale(Ge.z),$e=Ge.x+Math.pow(2,Ge.z)*K.wrap,gt=e.identity(new Float64Array(16));return e.translate(gt,gt,[$e*Le,Ge.y*Le,0]),e.scale(gt,gt,[Le/e.EXTENT,Le/e.EXTENT,1]),e.multiply(gt,_e?this.alignedProjMatrix:this.projMatrix,gt),me[te]=new Float32Array(gt),me[te]},Jo.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},Jo.prototype._constrain=function(){if(!(!this.center||!this.width||!this.height||this._constraining)){this._constraining=!0;var K=-90,_e=90,te=-180,me=180,Ge,Le,$e,gt,jt=this.size,wr=this._unmodified;if(this.latRange){var Nr=this.latRange;K=e.mercatorYfromLat(Nr[1])*this.worldSize,_e=e.mercatorYfromLat(Nr[0])*this.worldSize,Ge=_e-K_e&&(gt=_e-nr)}if(this.lngRange){var hr=yt.x,lr=jt.x/2;hr-lrme&&($e=me-lr)}($e!==void 0||gt!==void 0)&&(this.center=this.unproject(new e.Point($e!==void 0?$e:yt.x,gt!==void 0?gt:yt.y))),this._unmodified=wr,this._constraining=!1}},Jo.prototype._calcMatrices=function(){if(this.height){var K=this._fov/2,_e=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(K)*this.height;var te=Math.PI/2+this._pitch,me=this._fov*(.5+_e.y/this.height),Ge=Math.sin(me)*this.cameraToCenterDistance/Math.sin(e.clamp(Math.PI-te-me,.01,Math.PI-.01)),Le=this.point,$e=Le.x,gt=Le.y,jt=Math.cos(Math.PI/2-this._pitch)*Ge+this.cameraToCenterDistance,wr=jt*1.01,Nr=this.height/50,pr=new Float64Array(16);e.perspective(pr,this._fov,this.width/this.height,Nr,wr),pr[8]=-_e.x*2/this.width,pr[9]=_e.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,[-$e,-gt,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 yt=this.width%2/2,kt=this.height%2/2,Bt=Math.cos(this.angle),nr=Math.sin(this.angle),hr=$e-Math.round($e)+Bt*yt+nr*kt,lr=gt-Math.round(gt)+Bt*kt+nr*yt,dr=new Float64Array(pr);if(e.translate(dr,dr,[hr>.5?hr-1:hr,lr>.5?lr-1:lr,0]),this.alignedProjMatrix=dr,pr=e.create(),e.scale(pr,pr,[this.width/2,-this.height/2,1]),e.translate(pr,pr,[1,-1,0]),this.labelPlaneMatrix=pr,pr=e.create(),e.scale(pr,pr,[1,-1,1]),e.translate(pr,pr,[-1,-1,0]),e.scale(pr,pr,[2/this.width,2/this.height,1]),this.glCoordMatrix=pr,this.pixelMatrix=e.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),pr=e.invert(new Float64Array(16),this.pixelMatrix),!pr)throw new Error("failed to invert matrix");this.pixelMatrixInverse=pr,this._posMatrixCache={},this._alignedPosMatrixCache={}}},Jo.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var K=this.pointCoordinate(new e.Point(0,0)),_e=[K.x*this.worldSize,K.y*this.worldSize,0,1],te=e.transformMat4(_e,_e,this.pixelMatrix);return te[3]/this.cameraToCenterDistance},Jo.prototype.getCameraPoint=function(){var K=this._pitch,_e=Math.tan(K)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new e.Point(0,_e))},Jo.prototype.getCameraQueryGeometry=function(K){var _e=this.getCameraPoint();if(K.length===1)return[K[0],_e];for(var te=_e.x,me=_e.y,Ge=_e.x,Le=_e.y,$e=0,gt=K;$e=3&&!K.some(function(te){return isNaN(te)})){var _e=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:_e,pitch:+(K[4]||0)}),!0}return!1},eu.prototype._updateHashUnthrottled=function(){var K=e.window.location.href.replace(/(#.+)?$/,this.getHashString());try{e.window.history.replaceState(e.window.history.state,null,K)}catch{}};var Ru={linearity:.3,easing:e.bezier(0,0,.3,1)},vu=e.extend({deceleration:2500,maxSpeed:1400},Ru),Tl=e.extend({deceleration:20,maxSpeed:1400},Ru),cu=e.extend({deceleration:1e3,maxSpeed:360},Ru),uc=e.extend({deceleration:1e3,maxSpeed:90},Ru),Vl=function(K){this._map=K,this.clear()};Vl.prototype.clear=function(){this._inertiaBuffer=[]},Vl.prototype.record=function(K){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:e.browser.now(),settings:K})},Vl.prototype._drainInertiaBuffer=function(){for(var K=this._inertiaBuffer,_e=e.browser.now(),te=160;K.length>0&&_e-K[0].time>te;)K.shift()},Vl.prototype._onMoveEnd=function(K){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var _e={zoom:0,bearing:0,pitch:0,pan:new e.Point(0,0),pinchAround:void 0,around:void 0},te=0,me=this._inertiaBuffer;te=this._clickTolerance||this._map.fire(new Fe(K.type,this._map,K))},bt.prototype.dblclick=function(K){return this._firePreventable(new Fe(K.type,this._map,K))},bt.prototype.mouseover=function(K){this._map.fire(new Fe(K.type,this._map,K))},bt.prototype.mouseout=function(K){this._map.fire(new Fe(K.type,this._map,K))},bt.prototype.touchstart=function(K){return this._firePreventable(new et(K.type,this._map,K))},bt.prototype.touchmove=function(K){this._map.fire(new et(K.type,this._map,K))},bt.prototype.touchend=function(K){this._map.fire(new et(K.type,this._map,K))},bt.prototype.touchcancel=function(K){this._map.fire(new et(K.type,this._map,K))},bt.prototype._firePreventable=function(K){if(this._map.fire(K),K.defaultPrevented)return{}},bt.prototype.isEnabled=function(){return!0},bt.prototype.isActive=function(){return!1},bt.prototype.enable=function(){},bt.prototype.disable=function(){};var Mt=function(K){this._map=K};Mt.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},Mt.prototype.mousemove=function(K){this._map.fire(new Fe(K.type,this._map,K))},Mt.prototype.mousedown=function(){this._delayContextMenu=!0},Mt.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Fe("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},Mt.prototype.contextmenu=function(K){this._delayContextMenu?this._contextMenuEvent=K:this._map.fire(new Fe(K.type,this._map,K)),this._map.listens("contextmenu")&&K.preventDefault()},Mt.prototype.isEnabled=function(){return!0},Mt.prototype.isActive=function(){return!1},Mt.prototype.enable=function(){},Mt.prototype.disable=function(){};var ar=function(K,_e){this._map=K,this._el=K.getCanvasContainer(),this._container=K.getContainer(),this._clickTolerance=_e.clickTolerance||1};ar.prototype.isEnabled=function(){return!!this._enabled},ar.prototype.isActive=function(){return!!this._active},ar.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},ar.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},ar.prototype.mousedown=function(K,_e){this.isEnabled()&&K.shiftKey&&K.button===0&&(r.disableDrag(),this._startPos=this._lastPos=_e,this._active=!0)},ar.prototype.mousemoveWindow=function(K,_e){if(this._active){var te=_e;if(!(this._lastPos.equals(te)||!this._box&&te.dist(this._startPos)this.numTouches)&&(this.aborted=!0),!this.aborted&&(this.startTime===void 0&&(this.startTime=K.timeStamp),te.length===this.numTouches&&(this.centroid=_r(_e),this.touches=Ot(te,_e)))},da.prototype.touchmove=function(K,_e,te){if(!(this.aborted||!this.centroid)){var me=Ot(te,_e);for(var Ge in this.touches){var Le=this.touches[Ge],$e=me[Ge];(!$e||$e.dist(Le)>xa)&&(this.aborted=!0)}}},da.prototype.touchend=function(K,_e,te){if((!this.centroid||K.timeStamp-this.startTime>Xr)&&(this.aborted=!0),te.length===0){var me=!this.aborted&&this.centroid;if(this.reset(),me)return me}};var Ja=function(K){this.singleTap=new da(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,_e,te){this.singleTap.touchstart(K,_e,te)},Ja.prototype.touchmove=function(K,_e,te){this.singleTap.touchmove(K,_e,te)},Ja.prototype.touchend=function(K,_e,te){var me=this.singleTap.touchend(K,_e,te);if(me){var Ge=K.timeStamp-this.lastTime0&&(this._active=!0);var me=Ot(te,_e),Ge=new e.Point(0,0),Le=new e.Point(0,0),$e=0;for(var gt in me){var jt=me[gt],wr=this._touches[gt];wr&&(Ge._add(jt),Le._add(jt.sub(wr)),$e++,me[gt]=jt)}if(this._touches=me,!($eMath.abs(ve.x)}var gn=100,vo=function(ve){function K(){ve.apply(this,arguments)}return ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.prototype),K.prototype.constructor=K,K.prototype.reset=function(){ve.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},K.prototype._start=function(te){this._lastPoints=te,xl(te[0].sub(te[1]))&&(this._valid=!1)},K.prototype._move=function(te,me,Ge){var Le=te[0].sub(this._lastPoints[0]),$e=te[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(Le,$e,Ge.timeStamp),!!this._valid){this._lastPoints=te,this._active=!0;var gt=(Le.y+$e.y)/2,jt=-.5;return{pitchDelta:gt*jt}}},K.prototype.gestureBeginsVertically=function(te,me,Ge){if(this._valid!==void 0)return this._valid;var Le=2,$e=te.mag()>=Le,gt=me.mag()>=Le;if(!(!$e&&!gt)){if(!$e||!gt)return this._firstMove===void 0&&(this._firstMove=Ge),Ge-this._firstMove0==me.y>0;return xl(te)&&xl(me)&&jt}},K}(Pn),cs={panStep:100,bearingStep:15,pitchStep:10},ms=function(){var K=cs;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 _e=this;if(!(K.altKey||K.ctrlKey||K.metaKey)){var te=0,me=0,Ge=0,Le=0,$e=0;switch(K.keyCode){case 61:case 107:case 171:case 187:te=1;break;case 189:case 109:case 173:te=-1;break;case 37:K.shiftKey?me=-1:(K.preventDefault(),Le=-1);break;case 39:K.shiftKey?me=1:(K.preventDefault(),Le=1);break;case 38:K.shiftKey?Ge=1:(K.preventDefault(),$e=-1);break;case 40:K.shiftKey?Ge=-1:(K.preventDefault(),$e=1);break;default:return}return this._rotationDisabled&&(me=0,Ge=0),{cameraAnimation:function(gt){var jt=gt.getZoom();gt.easeTo({duration:300,easeId:"keyboardHandler",easing:Al,zoom:te?Math.round(jt)+te*(K.shiftKey?2:1):jt,bearing:gt.getBearing()+me*_e._bearingStep,pitch:gt.getPitch()+Ge*_e._pitchStep,offset:[-Le*_e._panStep,-$e*_e._panStep],center:gt.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 Al(ve){return ve*(2-ve)}var Hl=4.000244140625,Su=1/100,Rl=1/450,_c=2,it=function(K,_e){this._map=K,this._el=K.getCanvasContainer(),this._handler=_e,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 _e=K.deltaMode===e.window.WheelEvent.DOM_DELTA_LINE?K.deltaY*40:K.deltaY,te=e.browser.now(),me=te-(this._lastWheelEventTime||0);this._lastWheelEventTime=te,_e!==0&&_e%Hl===0?this._type="wheel":_e!==0&&Math.abs(_e)<4?this._type="trackpad":me>400?(this._type=null,this._lastValue=_e,this._timeout=setTimeout(this._onTimeout,40,K)):this._type||(this._type=Math.abs(me*_e)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,_e+=this._lastValue)),K.shiftKey&&_e&&(_e=_e/4),this._type&&(this._lastWheelEvent=K,this._delta-=_e,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 _e=r.mousePos(this._el,K);this._around=e.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(_e)),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 _e=this._map.transform;if(this._delta!==0){var te=this._type==="wheel"&&Math.abs(this._delta)>Hl?this._wheelZoomRate:this._defaultZoomRate,me=_c/(1+Math.exp(-Math.abs(this._delta*te)));this._delta<0&&me!==0&&(me=1/me);var Ge=typeof this._targetZoom=="number"?_e.zoomScale(this._targetZoom):_e.scale;this._targetZoom=Math.min(_e.maxZoom,Math.max(_e.minZoom,_e.scaleZoom(Ge*me))),this._type==="wheel"&&(this._startZoom=_e.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var Le=typeof this._targetZoom=="number"?this._targetZoom:_e.zoom,$e=this._startZoom,gt=this._easing,jt=!1,wr;if(this._type==="wheel"&&$e&>){var Nr=Math.min((e.browser.now()-this._lastWheelEventTime)/200,1),pr=gt(Nr);wr=e.number($e,Le,pr),Nr<1?this._frameId||(this._frameId=!0):jt=!0}else wr=Le,jt=!0;return this._active=!0,jt&&(this._active=!1,this._finishTimeout=setTimeout(function(){K._zooming=!1,K._handler._triggerRenderFrame(),delete K._targetZoom,delete K._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!jt,zoomDelta:wr-_e.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},it.prototype._smoothOutEasing=function(K){var _e=e.ease;if(this._prevEase){var te=this._prevEase,me=(e.browser.now()-te.start)/te.duration,Ge=te.easing(me+.01)-te.easing(me),Le=.27/Math.sqrt(Ge*Ge+1e-4)*.01,$e=Math.sqrt(.27*.27-Le*Le);_e=e.bezier(Le,$e,.25,1)}return this._prevEase={start:e.browser.now(),duration:K,easing:_e},_e},it.prototype.reset=function(){this._active=!1};var Zt=function(K,_e){this._clickZoom=K,this._tapZoom=_e};Zt.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},Zt.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},Zt.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},Zt.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var fr=function(){this.reset()};fr.prototype.reset=function(){this._active=!1},fr.prototype.dblclick=function(K,_e){return K.preventDefault(),{cameraAnimation:function(te){te.easeTo({duration:300,zoom:te.getZoom()+(K.shiftKey?-1:1),around:te.unproject(_e)},{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,_e,te){this._swipePoint||(this._tapTime&&K.timeStamp-this._tapTime>Gr&&this.reset(),this._tapTime?te.length>0&&(this._swipePoint=_e[0],this._swipeTouch=te[0].identifier):this._tap.touchstart(K,_e,te))},oa.prototype.touchmove=function(K,_e,te){if(!this._tapTime)this._tap.touchmove(K,_e,te);else if(this._swipePoint){if(te[0].identifier!==this._swipeTouch)return;var me=_e[0],Ge=me.y-this._swipePoint.y;return this._swipePoint=me,K.preventDefault(),this._active=!0,{zoomDelta:Ge/128}}},oa.prototype.touchend=function(K,_e,te){if(this._tapTime)this._swipePoint&&te.length===0&&this.reset();else{var me=this._tap.touchend(K,_e,te);me&&(this._tapTime=K.timeStamp)}},oa.prototype.touchcancel=function(){this.reset()},oa.prototype.enable=function(){this._enabled=!0},oa.prototype.disable=function(){this._enabled=!1,this.reset()},oa.prototype.isEnabled=function(){return this._enabled},oa.prototype.isActive=function(){return this._active};var wa=function(K,_e,te){this._el=K,this._mousePan=_e,this._touchPan=te};wa.prototype.enable=function(K){this._inertiaOptions=K||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},wa.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},wa.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},wa.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var ma=function(K,_e,te){this._pitchWithRotate=K.pitchWithRotate,this._mouseRotate=_e,this._mousePitch=te};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 _a=function(K,_e,te,me){this._el=K,this._touchZoom=_e,this._touchRotate=te,this._tapDragZoom=me,this._rotationDisabled=!1,this._enabled=!0};_a.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")},_a.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},_a.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},_a.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},_a.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},_a.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var Ya=function(ve){return ve.zoom||ve.drag||ve.pitch||ve.rotate},bi=function(ve){function K(){ve.apply(this,arguments)}return ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.prototype),K.prototype.constructor=K,K}(e.Event);function yi(ve){return ve.panDelta&&ve.panDelta.mag()||ve.zoomDelta||ve.bearingDelta||ve.pitchDelta}var si=function(K,_e){this._map=K,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Vl(K),this._bearingSnap=_e.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(_e),e.bindAll(["handleEvent","handleWindowEvent"],this);var te=this._el;this._listeners=[[te,"touchstart",{passive:!0}],[te,"touchmove",{passive:!1}],[te,"touchend",void 0],[te,"touchcancel",void 0],[te,"mousedown",void 0],[te,"mousemove",void 0],[te,"mouseup",void 0],[e.window.document,"mousemove",{capture:!0}],[e.window.document,"mouseup",void 0],[te,"mouseover",void 0],[te,"mouseout",void 0],[te,"dblclick",void 0],[te,"click",void 0],[te,"keydown",{capture:!1}],[te,"keyup",void 0],[te,"wheel",{passive:!1}],[te,"contextmenu",void 0],[e.window,"blur",void 0]];for(var me=0,Ge=this._listeners;me$e?Math.min(2,Ht):Math.max(.5,Ht),Ga=Math.pow(vi,1-Jr),ai=Le.unproject(dr.add(ur.mult(Jr*Ga)).mult(ga));Le.setLocationAtPoint(Le.renderWorldCopies?ai.wrap():ai,nr)}Ge._fireMoveEvents(me)},function(Jr){Ge._afterEase(me,Jr)},te),this},K.prototype._prepareEase=function(te,me,Ge){Ge===void 0&&(Ge={}),this._moving=!0,!me&&!Ge.moving&&this.fire(new e.Event("movestart",te)),this._zooming&&!Ge.zooming&&this.fire(new e.Event("zoomstart",te)),this._rotating&&!Ge.rotating&&this.fire(new e.Event("rotatestart",te)),this._pitching&&!Ge.pitching&&this.fire(new e.Event("pitchstart",te))},K.prototype._fireMoveEvents=function(te){this.fire(new e.Event("move",te)),this._zooming&&this.fire(new e.Event("zoom",te)),this._rotating&&this.fire(new e.Event("rotate",te)),this._pitching&&this.fire(new e.Event("pitch",te))},K.prototype._afterEase=function(te,me){if(!(this._easeId&&me&&this._easeId===me)){delete this._easeId;var Ge=this._zooming,Le=this._rotating,$e=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,Ge&&this.fire(new e.Event("zoomend",te)),Le&&this.fire(new e.Event("rotateend",te)),$e&&this.fire(new e.Event("pitchend",te)),this.fire(new e.Event("moveend",te))}},K.prototype.flyTo=function(te,me){var Ge=this;if(!te.essential&&e.browser.prefersReducedMotion){var Le=e.pick(te,["center","zoom","bearing","pitch","around"]);return this.jumpTo(Le,me)}this.stop(),te=e.extend({offset:[0,0],speed:1.2,curve:1.42,easing:e.ease},te);var $e=this.transform,gt=this.getZoom(),jt=this.getBearing(),wr=this.getPitch(),Nr=this.getPadding(),pr="zoom"in te?e.clamp(+te.zoom,$e.minZoom,$e.maxZoom):gt,yt="bearing"in te?this._normalizeBearing(te.bearing,jt):jt,kt="pitch"in te?+te.pitch:wr,Bt="padding"in te?te.padding:$e.padding,nr=$e.zoomScale(pr-gt),hr=e.Point.convert(te.offset),lr=$e.centerPoint.add(hr),dr=$e.pointLocation(lr),ur=e.LngLat.convert(te.center||dr);this._normalizeCenter(ur);var Ht=$e.project(dr),sr=$e.project(ur).sub(Ht),Vt=te.curve,Dr=Math.max($e.width,$e.height),Jr=Dr/nr,ga=sr.mag();if("minZoom"in te){var vi=e.clamp(Math.min(te.minZoom,gt,pr),$e.minZoom,$e.maxZoom),Ga=Dr/$e.zoomScale(vi-gt);Vt=Math.sqrt(Ga/ga*2)}var ai=Vt*Vt;function Zi(Do){var Ms=(Jr*Jr-Dr*Dr+(Do?-1:1)*ai*ai*ga*ga)/(2*(Do?Jr:Dr)*ai*ga);return Math.log(Math.sqrt(Ms*Ms+1)-Ms)}function Fi(Do){return(Math.exp(Do)-Math.exp(-Do))/2}function ui(Do){return(Math.exp(Do)+Math.exp(-Do))/2}function _i(Do){return Fi(Do)/ui(Do)}var Si=Zi(0),Ui=function(Do){return ui(Si)/ui(Si+Vt*Do)},fn=function(Do){return Dr*((ui(Si)*_i(Si+Vt*Do)-Fi(Si))/ai)/ga},_o=(Zi(1)-Si)/Vt;if(Math.abs(ga)<1e-6||!isFinite(_o)){if(Math.abs(Dr-Jr)<1e-6)return this.easeTo(te,me);var Bo=Jrte.maxDuration&&(te.duration=0),this._zooming=!0,this._rotating=jt!==yt,this._pitching=kt!==wr,this._padding=!$e.isPaddingEqual(Bt),this._prepareEase(me,!1),this._ease(function(Do){var Ms=Do*_o,Ys=1/Ui(Ms);$e.zoom=Do===1?pr:gt+$e.scaleZoom(Ys),Ge._rotating&&($e.bearing=e.number(jt,yt,Do)),Ge._pitching&&($e.pitch=e.number(wr,kt,Do)),Ge._padding&&($e.interpolatePadding(Nr,Bt,Do),lr=$e.centerPoint.add(hr));var mu=Do===1?ur:$e.unproject(Ht.add(sr.mult(fn(Ms))).mult(Ys));$e.setLocationAtPoint($e.renderWorldCopies?mu.wrap():mu,lr),Ge._fireMoveEvents(me)},function(){return Ge._afterEase(me)},te),this},K.prototype.isEasing=function(){return!!this._easeFrameId},K.prototype.stop=function(){return this._stop()},K.prototype._stop=function(te,me){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var Ge=this._onEaseEnd;delete this._onEaseEnd,Ge.call(this,me)}if(!te){var Le=this.handlers;Le&&Le.stop(!1)}return this},K.prototype._ease=function(te,me,Ge){Ge.animate===!1||Ge.duration===0?(te(1),me()):(this._easeStart=e.browser.now(),this._easeOptions=Ge,this._onEaseFrame=te,this._onEaseEnd=me,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},K.prototype._renderFrameCallback=function(){var te=Math.min((e.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(te)),te<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},K.prototype._normalizeBearing=function(te,me){te=e.wrap(te,-180,180);var Ge=Math.abs(te-me);return Math.abs(te-360-me)180?-360:Ge<-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 _e=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"),_e&&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),_e===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,_e){var te=this._map._getUIString("AttributionControl."+_e);K.title=te,K.setAttribute("aria-label",te)},zi.prototype._toggleAttribution=function(){this._container.classList.contains("mapboxgl-compact-show")?(this._container.classList.remove("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-pressed","false")):(this._container.classList.add("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-pressed","true"))},zi.prototype._updateEditLink=function(){var K=this._editLink;K||(K=this._editLink=this._container.querySelector(".mapbox-improve-map"));var _e=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||e.config.ACCESS_TOKEN}];if(K){var te=_e.reduce(function(me,Ge,Le){return Ge.value&&(me+=Ge.key+"="+Ge.value+(Le<_e.length-1?"&":"")),me},"?");K.href=e.config.FEEDBACK_URL+"/"+te+(this._map._hash?this._map._hash.getHashString(!0):""),K.rel="noopener nofollow",this._setElementTitle(K,"MapFeedback")}},zi.prototype._updateData=function(K){K&&(K.sourceDataType==="metadata"||K.sourceDataType==="visibility"||K.dataType==="style")&&(this._updateAttributions(),this._updateEditLink())},zi.prototype._updateAttributions=function(){if(this._map.style){var K=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?K=K.concat(this.options.customAttribution.map(function(gt){return typeof gt!="string"?"":gt})):typeof this.options.customAttribution=="string"&&K.push(this.options.customAttribution)),this._map.style.stylesheet){var _e=this._map.style.stylesheet;this.styleOwner=_e.owner,this.styleId=_e.id}var te=this._map.style.sourceCaches;for(var me in te){var Ge=te[me];if(Ge.used){var Le=Ge.getSource();Le.attribution&&K.indexOf(Le.attribution)<0&&K.push(Le.attribution)}}K.sort(function(gt,jt){return gt.length-jt.length}),K=K.filter(function(gt,jt){for(var wr=jt+1;wr=0)return!1;return!0});var $e=K.join(" | ");$e!==this._attribHTML&&(this._attribHTML=$e,K.length?(this._innerContainer.innerHTML=$e,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 _e=r.create("a","mapboxgl-ctrl-logo");return _e.target="_blank",_e.rel="noopener nofollow",_e.href="https://www.mapbox.com/",_e.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),_e.setAttribute("rel","noopener nofollow"),this._container.appendChild(_e),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 _e in K){var te=K[_e].getSource();if(te.mapbox_logo)return!0}return!1}},Ei.prototype._updateCompact=function(){var K=this._container.children;if(K.length){var _e=K[0];this._map.getCanvasContainer().offsetWidth<250?_e.classList.add("mapboxgl-compact"):_e.classList.remove("mapboxgl-compact")}};var Na=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};Na.prototype.add=function(K){var _e=++this._id,te=this._queue;return te.push({callback:K,id:_e,cancelled:!1}),_e},Na.prototype.remove=function(K){for(var _e=this._currentlyRunning,te=_e?this._queue.concat(_e):this._queue,me=0,Ge=te;mete.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(te.minPitch!=null&&te.maxPitch!=null&&te.minPitch>te.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(te.minPitch!=null&&te.minPitchpn)throw new Error("maxPitch must be less than or equal to "+pn);var Ge=new Jo(te.minZoom,te.maxZoom,te.minPitch,te.maxPitch,te.renderWorldCopies);if(ve.call(this,Ge,te),this._interactive=te.interactive,this._maxTileCacheSize=te.maxTileCacheSize,this._failIfMajorPerformanceCaveat=te.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=te.preserveDrawingBuffer,this._antialias=te.antialias,this._trackResize=te.trackResize,this._bearingSnap=te.bearingSnap,this._refreshExpiredTiles=te.refreshExpiredTiles,this._fadeDuration=te.fadeDuration,this._crossSourceCollisions=te.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=te.collectResourceTiming,this._renderTaskQueue=new Na,this._controls=[],this._mapId=e.uniqueId(),this._locale=e.extend({},ea,te.locale),this._clickTolerance=te.clickTolerance,this._requestManager=new e.RequestManager(te.transformRequest,te.accessToken),typeof te.container=="string"){if(this._container=e.window.document.getElementById(te.container),!this._container)throw new Error("Container '"+te.container+"' not found.")}else if(te.container instanceof Qa)this._container=te.container;else throw new Error("Invalid type: 'container' must be a String or HTMLElement.");if(te.maxBounds&&this.setMaxBounds(te.maxBounds),e.bindAll(["_onWindowOnline","_onWindowResize","_onMapScroll","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),this.painter===void 0)throw new Error("Failed to initialize WebGL.");this.on("move",function(){return me._update(!1)}),this.on("moveend",function(){return me._update(!1)}),this.on("zoom",function(){return me._update(!0)}),typeof e.window<"u"&&(e.window.addEventListener("online",this._onWindowOnline,!1),e.window.addEventListener("resize",this._onWindowResize,!1),e.window.addEventListener("orientationchange",this._onWindowResize,!1)),this.handlers=new si(this,te);var Le=typeof te.hash=="string"&&te.hash||void 0;this._hash=te.hash&&new eu(Le).addTo(this),(!this._hash||!this._hash._onHashChange())&&(this.jumpTo({center:te.center,zoom:te.zoom,bearing:te.bearing,pitch:te.pitch}),te.bounds&&(this.resize(),this.fitBounds(te.bounds,e.extend({},te.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=te.localIdeographFontFamily,te.style&&this.setStyle(te.style,{localIdeographFontFamily:te.localIdeographFontFamily}),te.attributionControl&&this.addControl(new zi({customAttribution:te.customAttribution})),this.addControl(new Ei,te.logoPosition),this.on("style.load",function(){me.transform.unmodified&&me.jumpTo(me.style.stylesheet)}),this.on("data",function($e){me._update($e.dataType==="style"),me.fire(new e.Event($e.dataType+"data",$e))}),this.on("dataloading",function($e){me.fire(new e.Event($e.dataType+"dataloading",$e))})}ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.prototype),K.prototype.constructor=K;var _e={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(me,Ge){if(Ge===void 0&&(me.getDefaultPosition?Ge=me.getDefaultPosition():Ge="top-right"),!me||!me.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 Le=me.onAdd(this);this._controls.push(me);var $e=this._controlPositions[Ge];return Ge.indexOf("bottom")!==-1?$e.insertBefore(Le,$e.firstChild):$e.appendChild(Le),this},K.prototype.removeControl=function(me){if(!me||!me.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 Ge=this._controls.indexOf(me);return Ge>-1&&this._controls.splice(Ge,1),me.onRemove(this),this},K.prototype.hasControl=function(me){return this._controls.indexOf(me)>-1},K.prototype.resize=function(me){var Ge=this._containerDimensions(),Le=Ge[0],$e=Ge[1];this._resizeCanvas(Le,$e),this.transform.resize(Le,$e),this.painter.resize(Le,$e);var gt=!this._moving;return gt&&(this.stop(),this.fire(new e.Event("movestart",me)).fire(new e.Event("move",me))),this.fire(new e.Event("resize",me)),gt&&this.fire(new e.Event("moveend",me)),this},K.prototype.getBounds=function(){return this.transform.getBounds()},K.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},K.prototype.setMaxBounds=function(me){return this.transform.setMaxBounds(e.LngLatBounds.convert(me)),this._update()},K.prototype.setMinZoom=function(me){if(me=me??Va,me>=Va&&me<=this.transform.maxZoom)return this.transform.minZoom=me,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=me,this._update(),this.getZoom()>me&&this.setZoom(me),this;throw new Error("maxZoom must be greater than the current minZoom")},K.prototype.getMaxZoom=function(){return this.transform.maxZoom},K.prototype.setMinPitch=function(me){if(me=me??Li,me=Li&&me<=this.transform.maxPitch)return this.transform.minPitch=me,this._update(),this.getPitch()pn)throw new Error("maxPitch must be less than or equal to "+pn);if(me>=this.transform.minPitch)return this.transform.maxPitch=me,this._update(),this.getPitch()>me&&this.setPitch(me),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(me){return this.transform.renderWorldCopies=me,this._update()},K.prototype.project=function(me){return this.transform.locationPoint(e.LngLat.convert(me))},K.prototype.unproject=function(me){return this.transform.pointLocation(e.Point.convert(me))},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(me,Ge,Le){var $e=this,gt;if(me==="mouseenter"||me==="mouseover"){var jt=!1,wr=function(nr){var hr=$e.getLayer(Ge)?$e.queryRenderedFeatures(nr.point,{layers:[Ge]}):[];hr.length?jt||(jt=!0,Le.call($e,new Fe(me,$e,nr.originalEvent,{features:hr}))):jt=!1},Nr=function(){jt=!1};return{layer:Ge,listener:Le,delegates:{mousemove:wr,mouseout:Nr}}}else if(me==="mouseleave"||me==="mouseout"){var pr=!1,yt=function(nr){var hr=$e.getLayer(Ge)?$e.queryRenderedFeatures(nr.point,{layers:[Ge]}):[];hr.length?pr=!0:pr&&(pr=!1,Le.call($e,new Fe(me,$e,nr.originalEvent)))},kt=function(nr){pr&&(pr=!1,Le.call($e,new Fe(me,$e,nr.originalEvent)))};return{layer:Ge,listener:Le,delegates:{mousemove:yt,mouseout:kt}}}else{var Bt=function(nr){var hr=$e.getLayer(Ge)?$e.queryRenderedFeatures(nr.point,{layers:[Ge]}):[];hr.length&&(nr.features=hr,Le.call($e,nr),delete nr.features)};return{layer:Ge,listener:Le,delegates:(gt={},gt[me]=Bt,gt)}}},K.prototype.on=function(me,Ge,Le){if(Le===void 0)return ve.prototype.on.call(this,me,Ge);var $e=this._createDelegatedListener(me,Ge,Le);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[me]=this._delegatedListeners[me]||[],this._delegatedListeners[me].push($e);for(var gt in $e.delegates)this.on(gt,$e.delegates[gt]);return this},K.prototype.once=function(me,Ge,Le){if(Le===void 0)return ve.prototype.once.call(this,me,Ge);var $e=this._createDelegatedListener(me,Ge,Le);for(var gt in $e.delegates)this.once(gt,$e.delegates[gt]);return this},K.prototype.off=function(me,Ge,Le){var $e=this;if(Le===void 0)return ve.prototype.off.call(this,me,Ge);var gt=function(jt){for(var wr=jt[me],Nr=0;Nr180;){var Le=_e.locationPoint(ve);if(Le.x>=0&&Le.y>=0&&Le.x<=_e.width&&Le.y<=_e.height)break;ve.lng>_e.center.lng?ve.lng-=360:ve.lng+=360}return ve}var mn={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 In(ve,K,_e){var te=ve.classList;for(var me in mn)te.remove("mapboxgl-"+_e+"-anchor-"+me);te.add("mapboxgl-"+_e+"-anchor-"+K)}var Ii=function(ve){function K(_e,te){if(ve.call(this),(_e instanceof e.window.HTMLElement||te)&&(_e=e.extend({element:_e},te)),e.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress"],this),this._anchor=_e&&_e.anchor||"center",this._color=_e&&_e.color||"#3FB1CE",this._scale=_e&&_e.scale||1,this._draggable=_e&&_e.draggable||!1,this._clickTolerance=_e&&_e.clickTolerance||0,this._isDragging=!1,this._state="inactive",this._rotation=_e&&_e.rotation||0,this._rotationAlignment=_e&&_e.rotationAlignment||"auto",this._pitchAlignment=_e&&_e.pitchAlignment&&_e.pitchAlignment!=="auto"?_e.pitchAlignment:this._rotationAlignment,!_e||!_e.element){this._defaultMarker=!0,this._element=r.create("div"),this._element.setAttribute("aria-label","Map marker");var me=r.createNS("http://www.w3.org/2000/svg","svg"),Ge=41,Le=27;me.setAttributeNS(null,"display","block"),me.setAttributeNS(null,"height",Ge+"px"),me.setAttributeNS(null,"width",Le+"px"),me.setAttributeNS(null,"viewBox","0 0 "+Le+" "+Ge);var $e=r.createNS("http://www.w3.org/2000/svg","g");$e.setAttributeNS(null,"stroke","none"),$e.setAttributeNS(null,"stroke-width","1"),$e.setAttributeNS(null,"fill","none"),$e.setAttributeNS(null,"fill-rule","evenodd");var gt=r.createNS("http://www.w3.org/2000/svg","g");gt.setAttributeNS(null,"fill-rule","nonzero");var jt=r.createNS("http://www.w3.org/2000/svg","g");jt.setAttributeNS(null,"transform","translate(3.0, 29.0)"),jt.setAttributeNS(null,"fill","#000000");for(var wr=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}],Nr=0,pr=wr;Nr=me}this._isDragging&&(this._pos=te.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new e.Event("dragstart"))),this.fire(new e.Event("drag")))},K.prototype._onUp=function(){this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new e.Event("dragend")),this._state="inactive"},K.prototype._addDragHandler=function(te){this._element.contains(te.originalEvent.target)&&(te.preventDefault(),this._positionDelta=te.point.sub(this._pos).add(this._offset),this._pointerdownPos=te.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},K.prototype.setDraggable=function(te){return this._draggable=!!te,this._map&&(te?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this},K.prototype.isDraggable=function(){return this._draggable},K.prototype.setRotation=function(te){return this._rotation=te||0,this._update(),this},K.prototype.getRotation=function(){return this._rotation},K.prototype.setRotationAlignment=function(te){return this._rotationAlignment=te||"auto",this._update(),this},K.prototype.getRotationAlignment=function(){return this._rotationAlignment},K.prototype.setPitchAlignment=function(te){return this._pitchAlignment=te&&te!=="auto"?te:this._rotationAlignment,this._update(),this},K.prototype.getPitchAlignment=function(){return this._pitchAlignment},K}(e.Evented),an={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},kn;function Dn(ve){kn!==void 0?ve(kn):e.window.navigator.permissions!==void 0?e.window.navigator.permissions.query({name:"geolocation"}).then(function(K){kn=K.state!=="denied",ve(kn)}):(kn=!!e.window.navigator.geolocation,ve(kn))}var Zn=0,Ds=!1,bl=function(ve){function K(_e){ve.call(this),this.options=e.extend({},an,_e),e.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}return ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.prototype),K.prototype.constructor=K,K.prototype.onAdd=function(te){return this._map=te,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),Dn(this._setupUI),this._container},K.prototype.onRemove=function(){this._geolocationWatchID!==void 0&&(e.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),r.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,Zn=0,Ds=!1},K.prototype._isOutOfMapMaxBounds=function(te){var me=this._map.getMaxBounds(),Ge=te.coords;return me&&(Ge.longitudeme.getEast()||Ge.latitudeme.getNorth())},K.prototype._setErrorState=function(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break}},K.prototype._onSuccess=function(te){if(this._map){if(this._isOutOfMapMaxBounds(te)){this._setErrorState(),this.fire(new e.Event("outofmaxbounds",te)),this._updateMarker(),this._finish();return}if(this.options.trackUserLocation)switch(this._lastKnownPosition=te,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(te),(!this.options.trackUserLocation||this._watchState==="ACTIVE_LOCK")&&this._updateCamera(te),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new e.Event("geolocate",te)),this._finish()}},K.prototype._updateCamera=function(te){var me=new e.LngLat(te.coords.longitude,te.coords.latitude),Ge=te.coords.accuracy,Le=this._map.getBearing(),$e=e.extend({bearing:Le},this.options.fitBoundsOptions);this._map.fitBounds(me.toBounds(Ge),$e,{geolocateSource:!0})},K.prototype._updateMarker=function(te){if(te){var me=new e.LngLat(te.coords.longitude,te.coords.latitude);this._accuracyCircleMarker.setLngLat(me).addTo(this._map),this._userLocationDotMarker.setLngLat(me).addTo(this._map),this._accuracy=te.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},K.prototype._updateCircleRadius=function(){var te=this._map._container.clientHeight/2,me=this._map.unproject([0,te]),Ge=this._map.unproject([1,te]),Le=me.distanceTo(Ge),$e=Math.ceil(2*this._accuracy/Le);this._circleElement.style.width=$e+"px",this._circleElement.style.height=$e+"px"},K.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},K.prototype._onError=function(te){if(this._map){if(this.options.trackUserLocation)if(te.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;var me=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=me,this._geolocateButton.setAttribute("aria-label",me),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(te.code===3&&Ds)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new e.Event("error",te)),this._finish()}},K.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},K.prototype._setupUI=function(te){var me=this;if(this._container.addEventListener("contextmenu",function($e){return $e.preventDefault()}),this._geolocateButton=r.create("button","mapboxgl-ctrl-geolocate",this._container),r.create("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden",!0),this._geolocateButton.type="button",te===!1){e.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var Ge=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=Ge,this._geolocateButton.setAttribute("aria-label",Ge)}else{var Le=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=Le,this._geolocateButton.setAttribute("aria-label",Le)}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($e){var gt=$e.originalEvent&&$e.originalEvent.type==="resize";!$e.geolocateSource&&me._watchState==="ACTIVE_LOCK"&&!gt&&(me._watchState="BACKGROUND",me._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),me._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),me.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":Zn--,Ds=!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"),Zn++;var te;Zn>1?(te={maximumAge:6e5,timeout:0},Ds=!0):(te=this.options.positionOptions,Ds=!1),this._geolocationWatchID=e.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,te)}}else e.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},K.prototype._clearWatch=function(){e.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)},K}(e.Evented),po={maxWidth:100,unit:"metric"},Wl=function(K){this.options=e.extend({},po,K),e.bindAll(["_onMove","setUnit"],this)};Wl.prototype.getDefaultPosition=function(){return"bottom-left"},Wl.prototype._onMove=function(){fs(this._map,this._container,this.options)},Wl.prototype.onAdd=function(K){return this._map=K,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",K.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},Wl.prototype.onRemove=function(){r.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},Wl.prototype.setUnit=function(K){this.options.unit=K,fs(this._map,this._container,this.options)};function fs(ve,K,_e){var te=_e&&_e.maxWidth||100,me=ve._container.clientHeight/2,Ge=ve.unproject([0,me]),Le=ve.unproject([te,me]),$e=Ge.distanceTo(Le);if(_e&&_e.unit==="imperial"){var gt=3.2808*$e;if(gt>5280){var jt=gt/5280;Sl(K,te,jt,ve._getUIString("ScaleControl.Miles"))}else Sl(K,te,gt,ve._getUIString("ScaleControl.Feet"))}else if(_e&&_e.unit==="nautical"){var wr=$e/1852;Sl(K,te,wr,ve._getUIString("ScaleControl.NauticalMiles"))}else $e>=1e3?Sl(K,te,$e/1e3,ve._getUIString("ScaleControl.Kilometers")):Sl(K,te,$e,ve._getUIString("ScaleControl.Meters"))}function Sl(ve,K,_e,te){var me=tu(_e),Ge=me/_e;ve.style.width=K*Ge+"px",ve.innerHTML=me+" "+te}function kl(ve){var K=Math.pow(10,Math.ceil(-Math.log(ve)/Math.LN10));return Math.round(ve*K)/K}function tu(ve){var K=Math.pow(10,(""+Math.floor(ve)).length-1),_e=ve/K;return _e=_e>=10?10:_e>=5?5:_e>=3?3:_e>=2?2:_e>=1?1:kl(_e),K*_e}var qs=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")};qs.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},qs.prototype.onRemove=function(){r.remove(this._controlContainer),this._map=null,e.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},qs.prototype._checkFullscreenSupport=function(){return!!(e.window.document.fullscreenEnabled||e.window.document.mozFullScreenEnabled||e.window.document.msFullscreenEnabled||e.window.document.webkitFullscreenEnabled)},qs.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)},qs.prototype._updateTitle=function(){var K=this._getTitle();this._fullscreenButton.setAttribute("aria-label",K),this._fullscreenButton.title=K},qs.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},qs.prototype._isFullscreen=function(){return this._fullscreen},qs.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())},qs.prototype._onClickFullscreen=function(){this._isFullscreen()?e.window.document.exitFullscreen?e.window.document.exitFullscreen():e.window.document.mozCancelFullScreen?e.window.document.mozCancelFullScreen():e.window.document.msExitFullscreen?e.window.document.msExitFullscreen():e.window.document.webkitCancelFullScreen&&e.window.document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()};var pl={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px"},wl=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", "),Yn=function(ve){function K(_e){ve.call(this),this.options=e.extend(Object.create(pl),_e),e.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.prototype),K.prototype.constructor=K,K.prototype.addTo=function(te){return this._map&&this.remove(),this._map=te,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")):this._map.on("move",this._update),this.fire(new e.Event("open")),this},K.prototype.isOpen=function(){return!!this._map},K.prototype.remove=function(){return this._content&&r.remove(this._content),this._container&&(r.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),delete this._map),this.fire(new e.Event("close")),this},K.prototype.getLngLat=function(){return this._lngLat},K.prototype.setLngLat=function(te){return this._lngLat=e.LngLat.convert(te),this._pos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.remove("mapboxgl-track-pointer")),this},K.prototype.trackPointer=function(){return this._trackPointer=!0,this._pos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")),this},K.prototype.getElement=function(){return this._container},K.prototype.setText=function(te){return this.setDOMContent(e.window.document.createTextNode(te))},K.prototype.setHTML=function(te){var me=e.window.document.createDocumentFragment(),Ge=e.window.document.createElement("body"),Le;for(Ge.innerHTML=te;Le=Ge.firstChild,!!Le;)me.appendChild(Le);return this.setDOMContent(me)},K.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},K.prototype.setMaxWidth=function(te){return this.options.maxWidth=te,this._update(),this},K.prototype.setDOMContent=function(te){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=r.create("div","mapboxgl-popup-content",this._container);return this._content.appendChild(te),this._createCloseButton(),this._update(),this._focusFirstElement(),this},K.prototype.addClassName=function(te){this._container&&this._container.classList.add(te)},K.prototype.removeClassName=function(te){this._container&&this._container.classList.remove(te)},K.prototype.setOffset=function(te){return this.options.offset=te,this._update(),this},K.prototype.toggleClassName=function(te){if(this._container)return this._container.classList.toggle(te)},K.prototype._createCloseButton=function(){this.options.closeButton&&(this._closeButton=r.create("button","mapboxgl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))},K.prototype._onMouseUp=function(te){this._update(te.point)},K.prototype._onMouseMove=function(te){this._update(te.point)},K.prototype._onDrag=function(te){this._update(te.point)},K.prototype._update=function(te){var me=this,Ge=this._lngLat||this._trackPointer;if(!(!this._map||!Ge||!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(yt){return me._container.classList.add(yt)}),this._trackPointer&&this._container.classList.add("mapboxgl-popup-track-pointer")),this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._map.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=Xi(this._lngLat,this._pos,this._map.transform)),!(this._trackPointer&&!te))){var Le=this._pos=this._trackPointer&&te?te:this._map.project(this._lngLat),$e=this.options.anchor,gt=Cl(this.options.offset);if(!$e){var jt=this._container.offsetWidth,wr=this._container.offsetHeight,Nr;Le.y+gt.bottom.ythis._map.transform.height-wr?Nr=["bottom"]:Nr=[],Le.xthis._map.transform.width-jt/2&&Nr.push("right"),Nr.length===0?$e="bottom":$e=Nr.join("-")}var pr=Le.add(gt[$e]).round();r.setTransform(this._container,mn[$e]+" translate("+pr.x+"px,"+pr.y+"px)"),In(this._container,$e,"popup")}},K.prototype._focusFirstElement=function(){if(!(!this.options.focusAfterOpen||!this._container)){var te=this._container.querySelector(wl);te&&te.focus()}},K.prototype._onClose=function(){this.remove()},K}(e.Evented);function Cl(ve){if(ve)if(typeof ve=="number"){var K=Math.round(Math.sqrt(.5*Math.pow(ve,2)));return{center:new e.Point(0,0),top:new e.Point(0,ve),"top-left":new e.Point(K,K),"top-right":new e.Point(-K,K),bottom:new e.Point(0,-ve),"bottom-left":new e.Point(K,-K),"bottom-right":new e.Point(-K,-K),left:new e.Point(ve,0),right:new e.Point(-ve,0)}}else if(ve instanceof e.Point||Array.isArray(ve)){var _e=e.Point.convert(ve);return{center:_e,top:_e,"top-left":_e,"top-right":_e,bottom:_e,"bottom-left":_e,"bottom-right":_e,left:_e,right:_e}}else return{center:e.Point.convert(ve.center||[0,0]),top:e.Point.convert(ve.top||[0,0]),"top-left":e.Point.convert(ve["top-left"]||[0,0]),"top-right":e.Point.convert(ve["top-right"]||[0,0]),bottom:e.Point.convert(ve.bottom||[0,0]),"bottom-left":e.Point.convert(ve["bottom-left"]||[0,0]),"bottom-right":e.Point.convert(ve["bottom-right"]||[0,0]),left:e.Point.convert(ve.left||[0,0]),right:e.Point.convert(ve.right||[0,0])};else return Cl(new e.Point(0,0))}var Co={version:e.version,supported:t,setRTLTextPlugin:e.setRTLTextPlugin,getRTLTextPluginStatus:e.getRTLTextPluginStatus,Map:Ua,NavigationControl:Ti,GeolocateControl:bl,AttributionControl:zi,ScaleControl:Wl,FullscreenControl:qs,Popup:Yn,Marker:Ii,Style:Nl,LngLat:e.LngLat,LngLatBounds:e.LngLatBounds,Point:e.Point,MercatorCoordinate:e.MercatorCoordinate,Evented:e.Evented,config:e.config,prewarm:on,clearPrewarmedResources:hn,get accessToken(){return e.config.ACCESS_TOKEN},set accessToken(ve){e.config.ACCESS_TOKEN=ve},get baseApiUrl(){return e.config.API_URL},set baseApiUrl(ve){e.config.API_URL=ve},get workerCount(){return ri.workerCount},set workerCount(ve){ri.workerCount=ve},get maxParallelImageRequests(){return e.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(ve){e.config.MAX_PARALLEL_IMAGE_REQUESTS=ve},clearStorage:function(K){e.clearTileCache(K)},workerUrl:""};return Co}),S})}}),gV=Xe({"src/plots/mapbox/layers.js"(Z,G){"use strict";var v=sa(),x=ou().sanitizeHTML,S=E6(),E=im();function e(n,i){this.subplot=n,this.uid=n.uid+"-"+i,this.index=i,this.idSource="source-"+this.uid,this.idLayer=E.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var t=e.prototype;t.update=function(i){this.visible?this.needsNewImage(i)?this.updateImage(i):this.needsNewSource(i)?(this.removeLayer(),this.updateSource(i),this.updateLayer(i)):this.needsNewLayer(i)?this.updateLayer(i):this.updateStyle(i):(this.updateSource(i),this.updateLayer(i)),this.visible=r(i)},t.needsNewImage=function(n){var i=this.subplot.map;return i.getSource(this.idSource)&&this.sourceType==="image"&&n.sourcetype==="image"&&(this.source!==n.source||JSON.stringify(this.coordinates)!==JSON.stringify(n.coordinates))},t.needsNewSource=function(n){return this.sourceType!==n.sourcetype||JSON.stringify(this.source)!==JSON.stringify(n.source)||this.layerType!==n.type},t.needsNewLayer=function(n){return this.layerType!==n.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},t.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},t.updateImage=function(n){var i=this.subplot.map;i.getSource(this.idSource).updateImage({url:n.source,coordinates:n.coordinates});var s=this.findFollowingMapboxLayerId(this.lookupBelow());s!==null&&this.subplot.map.moveLayer(this.idLayer,s)},t.updateSource=function(n){var i=this.subplot.map;if(i.getSource(this.idSource)&&i.removeSource(this.idSource),this.sourceType=n.sourcetype,this.source=n.source,!!r(n)){var s=a(n);i.addSource(this.idSource,s)}},t.findFollowingMapboxLayerId=function(n){if(n==="traces")for(var i=this.subplot.getMapLayers(),s=0;s0){for(var s=0;s0}function o(n){var i={},s={};switch(n.type){case"circle":v.extendFlat(s,{"circle-radius":n.circle.radius,"circle-color":n.color,"circle-opacity":n.opacity});break;case"line":v.extendFlat(s,{"line-width":n.line.width,"line-color":n.color,"line-opacity":n.opacity,"line-dasharray":n.line.dash});break;case"fill":v.extendFlat(s,{"fill-color":n.color,"fill-outline-color":n.fill.outlinecolor,"fill-opacity":n.opacity});break;case"symbol":var h=n.symbol,c=S(h.textposition,h.iconsize);v.extendFlat(i,{"icon-image":h.icon+"-15","icon-size":h.iconsize/10,"text-field":h.text,"text-size":h.textfont.size,"text-anchor":c.anchor,"text-offset":c.offset,"symbol-placement":h.placement}),v.extendFlat(s,{"icon-color":n.color,"text-color":h.textfont.color,"text-opacity":n.opacity});break;case"raster":v.extendFlat(s,{"raster-fade-duration":0,"raster-opacity":n.opacity});break}return{layout:i,paint:s}}function a(n){var i=n.sourcetype,s=n.source,h={type:i},c;return i==="geojson"?c="data":i==="vector"?c=typeof s=="string"?"url":"tiles":i==="raster"?(c="tiles",h.tileSize=256):i==="image"&&(c="url",h.coordinates=n.coordinates),h[c]=s,n.sourceattribution&&(h.attribution=x(n.sourceattribution)),h}G.exports=function(i,s,h){var c=new e(i,s);return c.update(h),c}}}),yV=Xe({"src/plots/mapbox/mapbox.js"(Z,G){"use strict";var v=k6(),x=sa(),S=g0(),E=so(),e=Go(),t=Ap(),r=rf(),o=Jd(),a=o.drawMode,n=o.selectMode,i=Af().prepSelect,s=Af().clearOutline,h=Af().clearSelectionsCache,c=Af().selectOnClick,m=im(),p=gV();function T(g,b){this.id=b,this.gd=g;var d=g._fullLayout,u=g._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(g,b,d){var u=this,y=b[u.id];u.map&&y.accesstoken!==u.accessToken&&(u.map.remove(),u.map=null,u.styleObj=null,u.traceHash={},u.layerList=[]);var f;u.map?f=new Promise(function(R,L){u.updateMap(g,b,R,L)}):f=new Promise(function(R,L){u.createMap(g,b,R,L)}),d.push(f)},l.createMap=function(g,b,d,u){var y=this,f=b[y.id],R=y.styleObj=w(f.style,b);y.accessToken=f.accesstoken;var L=f.bounds,z=L?[[L.west,L.south],[L.east,L.north]]:null,F=y.map=new v.Map({container:y.div,style:R.style,center:M(f.center),zoom:f.zoom,bearing:f.bearing,pitch:f.pitch,maxBounds:z,interactive:!y.isStatic,preserveDrawingBuffer:y.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new v.AttributionControl({compact:!0}));F._canvas.style.left="0px",F._canvas.style.top="0px",y.rejectOnError(u),y.isStatic||y.initFx(g,b);var N=[];N.push(new Promise(function(O){F.once("load",O)})),N=N.concat(S.fetchTraceGeoData(g)),Promise.all(N).then(function(){y.fillBelowLookup(g,b),y.updateData(g),y.updateLayout(b),y.resolveOnRender(d)}).catch(u)},l.updateMap=function(g,b,d,u){var y=this,f=y.map,R=b[this.id];y.rejectOnError(u);var L=[],z=w(R.style,b);JSON.stringify(y.styleObj)!==JSON.stringify(z)&&(y.styleObj=z,f.setStyle(z.style),y.traceHash={},L.push(new Promise(function(F){f.once("styledata",F)}))),L=L.concat(S.fetchTraceGeoData(g)),Promise.all(L).then(function(){y.fillBelowLookup(g,b),y.updateData(g),y.updateLayout(b),y.resolveOnRender(d)}).catch(u)},l.fillBelowLookup=function(g,b){var d=b[this.id],u=d.layers,y,f,R=this.belowLookup={},L=!1;for(y=0;y1)for(y=0;y-1&&c(z.originalEvent,u,[d.xaxis],[d.yaxis],d.id,L),F.indexOf("event")>-1&&r.click(u,z.originalEvent)}}},l.updateFx=function(g){var b=this,d=b.map,u=b.gd;if(b.isStatic)return;function y(z){var F=b.map.unproject(z);return[F.lng,F.lat]}var f=g.dragmode,R;R=function(z,F){if(F.isRect){var N=z.range={};N[b.id]=[y([F.xmin,F.ymin]),y([F.xmax,F.ymax])]}else{var O=z.lassoPoints={};O[b.id]=F.map(y)}};var L=b.dragOptions;b.dragOptions=x.extendDeep(L||{},{dragmode:g.dragmode,element:b.div,gd:u,plotinfo:{id:b.id,domain:g[b.id].domain,xaxis:b.xaxis,yaxis:b.yaxis,fillRangeItems:R},xaxes:[b.xaxis],yaxes:[b.yaxis],subplot:b.id}),d.off("click",b.onClickInPanHandler),n(f)||a(f)?(d.dragPan.disable(),d.on("zoomstart",b.clearOutline),b.dragOptions.prepFn=function(z,F,N){i(z,F,N,b.dragOptions,f)},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(g){var b=g[this.id].domain,d=g._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(g){var b=g[this.id],d=b.layers,u=this.layerList,y;if(d.length!==u.length){for(y=0;yN/2){var O=R.split("|").join("
");z.text(O).attr("data-unformatted",O).call(o.convertToTspans,p),F=r.bBox(z.node())}z.attr("transform",x(-3,-F.height+8)),L.insert("rect",".static-attribution").attr({x:-F.width-6,y:-F.height-3,width:F.width+6,height:F.height+3,fill:"rgba(255, 255, 255, 0.75)"});var P=1;F.width+6>N&&(P=N/(F.width+6));var U=[_.l+_.w*M.x[1],_.t+_.h*(1-M.y[0])];L.attr("transform",x(U[0],U[1])+S(P))}};function c(p,T){var l=p._fullLayout,_=p._context;if(_.mapboxAccessToken==="")return"";for(var w=[],A=[],M=!1,g=!1,b=0;b1&&v.warn(i.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(p){return typeof p=="string"&&(i.styleValuesMapbox.indexOf(p)!==-1||p.indexOf("mapbox://")===0||p.indexOf("stamen")===0)}Z.updateFx=function(p){for(var T=p._fullLayout,l=T._subplots[n],_=0;_=0;o--)t.removeLayer(r[o][1])},e.dispose=function(){var t=this.subplot.map;this._removeLayers(),t.removeSource(this.sourceId)},G.exports=function(r,o){var a=o[0].trace,n=new E(r,a.uid),i=n.sourceId,s=v(o),h=n.below=r.belowLookup["trace-"+a.uid];return r.map.addSource(i,{type:"geojson",data:s.geojson}),n._addLayers(s,h),o[0].trace._glTrace=n,n}}}),AV=Xe({"src/traces/choroplethmapbox/index.js"(Z,G){"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(" ");G.exports={attributes:C6(),supplyDefaults:wV(),colorbar:n0(),calc:lT(),plot:TV(),hoverPoints:cT(),eventData:fT(),selectPoints:hT(),styleOnSelect:function(x,S){if(S){var E=S[0].trace;E._glTrace.updateOnSelect(S)}},getBelow:function(x,S){for(var E=S.getMapLayers(),e=E.length-2;e>=0;e--){var t=E[e].id;if(typeof t=="string"&&t.indexOf("water")===0){for(var r=e+1;r0?+p[c]:0),h.push({type:"Feature",geometry:{type:"Point",coordinates:w},properties:A})}}var g=E.extractOpts(a),b=g.reversescale?E.flipScale(g.colorscale):g.colorscale,d=b[0][1],u=S.opacity(d)<1?d:S.addOpacity(d,0),y=["interpolate",["linear"],["heatmap-density"],0,u];for(c=1;c=0;r--)e.removeLayer(t[r][1])},E.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)},G.exports=function(t,r){var o=r[0].trace,a=new S(t,o.uid),n=a.sourceId,i=v(r),s=a.below=t.belowLookup["trace-"+o.uid];return t.map.addSource(n,{type:"geojson",data:i.geojson}),a._addLayers(i,s),a}}}),LV=Xe({"src/traces/densitymapbox/hover.js"(Z,G){"use strict";var v=Go(),x=ST().hoverPoints,S=ST().getExtraText;G.exports=function(e,t,r){var o=x(e,t,r);if(o){var a=o[0],n=a.cd,i=n[0].trace,s=n[a.index];if(delete a.color,"z"in s){var h=a.subplot.mockAxis;a.z=s.z,a.zLabel=v.tickText(h,h.c2l(s.z),"hover").text}return a.extraText=S(i,s,n[0].t.labels),[a]}}}}),PV=Xe({"src/traces/densitymapbox/event_data.js"(Z,G){"use strict";G.exports=function(x,S){return x.lon=S.lon,x.lat=S.lat,x.z=S.z,x}}}),IV=Xe({"src/traces/densitymapbox/index.js"(Z,G){"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(" ");G.exports={attributes:P6(),supplyDefaults:MV(),colorbar:n0(),formatLabels:M6(),calc:EV(),plot:CV(),hoverPoints:LV(),eventData:PV(),getBelow:function(x,S){for(var E=S.getMapLayers(),e=0;eESRI"},ortoInstaMaps:{type:"raster",tiles:["https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png"],tileSize:256,maxzoom:13},ortoICGC:{type:"raster",tiles:["https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg"],tileSize:256,minzoom:13.1,maxzoom:20},openmaptiles:{type:"vector",url:"https://geoserveis.icgc.cat/contextmaps/basemap.json"}},sprite:"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1",glyphs:"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf",layers:[{id:"background",type:"background",paint:{"background-color":"#F4F9F4"}},{id:"ortoEsri",type:"raster",source:"ortoEsri",maxzoom:16,layout:{visibility:"visible"}},{id:"ortoICGC",type:"raster",source:"ortoICGC",minzoom:13.1,maxzoom:19,layout:{visibility:"visible"}},{id:"ortoInstaMaps",type:"raster",source:"ortoInstaMaps",maxzoom:13,layout:{visibility:"visible"}},{id:"waterway_tunnel",type:"line",source:"openmaptiles","source-layer":"waterway",minzoom:14,filter:["all",["in","class","river","stream","canal"],["==","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,6]]},"line-dasharray":[2,4]}},{id:"waterway-other",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["!in","class","canal","river","stream"],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,2]]}}},{id:"waterway-stream-canal",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["all",["in","class","canal","stream"],["!=","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,6]]}}},{id:"waterway-river",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["all",["==","class","river"],["!=","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.2,stops:[[10,.8],[20,4]]},"line-opacity":.5}},{id:"water-offset",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",maxzoom:8,filter:["==","$type","Polygon"],layout:{visibility:"visible"},paint:{"fill-opacity":0,"fill-color":"#a0c8f0","fill-translate":{base:1,stops:[[6,[2,0]],[8,[0,0]]]}}},{id:"water",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",layout:{visibility:"visible"},paint:{"fill-color":"hsl(210, 67%, 85%)","fill-opacity":0}},{id:"water-pattern",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",layout:{visibility:"visible"},paint:{"fill-translate":[0,2.5],"fill-pattern":"wave","fill-opacity":1}},{id:"landcover-ice-shelf",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"landcover",filter:["==","subclass","ice_shelf"],layout:{visibility:"visible"},paint:{"fill-color":"#fff","fill-opacity":{base:1,stops:[[0,.9],[10,.3]]}}},{id:"tunnel-service-track-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","service","track"]],layout:{"line-join":"round"},paint:{"line-color":"#cfcdca","line-dasharray":[.5,.25],"line-width":{base:1.2,stops:[[15,1],[16,4],[20,11]]}}},{id:"tunnel-minor-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","minor"]],layout:{"line-join":"round"},paint:{"line-color":"#cfcdca","line-opacity":{stops:[[12,0],[12.5,1]]},"line-width":{base:1.2,stops:[[12,.5],[13,1],[14,4],[20,15]]}}},{id:"tunnel-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[8,1.5],[20,17]]}}},{id:"tunnel-trunk-primary-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.7}},{id:"tunnel-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","motorway"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-dasharray":[.5,.25],"line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.5}},{id:"tunnel-path",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","tunnel"],["==","class","path"]]],paint:{"line-color":"#cba","line-dasharray":[1.5,.75],"line-width":{base:1.2,stops:[[15,1.2],[20,4]]}}},{id:"tunnel-service-track",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","service","track"]],layout:{"line-join":"round"},paint:{"line-color":"#fff","line-width":{base:1.2,stops:[[15.5,0],[16,2],[20,7.5]]}}},{id:"tunnel-minor",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","minor_road"]],layout:{"line-join":"round"},paint:{"line-color":"#fff","line-opacity":1,"line-width":{base:1.2,stops:[[13.5,0],[14,2.5],[20,11.5]]}}},{id:"tunnel-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#fff4c6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,10]]}}},{id:"tunnel-trunk-primary",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#fff4c6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"tunnel-motorway",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","motorway"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"#ffdaa6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"tunnel-railway",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","rail"]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]},"line-dasharray":[2,2]}},{id:"ferry",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["in","class","ferry"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(108, 159, 182, 1)","line-width":1.1,"line-dasharray":[2,2]}},{id:"aeroway-taxiway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:12,filter:["all",["in","class","taxiway"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(153, 153, 153, 1)","line-width":{base:1.5,stops:[[11,2],[17,12]]},"line-opacity":1}},{id:"aeroway-runway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:12,filter:["all",["in","class","runway"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(153, 153, 153, 1)","line-width":{base:1.5,stops:[[11,5],[17,55]]},"line-opacity":1}},{id:"aeroway-taxiway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:4,filter:["all",["in","class","taxiway"],["==","$type","LineString"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(255, 255, 255, 1)","line-width":{base:1.5,stops:[[11,1],[17,10]]},"line-opacity":{base:1,stops:[[11,0],[12,1]]}}},{id:"aeroway-runway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:4,filter:["all",["in","class","runway"],["==","$type","LineString"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(255, 255, 255, 1)","line-width":{base:1.5,stops:[[11,4],[17,50]]},"line-opacity":{base:1,stops:[[11,0],[12,1]]}}},{id:"highway-motorway-link-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:12,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"highway-link-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"highway-minor-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#cfcdca","line-opacity":{stops:[[12,0],[12.5,0]]},"line-width":{base:1.2,stops:[[12,.5],[13,1],[14,4],[20,15]]}}},{id:"highway-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":.5,"line-width":{base:1.2,stops:[[8,1.5],[20,17]]}}},{id:"highway-primary-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":{stops:[[7,0],[8,.6]]},"line-width":{base:1.2,stops:[[7,0],[8,.6],[9,1.5],[20,22]]}}},{id:"highway-trunk-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":{stops:[[5,0],[6,.5]]},"line-width":{base:1.2,stops:[[5,0],[6,.6],[7,1.5],[20,22]]}}},{id:"highway-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:4,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[4,0],[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":{stops:[[4,0],[5,.5]]}}},{id:"highway-path",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","path"]]],paint:{"line-color":"#cba","line-dasharray":[1.5,.75],"line-width":{base:1.2,stops:[[15,1.2],[20,4]]}}},{id:"highway-motorway-link",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:12,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"highway-link",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"highway-minor",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fff","line-opacity":.5,"line-width":{base:1.2,stops:[[13.5,0],[14,2.5],[20,11.5]]}}},{id:"highway-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[8,.5],[20,13]]},"line-opacity":.5}},{id:"highway-primary",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[8.5,0],[9,.5],[20,18]]},"line-opacity":0}},{id:"highway-trunk",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"highway-motorway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"railway-transit",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{base:1.4,stops:[[14,.4],[20,1]]}}},{id:"railway-transit-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,2],[20,6]]}}},{id:"railway-service",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],paint:{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{base:1.4,stops:[[14,.4],[20,1]]}}},{id:"railway-service-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,2],[20,6]]}}},{id:"railway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]}}},{id:"railway-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],paint:{"line-color":"#bbb","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,3],[20,8]]}}},{id:"bridge-motorway-link-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway_link"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"bridge-link-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"bridge-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[8,1.5],[20,28]]}}},{id:"bridge-trunk-primary-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"hsl(28, 76%, 67%)","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,26]]}}},{id:"bridge-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.5}},{id:"bridge-path-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],paint:{"line-color":"#f8f4f0","line-width":{base:1.2,stops:[[15,1.2],[20,18]]}}},{id:"bridge-path",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],paint:{"line-color":"#cba","line-width":{base:1.2,stops:[[15,1.2],[20,4]]},"line-dasharray":[1.5,.75]}},{id:"bridge-motorway-link",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway_link"]],layout:{"line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"bridge-link",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"bridge-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,20]]}}},{id:"bridge-trunk-primary",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]}}},{id:"bridge-motorway",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway"]],layout:{"line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"bridge-railway",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","rail"]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]}}},{id:"bridge-railway-hatching",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","rail"]],paint:{"line-color":"#bbb","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,3],[20,8]]}}},{id:"cablecar",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["==","class","cable_car"],layout:{visibility:"visible","line-cap":"round"},paint:{"line-color":"hsl(0, 0%, 70%)","line-width":{base:1,stops:[[11,1],[19,2.5]]}}},{id:"cablecar-dash",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["==","class","cable_car"],layout:{visibility:"visible","line-cap":"round"},paint:{"line-color":"hsl(0, 0%, 70%)","line-width":{base:1,stops:[[11,3],[19,5.5]]},"line-dasharray":[2,3]}},{id:"boundary-land-level-4",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",[">=","admin_level",4],["<=","admin_level",8],["!=","maritime",1]],layout:{"line-join":"round"},paint:{"line-color":"#9e9cab","line-dasharray":[3,1,1,1],"line-width":{base:1.4,stops:[[4,.4],[5,1],[12,3]]},"line-opacity":.6}},{id:"boundary-land-level-2",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["==","admin_level",2],["!=","maritime",1],["!=","disputed",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"hsl(248, 7%, 66%)","line-width":{base:1,stops:[[0,.6],[4,1.4],[5,2],[12,2]]}}},{id:"boundary-land-disputed",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["!=","maritime",1],["==","disputed",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"hsl(248, 7%, 70%)","line-dasharray":[1,3],"line-width":{base:1,stops:[[0,.6],[4,1.4],[5,2],[12,8]]}}},{id:"boundary-water",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["in","admin_level",2,4],["==","maritime",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(154, 189, 214, 1)","line-width":{base:1,stops:[[0,.6],[4,1],[5,1],[12,1]]},"line-opacity":{stops:[[6,0],[10,0]]}}},{id:"waterway-name",type:"symbol",source:"openmaptiles","source-layer":"waterway",minzoom:13,filter:["all",["==","$type","LineString"],["has","name"]],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin} {name:nonlatin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"line","text-letter-spacing":.2,"symbol-spacing":350},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"water-name-lakeline",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["==","$type","LineString"],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":`{name:latin} {name:nonlatin}`,"text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"line","symbol-spacing":350,"text-letter-spacing":.2},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"water-name-ocean",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["all",["==","$type","Point"],["==","class","ocean"]],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"point","symbol-spacing":350,"text-letter-spacing":.2},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"water-name-other",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["all",["==","$type","Point"],["!in","class","ocean"]],layout:{"text-font":["Noto Sans Italic"],"text-size":{stops:[[0,10],[6,14]]},"text-field":`{name:latin} {name:nonlatin}`,"text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"point","symbol-spacing":350,"text-letter-spacing":.2,visibility:"visible"},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"poi-level-3",type:"symbol",source:"openmaptiles","source-layer":"poi",minzoom:16,filter:["all",["==","$type","Point"],[">=","rank",25]],layout:{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":`{name:latin} {name:nonlatin}`,"text-offset":[0,.6],"text-size":12,"text-max-width":9},paint:{"text-halo-blur":.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{id:"poi-level-2",type:"symbol",source:"openmaptiles","source-layer":"poi",minzoom:15,filter:["all",["==","$type","Point"],["<=","rank",24],[">=","rank",15]],layout:{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":`{name:latin} {name:nonlatin}`,"text-offset":[0,.6],"text-size":12,"text-max-width":9},paint:{"text-halo-blur":.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{id:"poi-level-1",type:"symbol",source:"openmaptiles","source-layer":"poi",minzoom:14,filter:["all",["==","$type","Point"],["<=","rank",14],["has","name"]],layout:{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":`{name:latin} {name:nonlatin}`,"text-offset":[0,.6],"text-size":11,"text-max-width":9},paint:{"text-halo-blur":.5,"text-color":"rgba(191, 228, 172, 1)","text-halo-width":1,"text-halo-color":"rgba(30, 29, 29, 1)"}},{id:"poi-railway",type:"symbol",source:"openmaptiles","source-layer":"poi",minzoom:13,filter:["all",["==","$type","Point"],["has","name"],["==","class","railway"],["==","subclass","station"]],layout:{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":`{name:latin} {name:nonlatin}`,"text-offset":[0,.6],"text-size":12,"text-max-width":9,"icon-optional":!1,"icon-ignore-placement":!1,"icon-allow-overlap":!1,"text-ignore-placement":!1,"text-allow-overlap":!1,"text-optional":!0},paint:{"text-halo-blur":.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{id:"road_oneway",type:"symbol",source:"openmaptiles","source-layer":"transportation",minzoom:15,filter:["all",["==","oneway",1],["in","class","motorway","trunk","primary","secondary","tertiary","minor","service"]],layout:{"symbol-placement":"line","icon-image":"oneway","symbol-spacing":75,"icon-padding":2,"icon-rotation-alignment":"map","icon-rotate":90,"icon-size":{stops:[[15,.5],[19,1]]}},paint:{"icon-opacity":.5}},{id:"road_oneway_opposite",type:"symbol",source:"openmaptiles","source-layer":"transportation",minzoom:15,filter:["all",["==","oneway",-1],["in","class","motorway","trunk","primary","secondary","tertiary","minor","service"]],layout:{"symbol-placement":"line","icon-image":"oneway","symbol-spacing":75,"icon-padding":2,"icon-rotation-alignment":"map","icon-rotate":-90,"icon-size":{stops:[[15,.5],[19,1]]}},paint:{"icon-opacity":.5}},{id:"highway-name-path",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:15.5,filter:["==","class","path"],layout:{"text-size":{base:1,stops:[[13,12],[14,13]]},"text-font":["Noto Sans Regular"],"text-field":"{name:latin} {name:nonlatin}","symbol-placement":"line","text-rotation-alignment":"map"},paint:{"text-halo-color":"#f8f4f0","text-color":"hsl(30, 23%, 62%)","text-halo-width":.5}},{id:"highway-name-minor",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:15,filter:["all",["==","$type","LineString"],["in","class","minor","service","track"]],layout:{"text-size":{base:1,stops:[[13,12],[14,13]]},"text-font":["Noto Sans Regular"],"text-field":"{name:latin} {name:nonlatin}","symbol-placement":"line","text-rotation-alignment":"map"},paint:{"text-halo-blur":.5,"text-color":"#765","text-halo-width":1}},{id:"highway-name-major",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:12.2,filter:["in","class","primary","secondary","tertiary","trunk"],layout:{"text-size":{base:1,stops:[[13,12],[14,13]]},"text-font":["Noto Sans Regular"],"text-field":"{name:latin} {name:nonlatin}","symbol-placement":"line","text-rotation-alignment":"map"},paint:{"text-halo-blur":.5,"text-color":"#765","text-halo-width":1}},{id:"highway-shield",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:8,filter:["all",["<=","ref_length",6],["==","$type","LineString"],["!in","network","us-interstate","us-highway","us-state"]],layout:{"text-size":10,"icon-image":"road_{ref_length}","icon-rotation-alignment":"viewport","symbol-spacing":200,"text-font":["Noto Sans Regular"],"symbol-placement":{base:1,stops:[[10,"point"],[11,"line"]]},"text-rotation-alignment":"viewport","icon-size":1,"text-field":"{ref}"},paint:{"text-opacity":1,"text-color":"rgba(20, 19, 19, 1)","text-halo-color":"rgba(230, 221, 221, 0)","text-halo-width":2,"icon-color":"rgba(183, 18, 18, 1)","icon-opacity":.3,"icon-halo-color":"rgba(183, 55, 55, 0)"}},{id:"highway-shield-us-interstate",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:7,filter:["all",["<=","ref_length",6],["==","$type","LineString"],["in","network","us-interstate"]],layout:{"text-size":10,"icon-image":"{network}_{ref_length}","icon-rotation-alignment":"viewport","symbol-spacing":200,"text-font":["Noto Sans Regular"],"symbol-placement":{base:1,stops:[[7,"point"],[7,"line"],[8,"line"]]},"text-rotation-alignment":"viewport","icon-size":1,"text-field":"{ref}"},paint:{"text-color":"rgba(0, 0, 0, 1)"}},{id:"highway-shield-us-other",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:9,filter:["all",["<=","ref_length",6],["==","$type","LineString"],["in","network","us-highway","us-state"]],layout:{"text-size":10,"icon-image":"{network}_{ref_length}","icon-rotation-alignment":"viewport","symbol-spacing":200,"text-font":["Noto Sans Regular"],"symbol-placement":{base:1,stops:[[10,"point"],[11,"line"]]},"text-rotation-alignment":"viewport","icon-size":1,"text-field":"{ref}"},paint:{"text-color":"rgba(0, 0, 0, 1)"}},{id:"place-other",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",minzoom:12,filter:["!in","class","city","town","village","country","continent"],layout:{"text-letter-spacing":.1,"text-size":{base:1.2,stops:[[12,10],[15,14]]},"text-font":["Noto Sans Bold"],"text-field":`{name:latin} {name:nonlatin}`,"text-transform":"uppercase","text-max-width":9,visibility:"visible"},paint:{"text-color":"rgba(255,255,255,1)","text-halo-width":1.2,"text-halo-color":"rgba(57, 28, 28, 1)"}},{id:"place-village",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",minzoom:10,filter:["==","class","village"],layout:{"text-font":["Noto Sans Regular"],"text-size":{base:1.2,stops:[[10,12],[15,16]]},"text-field":`{name:latin} {name:nonlatin}`,"text-max-width":8,visibility:"visible"},paint:{"text-color":"rgba(255, 255, 255, 1)","text-halo-width":1.2,"text-halo-color":"rgba(10, 9, 9, 0.8)"}},{id:"place-town",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["==","class","town"],layout:{"text-font":["Noto Sans Regular"],"text-size":{base:1.2,stops:[[10,14],[15,24]]},"text-field":`{name:latin} {name:nonlatin}`,"text-max-width":8,visibility:"visible"},paint:{"text-color":"rgba(255, 255, 255, 1)","text-halo-width":1.2,"text-halo-color":"rgba(22, 22, 22, 0.8)"}},{id:"place-city",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["!=","capital",2],["==","class","city"]],layout:{"text-font":["Noto Sans Regular"],"text-size":{base:1.2,stops:[[7,14],[11,24]]},"text-field":`{name:latin} {name:nonlatin}`,"text-max-width":8,visibility:"visible"},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-width":1.2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-city-capital",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","capital",2],["==","class","city"]],layout:{"text-font":["Noto Sans Regular"],"text-size":{base:1.2,stops:[[7,14],[11,24]]},"text-field":`{name:latin} {name:nonlatin}`,"text-max-width":8,"icon-image":"star_11","text-offset":[.4,0],"icon-size":.8,"text-anchor":"left",visibility:"visible"},paint:{"text-color":"#333","text-halo-width":1.2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-other",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],[">=","rank",3],["!has","iso_a2"]],layout:{"text-font":["Noto Sans Italic"],"text-field":"{name:latin}","text-size":{stops:[[3,11],[7,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-3",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],[">=","rank",3],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[3,11],[7,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-2",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],["==","rank",2],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[2,11],[5,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-1",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],["==","rank",1],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[1,11],[4,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-continent",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",maxzoom:1,filter:["==","class","continent"],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":14,"text-max-width":6.25,"text-transform":"uppercase",visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}}],id:"qebnlkra6"}}}),zV=Xe({"src/plots/map/styles/arcgis-sat.js"(Z,G){G.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=Xe({"src/plots/map/constants.js"(Z,G){"use strict";var v=Jm(),x=DV(),S=zV(),E='\xA9 OpenStreetMap contributors',e="https://basemaps.cartocdn.com/gl/positron-gl-style/style.json",t="https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json",r="https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json",o="https://basemaps.cartocdn.com/gl/positron-nolabels-gl-style/style.json",a="https://basemaps.cartocdn.com/gl/dark-matter-nolabels-gl-style/style.json",n="https://basemaps.cartocdn.com/gl/voyager-nolabels-gl-style/style.json",i={basic:r,streets:r,outdoors:r,light:e,dark:t,satellite:S,"satellite-streets":x,"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:E,tiles:["https://tile.openstreetmap.org/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-osm-tiles",type:"raster",source:"plotly-osm-tiles",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"white-bg":{id:"white-bg",version:8,sources:{},layers:[{id:"white-bg",type:"background",paint:{"background-color":"#FFFFFF"},minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-positron":e,"carto-darkmatter":t,"carto-voyager":r,"carto-positron-nolabels":o,"carto-darkmatter-nolabels":a,"carto-voyager-nolabels":n},s=v(i);G.exports={styleValueDflt:"basic",stylesMap:i,styleValuesMap:s,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",missingStyleErrorMsg:["No valid maplibre style found, please set `map.style` to one of:",s.join(", "),"or use a tile service."].join(` `),mapOnErrorMsg:"Map error."}}}),kx=Xe({"src/plots/map/layout_attributes.js"(Z,G){"use strict";var v=sa(),x=$n().defaultLine,S=wc().attributes,E=tc(),e=af().textposition,t=pc().overrideAll,r=zl().templatedArray,o=b0(),a=E({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});a.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var n=G.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:x},opacity:{valType:"number",min:0,max:1,dflt:1},minzoom:{valType:"number",min:0,max:24,dflt:0},maxzoom:{valType:"number",min:0,max:24,dflt:24},circle:{radius:{valType:"number",dflt:15}},line:{width:{valType:"number",dflt:2},dash:{valType:"data_array"}},fill:{outlinecolor:{valType:"color",dflt:x}},symbol:{icon:{valType:"string",dflt:"marker"},iconsize:{valType:"number",dflt:10},text:{valType:"string",dflt:""},placement:{valType:"enumerated",values:["point","line","line-center"],dflt:"point"},textfont:a,textposition:v.extendFlat({},e,{arrayOk:!1})}})},"plot","from-root");n.uirevision={valType:"any",editType:"none"}}}),ET=Xe({"src/traces/scattermap/attributes.js"(Z,G){"use strict";var{hovertemplateAttrs:v,texttemplateAttrs:x,templatefallbackAttrs:S}=Jl(),E=$d(),e=vg(),t=af(),r=kx(),o=ru(),a=ku(),n=Qo().extendFlat,i=pc().overrideAll,s=kx(),h=e.line,c=e.marker;G.exports=i({lon:e.lon,lat:e.lat,cluster:{enabled:{valType:"boolean"},maxzoom:n({},s.layers.maxzoom,{}),step:{valType:"number",arrayOk:!0,dflt:-1,min:-1},size:{valType:"number",arrayOk:!0,dflt:20,min:0},color:{valType:"color",arrayOk:!0},opacity:n({},c.opacity,{dflt:1})},mode:n({},t.mode,{dflt:"markers"}),text:n({},t.text,{}),texttemplate:x({editType:"plot"},{keys:["lat","lon","text"]}),texttemplatefallback:S({editType:"plot"}),hovertext:n({},t.hovertext,{}),line:{color:h.color,width:h.width},connectgaps:t.connectgaps,marker:n({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:c.opacity,size:c.size,sizeref:c.sizeref,sizemin:c.sizemin,sizemode:c.sizemode},a("marker")),fill:e.fill,fillcolor:E(),textfont:r.layers.symbol.textfont,textposition:r.layers.symbol.textposition,below:{valType:"string"},selected:{marker:t.selected.marker},unselected:{marker:t.unselected.marker},hoverinfo:n({},o.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:v(),hovertemplatefallback:S()},"calc","nested")}}),I6=Xe({"src/traces/scattermap/constants.js"(Z,G){"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"];G.exports={isSupportedFont:function(x){return v.indexOf(x)!==-1}}}}),FV=Xe({"src/traces/scattermap/defaults.js"(Z,G){"use strict";var v=sa(),x=Fu(),S=md(),E=Dd(),e=zd(),t=ev(),r=ET(),o=I6().isSupportedFont;G.exports=function(i,s,h,c){function m(y,f){return v.coerce(i,s,r,y,f)}function p(y,f){return v.coerce2(i,s,r,y,f)}var T=a(i,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"),x.hasMarkers(s)){S(i,s,h,c,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]))}x.hasLines(s)&&(E(i,s,h,c,m,{noDash:!0}),m("connectgaps"));var _=p("cluster.maxzoom"),w=p("cluster.step"),A=p("cluster.color",s.marker&&s.marker.color||h),M=p("cluster.size"),g=p("cluster.opacity"),b=_!==!1||w!==!1||A!==!1||M!==!1||g!==!1,d=m("cluster.enabled",b);if(d||x.hasText(s)){var u=c.font.family;e(i,s,c,m,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:o(u)?u:"Open Sans Regular",weight:c.font.weight,style:c.font.style,size:c.font.size,color:c.font.color}})}m("fill"),s.fill!=="none"&&t(i,s,h,m),v.coerceSelectionMarkerOpacity(s,m)};function a(n,i,s){var h=s("lon")||[],c=s("lat")||[],m=Math.min(h.length,c.length);return i._length=m,m}}}),R6=Xe({"src/traces/scattermap/format_labels.js"(Z,G){"use strict";var v=Go();G.exports=function(S,E,e){var t={},r=e[E.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=Xe({"src/plots/map/convert_text_opts.js"(Z,G){"use strict";var v=sa();G.exports=function(S,E){var e=S.split(" "),t=e[0],r=e[1],o=v.isArrayOrTypedArray(E)?v.mean(E):E,a=.5+o/100,n=1.5+o/100,i=["",""],s=[0,0];switch(t){case"top":i[0]="top",s[1]=-n;break;case"bottom":i[0]="bottom",s[1]=n;break}switch(r){case"left":i[1]="right",s[0]=-a;break;case"right":i[1]="left",s[0]=a;break}var h;return i[0]&&i[1]?h=i.join("-"):i[0]?h=i[0]:i[1]?h=i[1]:h="center",{anchor:h,offset:s}}}}),OV=Xe({"src/traces/scattermap/convert.js"(Z,G){"use strict";var v=rs(),x=sa(),S=Hs().BADNUM,E=m0(),e=rc(),t=es(),r=r1(),o=Fu(),a=I6().isSupportedFont,n=D6(),i=$p().appendArrayPointValue,s=ou().NEWLINES,h=ou().BR_TAG_ALL;G.exports=function(g,b){var d=b[0].trace,u=d.visible===!0&&d._length!==0,y=d.fill!=="none",f=o.hasLines(d),R=o.hasMarkers(d),L=o.hasText(d),z=R&&d.marker.symbol==="circle",F=R&&d.marker.symbol!=="circle",N=d.cluster&&d.cluster.enabled,O=c("fill"),P=c("line"),U=c("circle"),B=c("symbol"),X={fill:O,line:P,circle:U,symbol:B};if(!u)return X;var $;if((y||f)&&($=E.calcTraceToLineCoords(b)),y&&(O.geojson=E.makePolygon($),O.layout.visibility="visible",x.extendFlat(O.paint,{"fill-color":d.fillcolor})),f&&(P.geojson=E.makeLine($),P.layout.visibility="visible",x.extendFlat(P.paint,{"line-width":d.line.width,"line-color":d.line.color,"line-opacity":d.opacity})),z){var se=m(b);U.geojson=se.geojson,U.layout.visibility="visible",N&&(U.filter=["!",["has","point_count"]],X.cluster={type:"circle",filter:["has","point_count"],layout:{visibility:"visible"},paint:{"circle-color":w(d.cluster.color,d.cluster.step),"circle-radius":w(d.cluster.size,d.cluster.step),"circle-opacity":w(d.cluster.opacity,d.cluster.step)}},X.clusterCount={type:"symbol",filter:["has","point_count"],paint:{},layout:{"text-field":"{point_count_abbreviated}","text-font":A(d),"text-size":12}}),x.extendFlat(U.paint,{"circle-color":se.mcc,"circle-radius":se.mrc,"circle-opacity":se.mo})}if(z&&N&&(U.filter=["!",["has","point_count"]]),(F||L)&&(B.geojson=p(b,g),x.extendFlat(B.layout,{visibility:"visible","icon-image":"{symbol}-15","text-field":"{text}"}),F&&(x.extendFlat(B.layout,{"icon-size":d.marker.size/10}),"angle"in d.marker&&d.marker.angle!=="auto"&&x.extendFlat(B.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),B.layout["icon-allow-overlap"]=d.marker.allowoverlap,x.extendFlat(B.paint,{"icon-opacity":d.opacity*d.marker.opacity,"icon-color":d.marker.color})),L)){var le=(d.marker||{}).size,fe=n(d.textposition,le);x.extendFlat(B.layout,{"text-size":d.textfont.size,"text-anchor":fe.anchor,"text-offset":fe.offset,"text-font":A(d)}),x.extendFlat(B.paint,{"text-color":d.textfont.color,"text-opacity":d.opacity})}return X};function c(M){return{type:M,geojson:E.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function m(M){var g=M[0].trace,b=g.marker,d=g.selectedpoints,u=x.isArrayOrTypedArray(b.color),y=x.isArrayOrTypedArray(b.size),f=x.isArrayOrTypedArray(b.opacity),R;function L(le){return g.opacity*le}function z(le){return le/2}var F;u&&(e.hasColorscale(g,"marker")?F=e.makeColorScaleFuncFromTrace(b):F=x.identity);var N;y&&(N=r(g));var O;f&&(O=function(le){var fe=v(le)?+x.constrain(le,0,1):0;return L(fe)});var P=[];for(R=0;R850?R+=" Black":u>750?R+=" Extra Bold":u>650?R+=" Bold":u>550?R+=" Semi Bold":u>450?R+=" Medium":u>350?R+=" Regular":u>250?R+=" Light":u>150?R+=" Extra Light":R+=" Thin"):y.slice(0,2).join(" ")==="Open Sans"?(R="Open Sans",u>750?R+=" Extrabold":u>650?R+=" Bold":u>550?R+=" Semibold":u>350?R+=" Regular":R+=" Light"):y.slice(0,3).join(" ")==="Klokantech Noto Sans"&&(R="Klokantech Noto Sans",y[3]==="CJK"&&(R+=" CJK"),R+=u>500?" Bold":" Regular")),f&&(R+=" Italic"),R==="Open Sans Regular Italic"?R="Open Sans Italic":R==="Open Sans Regular Bold"?R="Open Sans Bold":R==="Open Sans Regular Bold Italic"?R="Open Sans Bold Italic":R==="Klokantech Noto Sans Regular Italic"&&(R="Klokantech Noto Sans Italic"),a(R)||(R=b);var L=R.split(", ");return L}}}),BV=Xe({"src/traces/scattermap/plot.js"(Z,G){"use strict";var v=sa(),x=OV(),S=b0().traceLayerPrefix,E={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function e(r,o,a,n){this.type="scattermap",this.subplot=r,this.uid=o,this.clusterEnabled=a,this.isHidden=n,this.sourceIds={fill:"source-"+o+"-fill",line:"source-"+o+"-line",circle:"source-"+o+"-circle",symbol:"source-"+o+"-symbol",cluster:"source-"+o+"-circle",clusterCount:"source-"+o+"-circle"},this.layerIds={fill:S+o+"-fill",line:S+o+"-line",circle:S+o+"-circle",symbol:S+o+"-symbol",cluster:S+o+"-cluster",clusterCount:S+o+"-cluster-count"},this.below=null}var t=e.prototype;t.addSource=function(r,o,a){var n={type:"geojson",data:o.geojson};a&&a.enabled&&v.extendFlat(n,{cluster:!0,clusterMaxZoom:a.maxzoom});var i=this.subplot.map.getSource(this.sourceIds[r]);i?i.setData(o.geojson):this.subplot.map.addSource(this.sourceIds[r],n)},t.setSourceData=function(r,o){this.subplot.map.getSource(this.sourceIds[r]).setData(o.geojson)},t.addLayer=function(r,o,a){var n={type:o.type,id:this.layerIds[r],source:this.sourceIds[r],layout:o.layout,paint:o.paint};o.filter&&(n.filter=o.filter);for(var i=this.layerIds[r],s,h=this.subplot.getMapLayers(),c=0;c=0;f--){var R=y[f];i.removeLayer(p.layerIds[R])}u||i.removeSource(p.sourceIds.circle)}function _(u){for(var y=E.nonCluster,f=0;f=0;f--){var R=y[f];i.removeLayer(p.layerIds[R]),u||i.removeSource(p.sourceIds[R])}}function A(u){m?l(u):w(u)}function M(u){c?T(u):_(u)}function g(){for(var u=c?E.cluster:E.nonCluster,y=0;y=0;n--){var i=a[n];o.removeLayer(this.layerIds[i]),o.removeSource(this.sourceIds[i])}},G.exports=function(o,a){var n=a[0].trace,i=n.cluster&&n.cluster.enabled,s=n.visible!==!0,h=new e(o,n.uid,i,s),c=x(o.gd,a),m=h.below=o.belowLookup["trace-"+n.uid],p,T,l;if(i)for(h.addSource("circle",c.circle,n.cluster),p=0;p=0?Math.floor((n+180)/360):Math.ceil((n-180)/360),M=A*360,g=n-M;function b(N){var O=N.lonlat;if(O[0]===e||_&&T.indexOf(N.i+1)===-1)return 1/0;var P=x.modHalf(O[0],360),U=O[1],B=p.project([P,U]),X=B.x-c.c2p([g,U]),$=B.y-m.c2p([P,i]),se=Math.max(3,N.mrc||0);return Math.max(Math.sqrt(X*X+$*$)-se,1-3/se)}if(v.getClosest(s,b,a),a.index!==!1){var d=s[a.index],u=d.lonlat,y=[x.modHalf(u[0],360)+M,u[1]],f=c.c2p(y),R=m.c2p(y),L=d.mrc||1;a.x0=f-L,a.x1=f+L,a.y0=R-L,a.y1=R+L;var z={};z[h.subplot]={_subplot:p};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,n,i){if(a.hovertemplate)return;var s=n.hi||a.hoverinfo,h=s.split("+"),c=h.indexOf("all")!==-1,m=h.indexOf("lon")!==-1,p=h.indexOf("lat")!==-1,T=n.lonlat,l=[];function _(w){return w+"\xB0"}return c||m&&p?l.push("("+_(T[1])+", "+_(T[0])+")"):m?l.push(i.lon+_(T[0])):p&&l.push(i.lat+_(T[1])),(c||h.indexOf("text")!==-1)&&E(n,a,l),l.join("
")}G.exports={hoverPoints:r,getExtraText:o}}}),NV=Xe({"src/traces/scattermap/event_data.js"(Z,G){"use strict";G.exports=function(x,S){return x.lon=S.lon,x.lat=S.lat,x}}}),UV=Xe({"src/traces/scattermap/select.js"(Z,G){"use strict";var v=sa(),x=Fu(),S=Hs().BADNUM;G.exports=function(e,t){var r=e.cd,o=e.xaxis,a=e.yaxis,n=[],i=r[0].trace,s;if(!x.hasMarkers(i))return[];if(t===!1)for(s=0;s1)return 1;for(var J=W,pe=0;pe<8;pe++){var ke=this.sampleCurveX(J)-W;if(Math.abs(ke)ke?We=J:ht=J,J=.5*(ht-We)+We;return J},solve:function(W,D){return this.sampleCurveY(this.solveCurveX(W,D))}};var h=r(i);let c,m;function p(){return c==null&&(c=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),c}function T(){if(m==null&&(m=!1,p())){let D=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(D){for(let pe=0;pe<5*5;pe++){let ke=4*pe;D.fillStyle=`rgb(${ke},${ke+1},${ke+2})`,D.fillRect(pe%5,Math.floor(pe/5),1,1)}let J=D.getImageData(0,0,5,5).data;for(let pe=0;pe<5*5*4;pe++)if(pe%4!=3&&J[pe]!==pe){m=!0;break}}}return m||!1}function l(W,D,J,pe){let ke=new h(W,D,J,pe);return je=>ke.solve(je)}let _=l(.25,.1,.25,1);function w(W,D,J){return Math.min(J,Math.max(D,W))}function A(W,D,J){let pe=J-D,ke=((W-D)%pe+pe)%pe+D;return ke===D?J:ke}function M(W,...D){for(let J of D)for(let pe in J)W[pe]=J[pe];return W}let g=1;function b(W,D,J){let pe={};for(let ke in W)pe[ke]=D.call(this,W[ke],ke,W);return pe}function d(W,D,J){let pe={};for(let ke in W)D.call(this,W[ke],ke,W)&&(pe[ke]=W[ke]);return pe}function u(W){return Array.isArray(W)?W.map(u):typeof W=="object"&&W?b(W,u):W}let y={};function f(W){y[W]||(typeof console<"u"&&console.warn(W),y[W]=!0)}function R(W,D,J){return(J.y-W.y)*(D.x-W.x)>(D.y-W.y)*(J.x-W.x)}function L(W){return typeof WorkerGlobalScope<"u"&&W!==void 0&&W instanceof WorkerGlobalScope}let z=null;function F(W){return typeof ImageBitmap<"u"&&W instanceof ImageBitmap}let N="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function O(W,D,J,pe,ke){return t(this,void 0,void 0,function*(){if(typeof VideoFrame>"u")throw new Error("VideoFrame not supported");let je=new VideoFrame(W,{timestamp:0});try{let We=je?.format;if(!We||!We.startsWith("BGR")&&!We.startsWith("RGB"))throw new Error(`Unrecognized format ${We}`);let ht=We.startsWith("BGR"),Et=new Uint8ClampedArray(pe*ke*4);if(yield je.copyTo(Et,function(Ut,or,Mr,zr,Wr){let ia=4*Math.max(-or,0),ha=(Math.max(0,Mr)-Mr)*zr*4+ia,ja=4*zr,Ka=Math.max(0,or),Wi=Math.max(0,Mr);return{rect:{x:Ka,y:Wi,width:Math.min(Ut.width,or+zr)-Ka,height:Math.min(Ut.height,Mr+Wr)-Wi},layout:[{offset:ha,stride:ja}]}}(W,D,J,pe,ke)),ht)for(let Ut=0;UtL(self)?self.worker&&self.worker.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href,Y=function(W,D){if(/:\/\//.test(W.url)&&!/^https?:|^file:/.test(W.url)){let pe=se(W.url);if(pe)return pe(W,D);if(L(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:W,targetMapId:le},D)}if(!(/^file:/.test(J=W.url)||/^file:/.test(V())&&!/^\w+:/.test(J))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return function(pe,ke){return t(this,void 0,void 0,function*(){let je=new Request(pe.url,{method:pe.method||"GET",body:pe.body,credentials:pe.credentials,headers:pe.headers,cache:pe.cache,referrer:V(),signal:ke.signal});pe.type!=="json"||je.headers.has("Accept")||je.headers.set("Accept","application/json");let We=yield fetch(je);if(!We.ok){let Ut=yield We.blob();throw new fe(We.status,We.statusText,pe.url,Ut)}let ht;ht=pe.type==="arrayBuffer"||pe.type==="image"?We.arrayBuffer():pe.type==="json"?We.json():We.text();let Et=yield ht;if(ke.signal.aborted)throw X();return{data:Et,cacheControl:We.headers.get("Cache-Control"),expires:We.headers.get("Expires")}})}(W,D);if(L(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:W,mustQueue:!0,targetMapId:le},D)}var J;return function(pe,ke){return new Promise((je,We)=>{var ht;let Et=new XMLHttpRequest;Et.open(pe.method||"GET",pe.url,!0),pe.type!=="arrayBuffer"&&pe.type!=="image"||(Et.responseType="arraybuffer");for(let Ut in pe.headers)Et.setRequestHeader(Ut,pe.headers[Ut]);pe.type==="json"&&(Et.responseType="text",!((ht=pe.headers)===null||ht===void 0)&&ht.Accept||Et.setRequestHeader("Accept","application/json")),Et.withCredentials=pe.credentials==="include",Et.onerror=()=>{We(new Error(Et.statusText))},Et.onload=()=>{if(!ke.signal.aborted)if((Et.status>=200&&Et.status<300||Et.status===0)&&Et.response!==null){let Ut=Et.response;if(pe.type==="json")try{Ut=JSON.parse(Et.response)}catch(or){return void We(or)}je({data:Ut,cacheControl:Et.getResponseHeader("Cache-Control"),expires:Et.getResponseHeader("Expires")})}else{let Ut=new Blob([Et.response],{type:Et.getResponseHeader("Content-Type")});We(new fe(Et.status,Et.statusText,pe.url,Ut))}},ke.signal.addEventListener("abort",()=>{Et.abort(),We(X())}),Et.send(pe.body)})}(W,D)};function ee(W){if(!W||W.indexOf("://")<=0||W.indexOf("data:image/")===0||W.indexOf("blob:")===0)return!0;let D=new URL(W),J=window.location;return D.protocol===J.protocol&&D.host===J.host}function q(W,D,J){J[W]&&J[W].indexOf(D)!==-1||(J[W]=J[W]||[],J[W].push(D))}function oe(W,D,J){if(J&&J[W]){let pe=J[W].indexOf(D);pe!==-1&&J[W].splice(pe,1)}}class ae{constructor(D,J={}){M(this,J),this.type=D}}class j extends ae{constructor(D,J={}){super("error",M({error:D},J))}}class Q{on(D,J){return this._listeners=this._listeners||{},q(D,J,this._listeners),this}off(D,J){return oe(D,J,this._listeners),oe(D,J,this._oneTimeListeners),this}once(D,J){return J?(this._oneTimeListeners=this._oneTimeListeners||{},q(D,J,this._oneTimeListeners),this):new Promise(pe=>this.once(D,pe))}fire(D,J){typeof D=="string"&&(D=new ae(D,J||{}));let pe=D.type;if(this.listens(pe)){D.target=this;let ke=this._listeners&&this._listeners[pe]?this._listeners[pe].slice():[];for(let ht of ke)ht.call(this,D);let je=this._oneTimeListeners&&this._oneTimeListeners[pe]?this._oneTimeListeners[pe].slice():[];for(let ht of je)oe(pe,ht,this._oneTimeListeners),ht.call(this,D);let We=this._eventedParent;We&&(M(D,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),We.fire(D))}else D instanceof j&&console.error(D.error);return this}listens(D){return this._listeners&&this._listeners[D]&&this._listeners[D].length>0||this._oneTimeListeners&&this._oneTimeListeners[D]&&this._oneTimeListeners[D].length>0||this._eventedParent&&this._eventedParent.listens(D)}setEventedParent(D,J){return this._eventedParent=D,this._eventedParentData=J,this}}var re={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sky:{type:"sky"},projection:{type:"projection"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{},custom:{}},default:"mapbox"},redFactor:{type:"number",default:1},blueFactor:{type:"number",default:1},greenFactor:{type:"number",default:1},baseShift:{type:"number",default:0},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{required:!0,type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image",{"!":"icon-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"padding",default:[2],units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},"viewport-glyph":{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-variable-anchor-offset":{type:"variableAnchorOffsetCollection",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field",{"!":"text-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},sky:{"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-ground-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-fog-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"sky-horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"atmosphere-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},projection:{type:{type:"enum",default:"mercator",values:{mercator:{},globe:{}}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}};let ce=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function be(W,D){let J={};for(let pe in W)pe!=="ref"&&(J[pe]=W[pe]);return ce.forEach(pe=>{pe in D&&(J[pe]=D[pe])}),J}function Ae(W,D){if(Array.isArray(W)){if(!Array.isArray(D)||W.length!==D.length)return!1;for(let J=0;J`:W.itemType.kind==="value"?"array":`array<${D}>`}return W.kind}let Te=[ot,Qe,Pt,It,qt,qr,Wt,Ne(kr),Sr,Rr,wt];function Ie(W,D){if(D.kind==="error")return null;if(W.kind==="array"){if(D.kind==="array"&&(D.N===0&&D.itemType.kind==="value"||!Ie(W.itemType,D.itemType))&&(typeof W.N!="number"||W.N===D.N))return null}else{if(W.kind===D.kind)return null;if(W.kind==="value"){for(let J of Te)if(!Ie(J,D))return null}}return`Expected ${Ke(W)} but found ${Ke(D)} instead.`}function Ve(W,D){return D.some(J=>J.kind===W.kind)}function Ce(W,D){return D.some(J=>J==="null"?W===null:J==="array"?Array.isArray(W):J==="object"?W&&!Array.isArray(W)&&typeof W=="object":J===typeof W)}function Ee(W,D){return W.kind==="array"&&D.kind==="array"?W.itemType.kind===D.itemType.kind&&typeof W.N=="number":W.kind===D.kind}let Pe=.96422,ft=.82521,ct=4/29,_t=6/29,Ct=3*_t*_t,ir=_t*_t*_t,rr=Math.PI/180,er=180/Math.PI;function Lr(W){return(W%=360)<0&&(W+=360),W}function fa([W,D,J,pe]){let ke,je,We=Ia((.2225045*(W=Da(W))+.7168786*(D=Da(D))+.0606169*(J=Da(J)))/1);W===D&&D===J?ke=je=We:(ke=Ia((.4360747*W+.3850649*D+.1430804*J)/Pe),je=Ia((.0139322*W+.0971045*D+.7141733*J)/ft));let ht=116*We-16;return[ht<0?0:ht,500*(ke-We),200*(We-je),pe]}function Da(W){return W<=.04045?W/12.92:Math.pow((W+.055)/1.055,2.4)}function Ia(W){return W>ir?Math.pow(W,1/3):W/Ct+ct}function qa([W,D,J,pe]){let ke=(W+16)/116,je=isNaN(D)?ke:ke+D/500,We=isNaN(J)?ke:ke-J/200;return ke=1*Ca(ke),je=Pe*Ca(je),We=ft*Ca(We),[Wa(3.1338561*je-1.6168667*ke-.4906146*We),Wa(-.9787684*je+1.9161415*ke+.033454*We),Wa(.0719453*je-.2289914*ke+1.4052427*We),pe]}function Wa(W){return(W=W<=.00304?12.92*W:1.055*Math.pow(W,1/2.4)-.055)<0?0:W>1?1:W}function Ca(W){return W>_t?W*W*W:Ct*(W-ct)}function hi(W){return parseInt(W.padEnd(2,W),16)/255}function wi(W,D){return Kt(D?W/100:W,0,1)}function Kt(W,D,J){return Math.min(Math.max(D,W),J)}function Ft(W){return!W.some(Number.isNaN)}let Yt={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};class Jt{constructor(D,J,pe,ke=1,je=!0){this.r=D,this.g=J,this.b=pe,this.a=ke,je||(this.r*=ke,this.g*=ke,this.b*=ke,ke||this.overwriteGetter("rgb",[D,J,pe,ke]))}static parse(D){if(D instanceof Jt)return D;if(typeof D!="string")return;let J=function(pe){if((pe=pe.toLowerCase().trim())==="transparent")return[0,0,0,0];let ke=Yt[pe];if(ke){let[We,ht,Et]=ke;return[We/255,ht/255,Et/255,1]}if(pe.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(pe)){let We=pe.length<6?1:2,ht=1;return[hi(pe.slice(ht,ht+=We)),hi(pe.slice(ht,ht+=We)),hi(pe.slice(ht,ht+=We)),hi(pe.slice(ht,ht+We)||"ff")]}if(pe.startsWith("rgb")){let We=pe.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(We){let[ht,Et,Ut,or,Mr,zr,Wr,ia,ha,ja,Ka,Wi]=We,gi=[or||" ",Wr||" ",ja].join("");if(gi===" "||gi===" /"||gi===",,"||gi===",,,"){let qi=[Ut,zr,ha].join(""),en=qi==="%%%"?100:qi===""?255:0;if(en){let qn=[Kt(+Et/en,0,1),Kt(+Mr/en,0,1),Kt(+ia/en,0,1),Ka?wi(+Ka,Wi):1];if(Ft(qn))return qn}}return}}let je=pe.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(je){let[We,ht,Et,Ut,or,Mr,zr,Wr,ia]=je,ha=[Et||" ",or||" ",zr].join("");if(ha===" "||ha===" /"||ha===",,"||ha===",,,"){let ja=[+ht,Kt(+Ut,0,100),Kt(+Mr,0,100),Wr?wi(+Wr,ia):1];if(Ft(ja))return function([Ka,Wi,gi,qi]){function en(qn){let Eo=(qn+Ka/30)%12,ys=Wi*Math.min(gi,1-gi);return gi-ys*Math.max(-1,Math.min(Eo-3,9-Eo,1))}return Ka=Lr(Ka),Wi/=100,gi/=100,[en(0),en(8),en(4),qi]}(ja)}}}(D);return J?new Jt(...J,!1):void 0}get rgb(){let{r:D,g:J,b:pe,a:ke}=this,je=ke||1/0;return this.overwriteGetter("rgb",[D/je,J/je,pe/je,ke])}get hcl(){return this.overwriteGetter("hcl",function(D){let[J,pe,ke,je]=fa(D),We=Math.sqrt(pe*pe+ke*ke);return[Math.round(1e4*We)?Lr(Math.atan2(ke,pe)*er):NaN,We,J,je]}(this.rgb))}get lab(){return this.overwriteGetter("lab",fa(this.rgb))}overwriteGetter(D,J){return Object.defineProperty(this,D,{value:J}),J}toString(){let[D,J,pe,ke]=this.rgb;return`rgba(${[D,J,pe].map(je=>Math.round(255*je)).join(",")},${ke})`}}Jt.black=new Jt(0,0,0,1),Jt.white=new Jt(1,1,1,1),Jt.transparent=new Jt(0,0,0,0),Jt.red=new Jt(1,0,0,1);class Fr{constructor(D,J,pe){this.sensitivity=D?J?"variant":"case":J?"accent":"base",this.locale=pe,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(D,J){return this.collator.compare(D,J)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class ta{constructor(D,J,pe,ke,je){this.text=D,this.image=J,this.scale=pe,this.fontStack=ke,this.textColor=je}}class ra{constructor(D){this.sections=D}static fromString(D){return new ra([new ta(D,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(D=>D.text.length!==0||D.image&&D.image.name.length!==0)}static factory(D){return D instanceof ra?D:ra.fromString(D)}toString(){return this.sections.length===0?"":this.sections.map(D=>D.text).join("")}}class ca{constructor(D){this.values=D.slice()}static parse(D){if(D instanceof ca)return D;if(typeof D=="number")return new ca([D,D,D,D]);if(Array.isArray(D)&&!(D.length<1||D.length>4)){for(let J of D)if(typeof J!="number")return;switch(D.length){case 1:D=[D[0],D[0],D[0],D[0]];break;case 2:D=[D[0],D[1],D[0],D[1]];break;case 3:D=[D[0],D[1],D[2],D[1]]}return new ca(D)}}toString(){return JSON.stringify(this.values)}}let Ba=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class $a{constructor(D){this.values=D.slice()}static parse(D){if(D instanceof $a)return D;if(Array.isArray(D)&&!(D.length<1)&&D.length%2==0){for(let J=0;J=0&&W<=255&&typeof D=="number"&&D>=0&&D<=255&&typeof J=="number"&&J>=0&&J<=255?pe===void 0||typeof pe=="number"&&pe>=0&&pe<=1?null:`Invalid rgba value [${[W,D,J,pe].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof pe=="number"?[W,D,J,pe]:[W,D,J]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function pi(W){if(W===null||typeof W=="string"||typeof W=="boolean"||typeof W=="number"||W instanceof Jt||W instanceof Fr||W instanceof ra||W instanceof ca||W instanceof $a||W instanceof Za)return!0;if(Array.isArray(W)){for(let D of W)if(!pi(D))return!1;return!0}if(typeof W=="object"){for(let D in W)if(!pi(W[D]))return!1;return!0}return!1}function Ra(W){if(W===null)return ot;if(typeof W=="string")return Pt;if(typeof W=="boolean")return It;if(typeof W=="number")return Qe;if(W instanceof Jt)return qt;if(W instanceof Fr)return mr;if(W instanceof ra)return qr;if(W instanceof ca)return Sr;if(W instanceof $a)return wt;if(W instanceof Za)return Rr;if(Array.isArray(W)){let D=W.length,J;for(let pe of W){let ke=Ra(pe);if(J){if(J===ke)continue;J=kr;break}J=ke}return Ne(J||kr,D)}return Wt}function tn(W){let D=typeof W;return W===null?"":D==="string"||D==="number"||D==="boolean"?String(W):W instanceof Jt||W instanceof ra||W instanceof ca||W instanceof $a||W instanceof Za?W.toString():JSON.stringify(W)}class on{constructor(D,J){this.type=D,this.value=J}static parse(D,J){if(D.length!==2)return J.error(`'literal' expression requires exactly one argument, but found ${D.length-1} instead.`);if(!pi(D[1]))return J.error("invalid value");let pe=D[1],ke=Ra(pe),je=J.expectedType;return ke.kind!=="array"||ke.N!==0||!je||je.kind!=="array"||typeof je.N=="number"&&je.N!==0||(ke=je),new on(ke,pe)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}class hn{constructor(D){this.name="ExpressionEvaluationError",this.message=D}toJSON(){return this.message}}let Tt={string:Pt,number:Qe,boolean:It,object:Wt};class ut{constructor(D,J){this.type=D,this.args=J}static parse(D,J){if(D.length<2)return J.error("Expected at least one argument.");let pe,ke=1,je=D[0];if(je==="array"){let ht,Et;if(D.length>2){let Ut=D[1];if(typeof Ut!="string"||!(Ut in Tt)||Ut==="object")return J.error('The item type argument of "array" must be one of string, number, boolean',1);ht=Tt[Ut],ke++}else ht=kr;if(D.length>3){if(D[2]!==null&&(typeof D[2]!="number"||D[2]<0||D[2]!==Math.floor(D[2])))return J.error('The length argument to "array" must be a positive integer literal',2);Et=D[2],ke++}pe=Ne(ht,Et)}else{if(!Tt[je])throw new Error(`Types doesn't contain name = ${je}`);pe=Tt[je]}let We=[];for(;keD.outputDefined())}}let Br={"to-boolean":It,"to-color":qt,"to-number":Qe,"to-string":Pt};class Cr{constructor(D,J){this.type=D,this.args=J}static parse(D,J){if(D.length<2)return J.error("Expected at least one argument.");let pe=D[0];if(!Br[pe])throw new Error(`Can't parse ${pe} as it is not part of the known types`);if((pe==="to-boolean"||pe==="to-string")&&D.length!==2)return J.error("Expected one argument.");let ke=Br[pe],je=[];for(let We=1;We4?`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]),!pe))return new Jt(J[0]/255,J[1]/255,J[2]/255,J[3])}throw new hn(pe||`Could not parse color from value '${typeof J=="string"?J:JSON.stringify(J)}'`)}case"padding":{let J;for(let pe of this.args){J=pe.evaluate(D);let ke=ca.parse(J);if(ke)return ke}throw new hn(`Could not parse padding from value '${typeof J=="string"?J:JSON.stringify(J)}'`)}case"variableAnchorOffsetCollection":{let J;for(let pe of this.args){J=pe.evaluate(D);let ke=$a.parse(J);if(ke)return ke}throw new hn(`Could not parse variableAnchorOffsetCollection from value '${typeof J=="string"?J:JSON.stringify(J)}'`)}case"number":{let J=null;for(let pe of this.args){if(J=pe.evaluate(D),J===null)return 0;let ke=Number(J);if(!isNaN(ke))return ke}throw new hn(`Could not convert ${JSON.stringify(J)} to number.`)}case"formatted":return ra.fromString(tn(this.args[0].evaluate(D)));case"resolvedImage":return Za.fromString(tn(this.args[0].evaluate(D)));default:return tn(this.args[0].evaluate(D))}}eachChild(D){this.args.forEach(D)}outputDefined(){return this.args.every(D=>D.outputDefined())}}let xr=["Unknown","Point","LineString","Polygon"];class Ir{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null}id(){return this.feature&&"id"in this.feature?this.feature.id:null}geometryType(){return this.feature?typeof this.feature.type=="number"?xr[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}parseColor(D){let J=this._parseColorCache[D];return J||(J=this._parseColorCache[D]=Jt.parse(D)),J}}class Ur{constructor(D,J,pe=[],ke,je=new tt,We=[]){this.registry=D,this.path=pe,this.key=pe.map(ht=>`[${ht}]`).join(""),this.scope=je,this.errors=We,this.expectedType=ke,this._isConstant=J}parse(D,J,pe,ke,je={}){return J?this.concat(J,pe,ke)._parse(D,je):this._parse(D,je)}_parse(D,J){function pe(ke,je,We){return We==="assert"?new ut(je,[ke]):We==="coerce"?new Cr(je,[ke]):ke}if(D!==null&&typeof D!="string"&&typeof D!="boolean"&&typeof D!="number"||(D=["literal",D]),Array.isArray(D)){if(D.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');let ke=D[0];if(typeof ke!="string")return this.error(`Expression name must be a string, but found ${typeof ke} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;let je=this.registry[ke];if(je){let We=je.parse(D,this);if(!We)return null;if(this.expectedType){let ht=this.expectedType,Et=We.type;if(ht.kind!=="string"&&ht.kind!=="number"&&ht.kind!=="boolean"&&ht.kind!=="object"&&ht.kind!=="array"||Et.kind!=="value")if(ht.kind!=="color"&&ht.kind!=="formatted"&&ht.kind!=="resolvedImage"||Et.kind!=="value"&&Et.kind!=="string")if(ht.kind!=="padding"||Et.kind!=="value"&&Et.kind!=="number"&&Et.kind!=="array")if(ht.kind!=="variableAnchorOffsetCollection"||Et.kind!=="value"&&Et.kind!=="array"){if(this.checkSubtype(ht,Et))return null}else We=pe(We,ht,J.typeAnnotation||"coerce");else We=pe(We,ht,J.typeAnnotation||"coerce");else We=pe(We,ht,J.typeAnnotation||"coerce");else We=pe(We,ht,J.typeAnnotation||"assert")}if(!(We instanceof on)&&We.type.kind!=="resolvedImage"&&this._isConstant(We)){let ht=new Ir;try{We=new on(We.type,We.evaluate(ht))}catch(Et){return this.error(Et.message),null}}return We}return this.error(`Unknown expression "${ke}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(D===void 0?"'undefined' value invalid. Use null instead.":typeof D=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof D} instead.`)}concat(D,J,pe){let ke=typeof D=="number"?this.path.concat(D):this.path,je=pe?this.scope.concat(pe):this.scope;return new Ur(this.registry,this._isConstant,ke,J||null,je,this.errors)}error(D,...J){let pe=`${this.key}${J.map(ke=>`[${ke}]`).join("")}`;this.errors.push(new Oe(pe,D))}checkSubtype(D,J){let pe=Ie(D,J);return pe&&this.error(pe),pe}}class Hr{constructor(D,J){this.type=J.type,this.bindings=[].concat(D),this.result=J}evaluate(D){return this.result.evaluate(D)}eachChild(D){for(let J of this.bindings)D(J[1]);D(this.result)}static parse(D,J){if(D.length<4)return J.error(`Expected at least 3 arguments, but found ${D.length-1} instead.`);let pe=[];for(let je=1;je=pe.length)throw new hn(`Array index out of bounds: ${J} > ${pe.length-1}.`);if(J!==Math.floor(J))throw new hn(`Array index must be an integer, but found ${J} instead.`);return pe[J]}eachChild(D){D(this.index),D(this.input)}outputDefined(){return!1}}class vr{constructor(D,J){this.type=It,this.needle=D,this.haystack=J}static parse(D,J){if(D.length!==3)return J.error(`Expected 2 arguments, but found ${D.length-1} instead.`);let pe=J.parse(D[1],1,kr),ke=J.parse(D[2],2,kr);return pe&&ke?Ve(pe.type,[It,Pt,Qe,ot,kr])?new vr(pe,ke):J.error(`Expected first argument to be of type boolean, string, number or null, but found ${Ke(pe.type)} instead`):null}evaluate(D){let J=this.needle.evaluate(D),pe=this.haystack.evaluate(D);if(!pe)return!1;if(!Ce(J,["boolean","string","number","null"]))throw new hn(`Expected first argument to be of type boolean, string, number or null, but found ${Ke(Ra(J))} instead.`);if(!Ce(pe,["string","array"]))throw new hn(`Expected second argument to be of type array or string, but found ${Ke(Ra(pe))} instead.`);return pe.indexOf(J)>=0}eachChild(D){D(this.needle),D(this.haystack)}outputDefined(){return!0}}class Or{constructor(D,J,pe){this.type=Qe,this.needle=D,this.haystack=J,this.fromIndex=pe}static parse(D,J){if(D.length<=2||D.length>=5)return J.error(`Expected 3 or 4 arguments, but found ${D.length-1} instead.`);let pe=J.parse(D[1],1,kr),ke=J.parse(D[2],2,kr);if(!pe||!ke)return null;if(!Ve(pe.type,[It,Pt,Qe,ot,kr]))return J.error(`Expected first argument to be of type boolean, string, number or null, but found ${Ke(pe.type)} instead`);if(D.length===4){let je=J.parse(D[3],3,Qe);return je?new Or(pe,ke,je):null}return new Or(pe,ke)}evaluate(D){let J=this.needle.evaluate(D),pe=this.haystack.evaluate(D);if(!Ce(J,["boolean","string","number","null"]))throw new hn(`Expected first argument to be of type boolean, string, number or null, but found ${Ke(Ra(J))} instead.`);let ke;if(this.fromIndex&&(ke=this.fromIndex.evaluate(D)),Ce(pe,["string"])){let je=pe.indexOf(J,ke);return je===-1?-1:[...pe.slice(0,je)].length}if(Ce(pe,["array"]))return pe.indexOf(J,ke);throw new hn(`Expected second argument to be of type array or string, but found ${Ke(Ra(pe))} instead.`)}eachChild(D){D(this.needle),D(this.haystack),this.fromIndex&&D(this.fromIndex)}outputDefined(){return!1}}class ba{constructor(D,J,pe,ke,je,We){this.inputType=D,this.type=J,this.input=pe,this.cases=ke,this.outputs=je,this.otherwise=We}static parse(D,J){if(D.length<5)return J.error(`Expected at least 4 arguments, but found only ${D.length-1}.`);if(D.length%2!=1)return J.error("Expected an even number of arguments.");let pe,ke;J.expectedType&&J.expectedType.kind!=="value"&&(ke=J.expectedType);let je={},We=[];for(let Ut=2;UtNumber.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(pe){if(zr.checkSubtype(pe,Ra(ia)))return null}else pe=Ra(ia);if(je[String(ia)]!==void 0)return zr.error("Branch labels must be unique.");je[String(ia)]=We.length}let Wr=J.parse(Mr,Ut,ke);if(!Wr)return null;ke=ke||Wr.type,We.push(Wr)}let ht=J.parse(D[1],1,kr);if(!ht)return null;let Et=J.parse(D[D.length-1],D.length-1,ke);return Et?ht.type.kind!=="value"&&J.concat(1).checkSubtype(pe,ht.type)?null:new ba(pe,ke,ht,je,We,Et):null}evaluate(D){let J=this.input.evaluate(D);return(Ra(J)===this.inputType&&this.outputs[this.cases[J]]||this.otherwise).evaluate(D)}eachChild(D){D(this.input),this.outputs.forEach(D),D(this.otherwise)}outputDefined(){return this.outputs.every(D=>D.outputDefined())&&this.otherwise.outputDefined()}}class Pa{constructor(D,J,pe){this.type=D,this.branches=J,this.otherwise=pe}static parse(D,J){if(D.length<4)return J.error(`Expected at least 3 arguments, but found only ${D.length-1}.`);if(D.length%2!=0)return J.error("Expected an odd number of arguments.");let pe;J.expectedType&&J.expectedType.kind!=="value"&&(pe=J.expectedType);let ke=[];for(let We=1;WeJ.outputDefined())&&this.otherwise.outputDefined()}}class ya{constructor(D,J,pe,ke){this.type=D,this.input=J,this.beginIndex=pe,this.endIndex=ke}static parse(D,J){if(D.length<=2||D.length>=5)return J.error(`Expected 3 or 4 arguments, but found ${D.length-1} instead.`);let pe=J.parse(D[1],1,kr),ke=J.parse(D[2],2,Qe);if(!pe||!ke)return null;if(!Ve(pe.type,[Ne(kr),Pt,kr]))return J.error(`Expected first argument to be of type array or string, but found ${Ke(pe.type)} instead`);if(D.length===4){let je=J.parse(D[3],3,Qe);return je?new ya(pe.type,pe,ke,je):null}return new ya(pe.type,pe,ke)}evaluate(D){let J=this.input.evaluate(D),pe=this.beginIndex.evaluate(D),ke;if(this.endIndex&&(ke=this.endIndex.evaluate(D)),Ce(J,["string"]))return[...J].slice(pe,ke).join("");if(Ce(J,["array"]))return J.slice(pe,ke);throw new hn(`Expected first argument to be of type array or string, but found ${Ke(Ra(J))} instead.`)}eachChild(D){D(this.input),D(this.beginIndex),this.endIndex&&D(this.endIndex)}outputDefined(){return!1}}function la(W,D){let J=W.length-1,pe,ke,je=0,We=J,ht=0;for(;je<=We;)if(ht=Math.floor((je+We)/2),pe=W[ht],ke=W[ht+1],pe<=D){if(ht===J||DD))throw new hn("Input is not a number.");We=ht-1}return 0}class Ta{constructor(D,J,pe){this.type=D,this.input=J,this.labels=[],this.outputs=[];for(let[ke,je]of pe)this.labels.push(ke),this.outputs.push(je)}static parse(D,J){if(D.length-1<4)return J.error(`Expected at least 4 arguments, but found only ${D.length-1}.`);if((D.length-1)%2!=0)return J.error("Expected an even number of arguments.");let pe=J.parse(D[1],1,Qe);if(!pe)return null;let ke=[],je=null;J.expectedType&&J.expectedType.kind!=="value"&&(je=J.expectedType);for(let We=1;We=ht)return J.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',Ut);let Mr=J.parse(Et,or,je);if(!Mr)return null;je=je||Mr.type,ke.push([ht,Mr])}return new Ta(je,pe,ke)}evaluate(D){let J=this.labels,pe=this.outputs;if(J.length===1)return pe[0].evaluate(D);let ke=this.input.evaluate(D);if(ke<=J[0])return pe[0].evaluate(D);let je=J.length;return ke>=J[je-1]?pe[je-1].evaluate(D):pe[la(J,ke)].evaluate(D)}eachChild(D){D(this.input);for(let J of this.outputs)D(J)}outputDefined(){return this.outputs.every(D=>D.outputDefined())}}function Ai(W){return W&&W.__esModule&&Object.prototype.hasOwnProperty.call(W,"default")?W.default:W}var ki=Ki;function Ki(W,D,J,pe){this.cx=3*W,this.bx=3*(J-W)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*D,this.by=3*(pe-D)-this.cy,this.ay=1-this.cy-this.by,this.p1x=W,this.p1y=D,this.p2x=J,this.p2y=pe}Ki.prototype={sampleCurveX:function(W){return((this.ax*W+this.bx)*W+this.cx)*W},sampleCurveY:function(W){return((this.ay*W+this.by)*W+this.cy)*W},sampleCurveDerivativeX:function(W){return(3*this.ax*W+2*this.bx)*W+this.cx},solveCurveX:function(W,D){if(D===void 0&&(D=1e-6),W<0)return 0;if(W>1)return 1;for(var J=W,pe=0;pe<8;pe++){var ke=this.sampleCurveX(J)-W;if(Math.abs(ke)ke?We=J:ht=J,J=.5*(ht-We)+We;return J},solve:function(W,D){return this.sampleCurveY(this.solveCurveX(W,D))}};var _n=Ai(ki);function Rn(W,D,J){return W+J*(D-W)}function En(W,D,J){return W.map((pe,ke)=>Rn(pe,D[ke],J))}let On={number:Rn,color:function(W,D,J,pe="rgb"){switch(pe){case"rgb":{let[ke,je,We,ht]=En(W.rgb,D.rgb,J);return new Jt(ke,je,We,ht,!1)}case"hcl":{let[ke,je,We,ht]=W.hcl,[Et,Ut,or,Mr]=D.hcl,zr,Wr;if(isNaN(ke)||isNaN(Et))isNaN(ke)?isNaN(Et)?zr=NaN:(zr=Et,We!==1&&We!==0||(Wr=Ut)):(zr=ke,or!==1&&or!==0||(Wr=je));else{let Wi=Et-ke;Et>ke&&Wi>180?Wi-=360:Et180&&(Wi+=360),zr=ke+J*Wi}let[ia,ha,ja,Ka]=function([Wi,gi,qi,en]){return Wi=isNaN(Wi)?0:Wi*rr,qa([qi,Math.cos(Wi)*gi,Math.sin(Wi)*gi,en])}([zr,Wr??Rn(je,Ut,J),Rn(We,or,J),Rn(ht,Mr,J)]);return new Jt(ia,ha,ja,Ka,!1)}case"lab":{let[ke,je,We,ht]=qa(En(W.lab,D.lab,J));return new Jt(ke,je,We,ht,!1)}}},array:En,padding:function(W,D,J){return new ca(En(W.values,D.values,J))},variableAnchorOffsetCollection:function(W,D,J){let pe=W.values,ke=D.values;if(pe.length!==ke.length)throw new hn(`Cannot interpolate values of different length. from: ${W.toString()}, to: ${D.toString()}`);let je=[];for(let We=0;Wetypeof or!="number"||or<0||or>1))return J.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);ke={name:"cubic-bezier",controlPoints:Ut}}}if(D.length-1<4)return J.error(`Expected at least 4 arguments, but found only ${D.length-1}.`);if((D.length-1)%2!=0)return J.error("Expected an even number of arguments.");if(je=J.parse(je,2,Qe),!je)return null;let ht=[],Et=null;pe==="interpolate-hcl"||pe==="interpolate-lab"?Et=qt:J.expectedType&&J.expectedType.kind!=="value"&&(Et=J.expectedType);for(let Ut=0;Ut=or)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,Et);if(!ia)return null;Et=Et||ia.type,ht.push([or,ia])}return Ee(Et,Qe)||Ee(Et,qt)||Ee(Et,Sr)||Ee(Et,wt)||Ee(Et,Ne(Qe))?new no(Et,pe,ke,je,ht):J.error(`Type ${Ke(Et)} is not interpolatable.`)}evaluate(D){let J=this.labels,pe=this.outputs;if(J.length===1)return pe[0].evaluate(D);let ke=this.input.evaluate(D);if(ke<=J[0])return pe[0].evaluate(D);let je=J.length;if(ke>=J[je-1])return pe[je-1].evaluate(D);let We=la(J,ke),ht=no.interpolationFactor(this.interpolation,ke,J[We],J[We+1]),Et=pe[We].evaluate(D),Ut=pe[We+1].evaluate(D);switch(this.operator){case"interpolate":return On[this.type.kind](Et,Ut,ht);case"interpolate-hcl":return On.color(Et,Ut,ht,"hcl");case"interpolate-lab":return On.color(Et,Ut,ht,"lab")}}eachChild(D){D(this.input);for(let J of this.outputs)D(J)}outputDefined(){return this.outputs.every(D=>D.outputDefined())}}function cn(W,D,J,pe){let ke=pe-J,je=W-J;return ke===0?0:D===1?je/ke:(Math.pow(D,je)-1)/(Math.pow(D,ke)-1)}class lo{constructor(D,J){this.type=D,this.args=J}static parse(D,J){if(D.length<2)return J.error("Expectected at least one argument.");let pe=null,ke=J.expectedType;ke&&ke.kind!=="value"&&(pe=ke);let je=[];for(let ht of D.slice(1)){let Et=J.parse(ht,1+je.length,pe,void 0,{typeAnnotation:"omit"});if(!Et)return null;pe=pe||Et.type,je.push(Et)}if(!pe)throw new Error("No output type");let We=ke&&je.some(ht=>Ie(ke,ht.type));return new lo(We?kr:pe,je)}evaluate(D){let J,pe=null,ke=0;for(let je of this.args)if(ke++,pe=je.evaluate(D),pe&&pe instanceof Za&&!pe.available&&(J||(J=pe.name),pe=null,ke===this.args.length&&(pe=J)),pe!==null)break;return pe}eachChild(D){this.args.forEach(D)}outputDefined(){return this.args.every(D=>D.outputDefined())}}function Wo(W,D){return W==="=="||W==="!="?D.kind==="boolean"||D.kind==="string"||D.kind==="number"||D.kind==="null"||D.kind==="value":D.kind==="string"||D.kind==="number"||D.kind==="value"}function hs(W,D,J,pe){return pe.compare(D,J)===0}function Oo(W,D,J){let pe=W!=="=="&&W!=="!=";return class t7{constructor(je,We,ht){this.type=It,this.lhs=je,this.rhs=We,this.collator=ht,this.hasUntypedArgument=je.type.kind==="value"||We.type.kind==="value"}static parse(je,We){if(je.length!==3&&je.length!==4)return We.error("Expected two or three arguments.");let ht=je[0],Et=We.parse(je[1],1,kr);if(!Et)return null;if(!Wo(ht,Et.type))return We.concat(1).error(`"${ht}" comparisons are not supported for type '${Ke(Et.type)}'.`);let Ut=We.parse(je[2],2,kr);if(!Ut)return null;if(!Wo(ht,Ut.type))return We.concat(2).error(`"${ht}" comparisons are not supported for type '${Ke(Ut.type)}'.`);if(Et.type.kind!==Ut.type.kind&&Et.type.kind!=="value"&&Ut.type.kind!=="value")return We.error(`Cannot compare types '${Ke(Et.type)}' and '${Ke(Ut.type)}'.`);pe&&(Et.type.kind==="value"&&Ut.type.kind!=="value"?Et=new ut(Ut.type,[Et]):Et.type.kind!=="value"&&Ut.type.kind==="value"&&(Ut=new ut(Et.type,[Ut])));let or=null;if(je.length===4){if(Et.type.kind!=="string"&&Ut.type.kind!=="string"&&Et.type.kind!=="value"&&Ut.type.kind!=="value")return We.error("Cannot use collator to compare non-string types.");if(or=We.parse(je[3],3,mr),!or)return null}return new t7(Et,Ut,or)}evaluate(je){let We=this.lhs.evaluate(je),ht=this.rhs.evaluate(je);if(pe&&this.hasUntypedArgument){let Et=Ra(We),Ut=Ra(ht);if(Et.kind!==Ut.kind||Et.kind!=="string"&&Et.kind!=="number")throw new hn(`Expected arguments for "${W}" to be (string, string) or (number, number), but found (${Et.kind}, ${Ut.kind}) instead.`)}if(this.collator&&!pe&&this.hasUntypedArgument){let Et=Ra(We),Ut=Ra(ht);if(Et.kind!=="string"||Ut.kind!=="string")return D(je,We,ht)}return this.collator?J(je,We,ht,this.collator.evaluate(je)):D(je,We,ht)}eachChild(je){je(this.lhs),je(this.rhs),this.collator&&je(this.collator)}outputDefined(){return!0}}}let Wn=Oo("==",function(W,D,J){return D===J},hs),No=Oo("!=",function(W,D,J){return D!==J},function(W,D,J,pe){return!hs(0,D,J,pe)}),as=Oo("<",function(W,D,J){return D",function(W,D,J){return D>J},function(W,D,J,pe){return pe.compare(D,J)>0}),ss=Oo("<=",function(W,D,J){return D<=J},function(W,D,J,pe){return pe.compare(D,J)<=0}),uo=Oo(">=",function(W,D,J){return D>=J},function(W,D,J,pe){return pe.compare(D,J)>=0});class jn{constructor(D,J,pe){this.type=mr,this.locale=pe,this.caseSensitive=D,this.diacriticSensitive=J}static parse(D,J){if(D.length!==2)return J.error("Expected one argument.");let pe=D[1];if(typeof pe!="object"||Array.isArray(pe))return J.error("Collator options argument must be an object.");let ke=J.parse(pe["case-sensitive"]!==void 0&&pe["case-sensitive"],1,It);if(!ke)return null;let je=J.parse(pe["diacritic-sensitive"]!==void 0&&pe["diacritic-sensitive"],1,It);if(!je)return null;let We=null;return pe.locale&&(We=J.parse(pe.locale,1,Pt),!We)?null:new jn(ke,je,We)}evaluate(D){return new Fr(this.caseSensitive.evaluate(D),this.diacriticSensitive.evaluate(D),this.locale?this.locale.evaluate(D):null)}eachChild(D){D(this.caseSensitive),D(this.diacriticSensitive),this.locale&&D(this.locale)}outputDefined(){return!1}}class Xn{constructor(D,J,pe,ke,je){this.type=Pt,this.number=D,this.locale=J,this.currency=pe,this.minFractionDigits=ke,this.maxFractionDigits=je}static parse(D,J){if(D.length!==3)return J.error("Expected two arguments.");let pe=J.parse(D[1],1,Qe);if(!pe)return null;let ke=D[2];if(typeof ke!="object"||Array.isArray(ke))return J.error("NumberFormat options argument must be an object.");let je=null;if(ke.locale&&(je=J.parse(ke.locale,1,Pt),!je))return null;let We=null;if(ke.currency&&(We=J.parse(ke.currency,1,Pt),!We))return null;let ht=null;if(ke["min-fraction-digits"]&&(ht=J.parse(ke["min-fraction-digits"],1,Qe),!ht))return null;let Et=null;return ke["max-fraction-digits"]&&(Et=J.parse(ke["max-fraction-digits"],1,Qe),!Et)?null:new Xn(pe,je,We,ht,Et)}evaluate(D){return new Intl.NumberFormat(this.locale?this.locale.evaluate(D):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(D):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(D):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(D):void 0}).format(this.number.evaluate(D))}eachChild(D){D(this.number),this.locale&&D(this.locale),this.currency&&D(this.currency),this.minFractionDigits&&D(this.minFractionDigits),this.maxFractionDigits&&D(this.maxFractionDigits)}outputDefined(){return!1}}class ls{constructor(D){this.type=qr,this.sections=D}static parse(D,J){if(D.length<2)return J.error("Expected at least one argument.");let pe=D[1];if(!Array.isArray(pe)&&typeof pe=="object")return J.error("First argument must be an image or text section.");let ke=[],je=!1;for(let We=1;We<=D.length-1;++We){let ht=D[We];if(je&&typeof ht=="object"&&!Array.isArray(ht)){je=!1;let Et=null;if(ht["font-scale"]&&(Et=J.parse(ht["font-scale"],1,Qe),!Et))return null;let Ut=null;if(ht["text-font"]&&(Ut=J.parse(ht["text-font"],1,Ne(Pt)),!Ut))return null;let or=null;if(ht["text-color"]&&(or=J.parse(ht["text-color"],1,qt),!or))return null;let Mr=ke[ke.length-1];Mr.scale=Et,Mr.font=Ut,Mr.textColor=or}else{let Et=J.parse(D[We],1,kr);if(!Et)return null;let Ut=Et.type.kind;if(Ut!=="string"&&Ut!=="value"&&Ut!=="null"&&Ut!=="resolvedImage")return J.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");je=!0,ke.push({content:Et,scale:null,font:null,textColor:null})}}return new ls(ke)}evaluate(D){return new ra(this.sections.map(J=>{let pe=J.content.evaluate(D);return Ra(pe)===Rr?new ta("",pe,null,null,null):new ta(tn(pe),null,J.scale?J.scale.evaluate(D):null,J.font?J.font.evaluate(D).join(","):null,J.textColor?J.textColor.evaluate(D):null)}))}eachChild(D){for(let J of this.sections)D(J.content),J.scale&&D(J.scale),J.font&&D(J.font),J.textColor&&D(J.textColor)}outputDefined(){return!1}}class Cs{constructor(D){this.type=Rr,this.input=D}static parse(D,J){if(D.length!==2)return J.error("Expected two arguments.");let pe=J.parse(D[1],1,Pt);return pe?new Cs(pe):J.error("No image name provided.")}evaluate(D){let J=this.input.evaluate(D),pe=Za.fromString(J);return pe&&D.availableImages&&(pe.available=D.availableImages.indexOf(J)>-1),pe}eachChild(D){D(this.input)}outputDefined(){return!1}}class Ks{constructor(D){this.type=Qe,this.input=D}static parse(D,J){if(D.length!==2)return J.error(`Expected 1 argument, but found ${D.length-1} instead.`);let pe=J.parse(D[1],1);return pe?pe.type.kind!=="array"&&pe.type.kind!=="string"&&pe.type.kind!=="value"?J.error(`Expected argument of type string or array, but found ${Ke(pe.type)} instead.`):new Ks(pe):null}evaluate(D){let J=this.input.evaluate(D);if(typeof J=="string")return[...J].length;if(Array.isArray(J))return J.length;throw new hn(`Expected value to be of type string or array, but found ${Ke(Ra(J))} instead.`)}eachChild(D){D(this.input)}outputDefined(){return!1}}let Xo=8192;function Gi(W,D){let J=(180+W[0])/360,pe=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+W[1]*Math.PI/360)))/360,ke=Math.pow(2,D.z);return[Math.round(J*ke*Xo),Math.round(pe*ke*Xo)]}function Ln(W,D){let J=Math.pow(2,D.z);return[(ke=(W[0]/Xo+D.x)/J,360*ke-180),(pe=(W[1]/Xo+D.y)/J,360/Math.PI*Math.atan(Math.exp((180-360*pe)*Math.PI/180))-90)];var pe,ke}function Us(W,D){W[0]=Math.min(W[0],D[0]),W[1]=Math.min(W[1],D[1]),W[2]=Math.max(W[2],D[0]),W[3]=Math.max(W[3],D[1])}function _s(W,D){return!(W[0]<=D[0]||W[2]>=D[2]||W[1]<=D[1]||W[3]>=D[3])}function Gn(W,D,J){let pe=W[0]-D[0],ke=W[1]-D[1],je=W[0]-J[0],We=W[1]-J[1];return pe*We-je*ke==0&&pe*je<=0&&ke*We<=0}function zs(W,D,J,pe){return(ke=[pe[0]-J[0],pe[1]-J[1]])[0]*(je=[D[0]-W[0],D[1]-W[1]])[1]-ke[1]*je[0]!=0&&!(!bo(W,D,J,pe)||!bo(J,pe,W,D));var ke,je}function vs(W,D,J){for(let pe of J)for(let ke=0;ke(ke=W)[1]!=(We=ht[Et+1])[1]>ke[1]&&ke[0]<(We[0]-je[0])*(ke[1]-je[1])/(We[1]-je[1])+je[0]&&(pe=!pe)}var ke,je,We;return pe}function il(W,D){for(let J of D)if(Ws(W,J))return!0;return!1}function xn(W,D){for(let J of W)if(!Ws(J,D))return!1;for(let J=0;J0&&ht<0||We<0&&ht>0}function Is(W,D,J){let pe=[];for(let ke=0;keJ[2]){let ke=.5*pe,je=W[0]-J[0]>ke?-pe:J[0]-W[0]>ke?pe:0;je===0&&(je=W[0]-J[2]>ke?-pe:J[2]-W[0]>ke?pe:0),W[0]+=je}Us(D,W)}function Vs(W,D,J,pe){let ke=Math.pow(2,pe.z)*Xo,je=[pe.x*Xo,pe.y*Xo],We=[];for(let ht of W)for(let Et of ht){let Ut=[Et.x+je[0],Et.y+je[1]];co(Ut,D,J,ke),We.push(Ut)}return We}function vl(W,D,J,pe){let ke=Math.pow(2,pe.z)*Xo,je=[pe.x*Xo,pe.y*Xo],We=[];for(let Et of W){let Ut=[];for(let or of Et){let Mr=[or.x+je[0],or.y+je[1]];Us(D,Mr),Ut.push(Mr)}We.push(Ut)}if(D[2]-D[0]<=ke/2){(ht=D)[0]=ht[1]=1/0,ht[2]=ht[3]=-1/0;for(let Et of We)for(let Ut of Et)co(Ut,D,J,ke)}var ht;return We}class Ts{constructor(D,J){this.type=It,this.geojson=D,this.geometries=J}static parse(D,J){if(D.length!==2)return J.error(`'within' expression requires exactly one argument, but found ${D.length-1} instead.`);if(pi(D[1])){let pe=D[1];if(pe.type==="FeatureCollection"){let ke=[];for(let je of pe.features){let{type:We,coordinates:ht}=je.geometry;We==="Polygon"&&ke.push(ht),We==="MultiPolygon"&&ke.push(...ht)}if(ke.length)return new Ts(pe,{type:"MultiPolygon",coordinates:ke})}else if(pe.type==="Feature"){let ke=pe.geometry.type;if(ke==="Polygon"||ke==="MultiPolygon")return new Ts(pe,pe.geometry)}else if(pe.type==="Polygon"||pe.type==="MultiPolygon")return new Ts(pe,pe)}return J.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(D){if(D.geometry()!=null&&D.canonicalID()!=null){if(D.geometryType()==="Point")return function(J,pe){let ke=[1/0,1/0,-1/0,-1/0],je=[1/0,1/0,-1/0,-1/0],We=J.canonicalID();if(pe.type==="Polygon"){let ht=Is(pe.coordinates,je,We),Et=Vs(J.geometry(),ke,je,We);if(!_s(ke,je))return!1;for(let Ut of Et)if(!Ws(Ut,ht))return!1}if(pe.type==="MultiPolygon"){let ht=pu(pe.coordinates,je,We),Et=Vs(J.geometry(),ke,je,We);if(!_s(ke,je))return!1;for(let Ut of Et)if(!il(Ut,ht))return!1}return!0}(D,this.geometries);if(D.geometryType()==="LineString")return function(J,pe){let ke=[1/0,1/0,-1/0,-1/0],je=[1/0,1/0,-1/0,-1/0],We=J.canonicalID();if(pe.type==="Polygon"){let ht=Is(pe.coordinates,je,We),Et=vl(J.geometry(),ke,je,We);if(!_s(ke,je))return!1;for(let Ut of Et)if(!xn(Ut,ht))return!1}if(pe.type==="MultiPolygon"){let ht=pu(pe.coordinates,je,We),Et=vl(J.geometry(),ke,je,We);if(!_s(ke,je))return!1;for(let Ut of Et)if(!ko(Ut,ht))return!1}return!0}(D,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let js=class{constructor(W=[],D=(J,pe)=>Jpe?1:0){if(this.data=W,this.length=this.data.length,this.compare=D,this.length>0)for(let J=(this.length>>1)-1;J>=0;J--)this._down(J)}push(W){this.data.push(W),this._up(this.length++)}pop(){if(this.length===0)return;let W=this.data[0],D=this.data.pop();return--this.length>0&&(this.data[0]=D,this._down(0)),W}peek(){return this.data[0]}_up(W){let{data:D,compare:J}=this,pe=D[W];for(;W>0;){let ke=W-1>>1,je=D[ke];if(J(pe,je)>=0)break;D[W]=je,W=ke}D[W]=pe}_down(W){let{data:D,compare:J}=this,pe=this.length>>1,ke=D[W];for(;W=0)break;D[W]=D[je],W=je}D[W]=ke}};function us(W,D,J,pe,ke){As(W,D,J,pe||W.length-1,ke||su)}function As(W,D,J,pe,ke){for(;pe>J;){if(pe-J>600){var je=pe-J+1,We=D-J+1,ht=Math.log(je),Et=.5*Math.exp(2*ht/3),Ut=.5*Math.sqrt(ht*Et*(je-Et)/je)*(We-je/2<0?-1:1);As(W,D,Math.max(J,Math.floor(D-We*Et/je+Ut)),Math.min(pe,Math.floor(D+(je-We)*Et/je+Ut)),ke)}var or=W[D],Mr=J,zr=pe;for(Nl(W,J,D),ke(W[pe],or)>0&&Nl(W,J,pe);Mr0;)zr--}ke(W[J],or)===0?Nl(W,J,zr):Nl(W,++zr,pe),zr<=D&&(J=zr+1),D<=zr&&(pe=zr-1)}}function Nl(W,D,J){var pe=W[D];W[D]=W[J],W[J]=pe}function su(W,D){return WD?1:0}function Tc(W,D){if(W.length<=1)return[W];let J=[],pe,ke;for(let je of W){let We=Sf(je);We!==0&&(je.area=Math.abs(We),ke===void 0&&(ke=We<0),ke===We<0?(pe&&J.push(pe),pe=[je]):pe.push(je))}if(pe&&J.push(pe),D>1)for(let je=0;je1?(Ut=D[Et+1][0],or=D[Et+1][1]):Wr>0&&(Ut+=Mr/this.kx*Wr,or+=zr/this.ky*Wr)),Mr=this.wrap(J[0]-Ut)*this.kx,zr=(J[1]-or)*this.ky;let ia=Mr*Mr+zr*zr;ia180;)D-=360;return D}}function lu(W,D){return D[0]-W[0]}function Pl(W){return W[1]-W[0]+1}function ic(W,D){return W[1]>=W[0]&&W[1]W[1])return[null,null];let J=Pl(W);if(D){if(J===2)return[W,null];let ke=Math.floor(J/2);return[[W[0],W[0]+ke],[W[0]+ke,W[1]]]}if(J===1)return[W,null];let pe=Math.floor(J/2)-1;return[[W[0],W[0]+pe],[W[0]+pe+1,W[1]]]}function nl(W,D){if(!ic(D,W.length))return[1/0,1/0,-1/0,-1/0];let J=[1/0,1/0,-1/0,-1/0];for(let pe=D[0];pe<=D[1];++pe)Us(J,W[pe]);return J}function ml(W){let D=[1/0,1/0,-1/0,-1/0];for(let J of W)for(let pe of J)Us(D,pe);return D}function xs(W){return W[0]!==-1/0&&W[1]!==-1/0&&W[2]!==1/0&&W[3]!==1/0}function Xs(W,D,J){if(!xs(W)||!xs(D))return NaN;let pe=0,ke=0;return W[2]D[2]&&(pe=W[0]-D[2]),W[1]>D[3]&&(ke=W[1]-D[3]),W[3]=pe)return pe;if(_s(ke,je)){if(bh(W,D))return 0}else if(bh(D,W))return 0;let We=1/0;for(let ht of W)for(let Et=0,Ut=ht.length,or=Ut-1;Et0;){let Et=We.pop();if(Et[0]>=je)continue;let Ut=Et[1],or=D?50:100;if(Pl(Ut)<=or){if(!ic(Ut,W.length))return NaN;if(D){let Mr=ns(W,Ut,J,pe);if(isNaN(Mr)||Mr===0)return Mr;je=Math.min(je,Mr)}else for(let Mr=Ut[0];Mr<=Ut[1];++Mr){let zr=xh(W[Mr],J,pe);if(je=Math.min(je,zr),je===0)return 0}}else{let Mr=Ou(Ut,D);to(We,je,pe,W,ht,Mr[0]),to(We,je,pe,W,ht,Mr[1])}}return je}function jl(W,D,J,pe,ke,je=1/0){let We=Math.min(je,ke.distance(W[0],J[0]));if(We===0)return We;let ht=new js([[0,[0,W.length-1],[0,J.length-1]]],lu);for(;ht.length>0;){let Et=ht.pop();if(Et[0]>=We)continue;let Ut=Et[1],or=Et[2],Mr=D?50:100,zr=pe?50:100;if(Pl(Ut)<=Mr&&Pl(or)<=zr){if(!ic(Ut,W.length)&&ic(or,J.length))return NaN;let Wr;if(D&&pe)Wr=qu(W,Ut,J,or,ke),We=Math.min(We,Wr);else if(D&&!pe){let ia=W.slice(Ut[0],Ut[1]+1);for(let ha=or[0];ha<=or[1];++ha)if(Wr=nc(J[ha],ia,ke),We=Math.min(We,Wr),We===0)return We}else if(!D&&pe){let ia=J.slice(or[0],or[1]+1);for(let ha=Ut[0];ha<=Ut[1];++ha)if(Wr=nc(W[ha],ia,ke),We=Math.min(We,Wr),We===0)return We}else Wr=fl(W,Ut,J,or,ke),We=Math.min(We,Wr)}else{let Wr=Ou(Ut,D),ia=Ou(or,pe);Wc(ht,We,ke,W,J,Wr[0],ia[0]),Wc(ht,We,ke,W,J,Wr[0],ia[1]),Wc(ht,We,ke,W,J,Wr[1],ia[0]),Wc(ht,We,ke,W,J,Wr[1],ia[1])}}return We}function Mf(W){return W.type==="MultiPolygon"?W.coordinates.map(D=>({type:"Polygon",coordinates:D})):W.type==="MultiLineString"?W.coordinates.map(D=>({type:"LineString",coordinates:D})):W.type==="MultiPoint"?W.coordinates.map(D=>({type:"Point",coordinates:D})):[W]}class Ac{constructor(D,J){this.type=Qe,this.geojson=D,this.geometries=J}static parse(D,J){if(D.length!==2)return J.error(`'distance' expression requires exactly one argument, but found ${D.length-1} instead.`);if(pi(D[1])){let pe=D[1];if(pe.type==="FeatureCollection")return new Ac(pe,pe.features.map(ke=>Mf(ke.geometry)).flat());if(pe.type==="Feature")return new Ac(pe,Mf(pe.geometry));if("type"in pe&&"coordinates"in pe)return new Ac(pe,Mf(pe))}return J.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(D){if(D.geometry()!=null&&D.canonicalID()!=null){if(D.geometryType()==="Point")return function(J,pe){let ke=J.geometry(),je=ke.flat().map(Et=>Ln([Et.x,Et.y],J.canonical));if(ke.length===0)return NaN;let We=new Hc(je[0][1]),ht=1/0;for(let Et of pe){switch(Et.type){case"Point":ht=Math.min(ht,jl(je,!1,[Et.coordinates],!1,We,ht));break;case"LineString":ht=Math.min(ht,jl(je,!1,Et.coordinates,!0,We,ht));break;case"Polygon":ht=Math.min(ht,Vu(je,!1,Et.coordinates,We,ht))}if(ht===0)return ht}return ht}(D,this.geometries);if(D.geometryType()==="LineString")return function(J,pe){let ke=J.geometry(),je=ke.flat().map(Et=>Ln([Et.x,Et.y],J.canonical));if(ke.length===0)return NaN;let We=new Hc(je[0][1]),ht=1/0;for(let Et of pe){switch(Et.type){case"Point":ht=Math.min(ht,jl(je,!0,[Et.coordinates],!1,We,ht));break;case"LineString":ht=Math.min(ht,jl(je,!0,Et.coordinates,!0,We,ht));break;case"Polygon":ht=Math.min(ht,Vu(je,!0,Et.coordinates,We,ht))}if(ht===0)return ht}return ht}(D,this.geometries);if(D.geometryType()==="Polygon")return function(J,pe){let ke=J.geometry();if(ke.length===0||ke[0].length===0)return NaN;let je=Tc(ke,0).map(Et=>Et.map(Ut=>Ut.map(or=>Ln([or.x,or.y],J.canonical)))),We=new Hc(je[0][0][0][1]),ht=1/0;for(let Et of pe)for(let Ut of je){switch(Et.type){case"Point":ht=Math.min(ht,Vu([Et.coordinates],!1,Ut,We,ht));break;case"LineString":ht=Math.min(ht,Vu(Et.coordinates,!0,Ut,We,ht));break;case"Polygon":ht=Math.min(ht,Es(Ut,Et.coordinates,We,ht))}if(ht===0)return ht}return ht}(D,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}let nf={"==":Wn,"!=":No,">":Ns,"<":as,">=":uo,"<=":ss,array:ut,at:Xt,boolean:ut,case:Pa,coalesce:lo,collator:jn,format:ls,image:Cs,in:vr,"index-of":Or,interpolate:no,"interpolate-hcl":no,"interpolate-lab":no,length:Ks,let:Hr,literal:on,match:ba,number:ut,"number-format":Xn,object:ut,slice:ya,step:Ta,string:ut,"to-boolean":Cr,"to-color":Cr,"to-number":Cr,"to-string":Cr,var:xt,within:Ts,distance:Ac};class $l{constructor(D,J,pe,ke){this.name=D,this.type=J,this._evaluate=pe,this.args=ke}evaluate(D){return this._evaluate(D,this.args)}eachChild(D){this.args.forEach(D)}outputDefined(){return!1}static parse(D,J){let pe=D[0],ke=$l.definitions[pe];if(!ke)return J.error(`Unknown expression "${pe}". If you wanted a literal array, use ["literal", [...]].`,0);let je=Array.isArray(ke)?ke[0]:ke.type,We=Array.isArray(ke)?[[ke[1],ke[2]]]:ke.overloads,ht=We.filter(([Ut])=>!Array.isArray(Ut)||Ut.length===D.length-1),Et=null;for(let[Ut,or]of ht){Et=new Ur(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(Ke).join(", ")})`:`(${Ke(zr.type)}...)`;var zr}).join(" | "),or=[];for(let Mr=1;Mr{J=D?J&&Bf(pe):J&&pe instanceof on}),!!J&&Nf(W)&&Ef(W,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function Nf(W){if(W instanceof $l&&(W.name==="get"&&W.args.length===1||W.name==="feature-state"||W.name==="has"&&W.args.length===1||W.name==="properties"||W.name==="geometry-type"||W.name==="id"||/^filter-/.test(W.name))||W instanceof Ts||W instanceof Ac)return!1;let D=!0;return W.eachChild(J=>{D&&!Nf(J)&&(D=!1)}),D}function Gu(W){if(W instanceof $l&&W.name==="feature-state")return!1;let D=!0;return W.eachChild(J=>{D&&!Gu(J)&&(D=!1)}),D}function Ef(W,D){if(W instanceof $l&&D.indexOf(W.name)>=0)return!1;let J=!0;return W.eachChild(pe=>{J&&!Ef(pe,D)&&(J=!1)}),J}function oc(W){return{result:"success",value:W}}function Xc(W){return{result:"error",value:W}}function Ql(W){return W["property-type"]==="data-driven"||W["property-type"]==="cross-faded-data-driven"}function qc(W){return!!W.expression&&W.expression.parameters.indexOf("zoom")>-1}function Sc(W){return!!W.expression&&W.expression.interpolated}function Zs(W){return W instanceof Number?"number":W instanceof String?"string":W instanceof Boolean?"boolean":Array.isArray(W)?"array":W===null?"null":typeof W}function kf(W){return typeof W=="object"&&W!==null&&!Array.isArray(W)}function fh(W){return W}function Uf(W,D){let J=D.type==="color",pe=W.stops&&typeof W.stops[0][0]=="object",ke=pe||!(pe||W.property!==void 0),je=W.type||(Sc(D)?"exponential":"interval");if(J||D.type==="padding"){let or=J?Jt.parse:ca.parse;(W=he({},W)).stops&&(W.stops=W.stops.map(Mr=>[Mr[0],or(Mr[1])])),W.default=or(W.default?W.default:D.default)}if(W.colorSpace&&(We=W.colorSpace)!=="rgb"&&We!=="hcl"&&We!=="lab")throw new Error(`Unknown color space: "${W.colorSpace}"`);var We;let ht,Et,Ut;if(je==="exponential")ht=jf;else if(je==="interval")ht=Cu;else if(je==="categorical"){ht=$f,Et=Object.create(null);for(let or of W.stops)Et[or[0]]=or[1];Ut=typeof W.stops[0][0]}else{if(je!=="identity")throw new Error(`Unknown function type "${je}"`);ht=yl}if(pe){let or={},Mr=[];for(let ia=0;iaia[0]),evaluate:({zoom:ia},ha)=>jf({stops:zr,base:W.base},D,ia).evaluate(ia,ha)}}if(ke){let or=je==="exponential"?{name:"exponential",base:W.base!==void 0?W.base:1}:null;return{kind:"camera",interpolationType:or,interpolationFactor:no.interpolationFactor.bind(void 0,or),zoomStops:W.stops.map(Mr=>Mr[0]),evaluate:({zoom:Mr})=>ht(W,D,Mr,Et,Ut)}}return{kind:"source",evaluate(or,Mr){let zr=Mr&&Mr.properties?Mr.properties[W.property]:void 0;return zr===void 0?Zc(W.default,D.default):ht(W,D,zr,Et,Ut)}}}function Zc(W,D,J){return W!==void 0?W:D!==void 0?D:J!==void 0?J:void 0}function $f(W,D,J,pe,ke){return Zc(typeof J===ke?pe[J]:void 0,W.default,D.default)}function Cu(W,D,J){if(Zs(J)!=="number")return Zc(W.default,D.default);let pe=W.stops.length;if(pe===1||J<=W.stops[0][0])return W.stops[0][1];if(J>=W.stops[pe-1][0])return W.stops[pe-1][1];let ke=la(W.stops.map(je=>je[0]),J);return W.stops[ke][1]}function jf(W,D,J){let pe=W.base!==void 0?W.base:1;if(Zs(J)!=="number")return Zc(W.default,D.default);let ke=W.stops.length;if(ke===1||J<=W.stops[0][0])return W.stops[0][1];if(J>=W.stops[ke-1][0])return W.stops[ke-1][1];let je=la(W.stops.map(or=>or[0]),J),We=function(or,Mr,zr,Wr){let ia=Wr-zr,ha=or-zr;return ia===0?0:Mr===1?ha/ia:(Math.pow(Mr,ha)-1)/(Math.pow(Mr,ia)-1)}(J,pe,W.stops[je][0],W.stops[je+1][0]),ht=W.stops[je][1],Et=W.stops[je+1][1],Ut=On[D.type]||fh;return typeof ht.evaluate=="function"?{evaluate(...or){let Mr=ht.evaluate.apply(void 0,or),zr=Et.evaluate.apply(void 0,or);if(Mr!==void 0&&zr!==void 0)return Ut(Mr,zr,We,W.colorSpace)}}:Ut(ht,Et,We,W.colorSpace)}function yl(W,D,J){switch(D.type){case"color":J=Jt.parse(J);break;case"formatted":J=ra.fromString(J.toString());break;case"resolvedImage":J=Za.fromString(J.toString());break;case"padding":J=ca.parse(J);break;default:Zs(J)===D.type||D.type==="enum"&&D.values[J]||(J=void 0)}return Zc(J,W.default,D.default)}$l.register(nf,{error:[{kind:"error"},[Pt],(W,[D])=>{throw new hn(D.evaluate(W))}],typeof:[Pt,[kr],(W,[D])=>Ke(Ra(D.evaluate(W)))],"to-rgba":[Ne(Qe,4),[qt],(W,[D])=>{let[J,pe,ke,je]=D.evaluate(W).rgb;return[255*J,255*pe,255*ke,je]}],rgb:[qt,[Qe,Qe,Qe],Jf],rgba:[qt,[Qe,Qe,Qe,Qe],Jf],has:{type:It,overloads:[[[Pt],(W,[D])=>Of(D.evaluate(W),W.properties())],[[Pt,Wt],(W,[D,J])=>Of(D.evaluate(W),J.evaluate(W))]]},get:{type:kr,overloads:[[[Pt],(W,[D])=>of(D.evaluate(W),W.properties())],[[Pt,Wt],(W,[D,J])=>of(D.evaluate(W),J.evaluate(W))]]},"feature-state":[kr,[Pt],(W,[D])=>of(D.evaluate(W),W.featureState||{})],properties:[Wt,[],W=>W.properties()],"geometry-type":[Pt,[],W=>W.geometryType()],id:[kr,[],W=>W.id()],zoom:[Qe,[],W=>W.globals.zoom],"heatmap-density":[Qe,[],W=>W.globals.heatmapDensity||0],"line-progress":[Qe,[],W=>W.globals.lineProgress||0],accumulated:[kr,[],W=>W.globals.accumulated===void 0?null:W.globals.accumulated],"+":[Qe,jc(Qe),(W,D)=>{let J=0;for(let pe of D)J+=pe.evaluate(W);return J}],"*":[Qe,jc(Qe),(W,D)=>{let J=1;for(let pe of D)J*=pe.evaluate(W);return J}],"-":{type:Qe,overloads:[[[Qe,Qe],(W,[D,J])=>D.evaluate(W)-J.evaluate(W)],[[Qe],(W,[D])=>-D.evaluate(W)]]},"/":[Qe,[Qe,Qe],(W,[D,J])=>D.evaluate(W)/J.evaluate(W)],"%":[Qe,[Qe,Qe],(W,[D,J])=>D.evaluate(W)%J.evaluate(W)],ln2:[Qe,[],()=>Math.LN2],pi:[Qe,[],()=>Math.PI],e:[Qe,[],()=>Math.E],"^":[Qe,[Qe,Qe],(W,[D,J])=>Math.pow(D.evaluate(W),J.evaluate(W))],sqrt:[Qe,[Qe],(W,[D])=>Math.sqrt(D.evaluate(W))],log10:[Qe,[Qe],(W,[D])=>Math.log(D.evaluate(W))/Math.LN10],ln:[Qe,[Qe],(W,[D])=>Math.log(D.evaluate(W))],log2:[Qe,[Qe],(W,[D])=>Math.log(D.evaluate(W))/Math.LN2],sin:[Qe,[Qe],(W,[D])=>Math.sin(D.evaluate(W))],cos:[Qe,[Qe],(W,[D])=>Math.cos(D.evaluate(W))],tan:[Qe,[Qe],(W,[D])=>Math.tan(D.evaluate(W))],asin:[Qe,[Qe],(W,[D])=>Math.asin(D.evaluate(W))],acos:[Qe,[Qe],(W,[D])=>Math.acos(D.evaluate(W))],atan:[Qe,[Qe],(W,[D])=>Math.atan(D.evaluate(W))],min:[Qe,jc(Qe),(W,D)=>Math.min(...D.map(J=>J.evaluate(W)))],max:[Qe,jc(Qe),(W,D)=>Math.max(...D.map(J=>J.evaluate(W)))],abs:[Qe,[Qe],(W,[D])=>Math.abs(D.evaluate(W))],round:[Qe,[Qe],(W,[D])=>{let J=D.evaluate(W);return J<0?-Math.round(-J):Math.round(J)}],floor:[Qe,[Qe],(W,[D])=>Math.floor(D.evaluate(W))],ceil:[Qe,[Qe],(W,[D])=>Math.ceil(D.evaluate(W))],"filter-==":[It,[Pt,kr],(W,[D,J])=>W.properties()[D.value]===J.value],"filter-id-==":[It,[kr],(W,[D])=>W.id()===D.value],"filter-type-==":[It,[Pt],(W,[D])=>W.geometryType()===D.value],"filter-<":[It,[Pt,kr],(W,[D,J])=>{let pe=W.properties()[D.value],ke=J.value;return typeof pe==typeof ke&&pe{let J=W.id(),pe=D.value;return typeof J==typeof pe&&J":[It,[Pt,kr],(W,[D,J])=>{let pe=W.properties()[D.value],ke=J.value;return typeof pe==typeof ke&&pe>ke}],"filter-id->":[It,[kr],(W,[D])=>{let J=W.id(),pe=D.value;return typeof J==typeof pe&&J>pe}],"filter-<=":[It,[Pt,kr],(W,[D,J])=>{let pe=W.properties()[D.value],ke=J.value;return typeof pe==typeof ke&&pe<=ke}],"filter-id-<=":[It,[kr],(W,[D])=>{let J=W.id(),pe=D.value;return typeof J==typeof pe&&J<=pe}],"filter->=":[It,[Pt,kr],(W,[D,J])=>{let pe=W.properties()[D.value],ke=J.value;return typeof pe==typeof ke&&pe>=ke}],"filter-id->=":[It,[kr],(W,[D])=>{let J=W.id(),pe=D.value;return typeof J==typeof pe&&J>=pe}],"filter-has":[It,[kr],(W,[D])=>D.value in W.properties()],"filter-has-id":[It,[],W=>W.id()!==null&&W.id()!==void 0],"filter-type-in":[It,[Ne(Pt)],(W,[D])=>D.value.indexOf(W.geometryType())>=0],"filter-id-in":[It,[Ne(kr)],(W,[D])=>D.value.indexOf(W.id())>=0],"filter-in-small":[It,[Pt,Ne(kr)],(W,[D,J])=>J.value.indexOf(W.properties()[D.value])>=0],"filter-in-large":[It,[Pt,Ne(kr)],(W,[D,J])=>function(pe,ke,je,We){for(;je<=We;){let ht=je+We>>1;if(ke[ht]===pe)return!0;ke[ht]>pe?We=ht-1:je=ht+1}return!1}(W.properties()[D.value],J.value,0,J.value.length-1)],all:{type:It,overloads:[[[It,It],(W,[D,J])=>D.evaluate(W)&&J.evaluate(W)],[jc(It),(W,D)=>{for(let J of D)if(!J.evaluate(W))return!1;return!0}]]},any:{type:It,overloads:[[[It,It],(W,[D,J])=>D.evaluate(W)||J.evaluate(W)],[jc(It),(W,D)=>{for(let J of D)if(J.evaluate(W))return!0;return!1}]]},"!":[It,[It],(W,[D])=>!D.evaluate(W)],"is-supported-script":[It,[Pt],(W,[D])=>{let J=W.globals&&W.globals.isSupportedScript;return!J||J(D.evaluate(W))}],upcase:[Pt,[Pt],(W,[D])=>D.evaluate(W).toUpperCase()],downcase:[Pt,[Pt],(W,[D])=>D.evaluate(W).toLowerCase()],concat:[Pt,jc(kr),(W,D)=>D.map(J=>tn(J.evaluate(W))).join("")],"resolved-locale":[Pt,[mr],(W,[D])=>D.evaluate(W).resolvedLocale()]});class Lu{constructor(D,J){var pe;this.expression=D,this._warningHistory={},this._evaluator=new Ir,this._defaultValue=J?(pe=J).type==="color"&&kf(pe.default)?new Jt(0,0,0,0):pe.type==="color"?Jt.parse(pe.default)||null:pe.type==="padding"?ca.parse(pe.default)||null:pe.type==="variableAnchorOffsetCollection"?$a.parse(pe.default)||null:pe.default===void 0?null:pe.default:null,this._enumValues=J&&J.type==="enum"?J.values:null}evaluateWithoutErrorHandling(D,J,pe,ke,je,We){return this._evaluator.globals=D,this._evaluator.feature=J,this._evaluator.featureState=pe,this._evaluator.canonical=ke,this._evaluator.availableImages=je||null,this._evaluator.formattedSection=We,this.expression.evaluate(this._evaluator)}evaluate(D,J,pe,ke,je,We){this._evaluator.globals=D,this._evaluator.feature=J||null,this._evaluator.featureState=pe||null,this._evaluator.canonical=ke,this._evaluator.availableImages=je||null,this._evaluator.formattedSection=We||null;try{let ht=this.expression.evaluate(this._evaluator);if(ht==null||typeof ht=="number"&&ht!=ht)return this._defaultValue;if(this._enumValues&&!(ht in this._enumValues))throw new hn(`Expected value to be one of ${Object.keys(this._enumValues).map(Et=>JSON.stringify(Et)).join(", ")}, but found ${JSON.stringify(ht)} instead.`);return ht}catch(ht){return this._warningHistory[ht.message]||(this._warningHistory[ht.message]=!0,typeof console<"u"&&console.warn(ht.message)),this._defaultValue}}}function Mc(W){return Array.isArray(W)&&W.length>0&&typeof W[0]=="string"&&W[0]in nf}function ol(W,D){let J=new Ur(nf,Bf,[],D?function(ke){let je={color:qt,string:Pt,number:Qe,enum:Pt,boolean:It,formatted:qr,padding:Sr,resolvedImage:Rr,variableAnchorOffsetCollection:wt};return ke.type==="array"?Ne(je[ke.value]||kr,ke.length):je[ke.type]}(D):void 0),pe=J.parse(W,void 0,void 0,void 0,D&&D.type==="string"?{typeAnnotation:"coerce"}:void 0);return pe?oc(new Lu(pe,D)):Xc(J.errors)}class vc{constructor(D,J){this.kind=D,this._styleExpression=J,this.isStateDependent=D!=="constant"&&!Gu(J.expression)}evaluateWithoutErrorHandling(D,J,pe,ke,je,We){return this._styleExpression.evaluateWithoutErrorHandling(D,J,pe,ke,je,We)}evaluate(D,J,pe,ke,je,We){return this._styleExpression.evaluate(D,J,pe,ke,je,We)}}class yu{constructor(D,J,pe,ke){this.kind=D,this.zoomStops=pe,this._styleExpression=J,this.isStateDependent=D!=="camera"&&!Gu(J.expression),this.interpolationType=ke}evaluateWithoutErrorHandling(D,J,pe,ke,je,We){return this._styleExpression.evaluateWithoutErrorHandling(D,J,pe,ke,je,We)}evaluate(D,J,pe,ke,je,We){return this._styleExpression.evaluate(D,J,pe,ke,je,We)}interpolationFactor(D,J,pe){return this.interpolationType?no.interpolationFactor(this.interpolationType,D,J,pe):0}}function Tu(W,D){let J=ol(W,D);if(J.result==="error")return J;let pe=J.value.expression,ke=Nf(pe);if(!ke&&!Ql(D))return Xc([new Oe("","data expressions not supported")]);let je=Ef(pe,["zoom"]);if(!je&&!qc(D))return Xc([new Oe("","zoom expressions not supported")]);let We=qf(pe);return We||je?We instanceof Oe?Xc([We]):We instanceof no&&!Sc(D)?Xc([new Oe("",'"interpolate" expressions cannot be used with this property')]):oc(We?new yu(ke?"camera":"composite",J.value,We.labels,We instanceof no?We.interpolation:void 0):new vc(ke?"constant":"source",J.value)):Xc([new Oe("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class El{constructor(D,J){this._parameters=D,this._specification=J,he(this,Uf(this._parameters,this._specification))}static deserialize(D){return new El(D._parameters,D._specification)}static serialize(D){return{_parameters:D._parameters,_specification:D._specification}}}function qf(W){let D=null;if(W instanceof Hr)D=qf(W.result);else if(W instanceof lo){for(let J of W.args)if(D=qf(J),D)break}else(W instanceof Ta||W instanceof no)&&W.input instanceof $l&&W.input.name==="zoom"&&(D=W);return D instanceof Oe||W.eachChild(J=>{let pe=qf(J);pe instanceof Oe?D=pe:!D&&pe?D=new Oe("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):D&&pe&&D!==pe&&(D=new Oe("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),D}function Qf(W){if(W===!0||W===!1)return!0;if(!Array.isArray(W)||W.length===0)return!1;switch(W[0]){case"has":return W.length>=2&&W[1]!=="$id"&&W[1]!=="$type";case"in":return W.length>=3&&(typeof W[1]!="string"||Array.isArray(W[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return W.length!==3||Array.isArray(W[1])||Array.isArray(W[2]);case"any":case"all":for(let D of W.slice(1))if(!Qf(D)&&typeof D!="boolean")return!1;return!0;default:return!0}}let Bu={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Ec(W){if(W==null)return{filter:()=>!0,needGeometry:!1};Qf(W)||(W=sf(W));let D=ol(W,Bu);if(D.result==="error")throw new Error(D.value.map(J=>`${J.key}: ${J.message}`).join(", "));return{filter:(J,pe,ke)=>D.value.evaluate(J,pe,{},ke),needGeometry:Lh(W)}}function mc(W,D){return WD?1:0}function Lh(W){if(!Array.isArray(W))return!1;if(W[0]==="within"||W[0]==="distance")return!0;for(let D=1;D"||D==="<="||D===">="?vf(W[1],W[2],D):D==="any"?(J=W.slice(1),["any"].concat(J.map(sf))):D==="all"?["all"].concat(W.slice(1).map(sf)):D==="none"?["all"].concat(W.slice(1).map(sf).map(au)):D==="in"?Nu(W[1],W.slice(2)):D==="!in"?au(Nu(W[1],W.slice(2))):D==="has"?lf(W[1]):D!=="!has"||au(lf(W[1]));var J}function vf(W,D,J){switch(W){case"$type":return[`filter-type-${J}`,D];case"$id":return[`filter-id-${J}`,D];default:return[`filter-${J}`,W,D]}}function Nu(W,D){if(D.length===0)return!1;switch(W){case"$type":return["filter-type-in",["literal",D]];case"$id":return["filter-id-in",["literal",D]];default:return D.length>200&&!D.some(J=>typeof J!=typeof D[0])?["filter-in-large",W,["literal",D.sort(mc)]]:["filter-in-small",W,["literal",D]]}}function lf(W){switch(W){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",W]}}function au(W){return["!",W]}function Yc(W){let D=typeof W;if(D==="number"||D==="boolean"||D==="string"||W==null)return JSON.stringify(W);if(Array.isArray(W)){let ke="[";for(let je of W)ke+=`${Yc(je)},`;return`${ke}]`}let J=Object.keys(W).sort(),pe="{";for(let ke=0;kepe.maximum?[new ye(D,J,`${J} is greater than the maximum value ${pe.maximum}`)]:[]}function uf(W){let D=W.valueSpec,J=sl(W.value.type),pe,ke,je,We={},ht=J!=="categorical"&&W.value.property===void 0,Et=!ht,Ut=Zs(W.value.stops)==="array"&&Zs(W.value.stops[0])==="array"&&Zs(W.value.stops[0][0])==="object",or=Pu({key:W.key,value:W.value,valueSpec:W.styleSpec.function,validateSpec:W.validateSpec,style:W.style,styleSpec:W.styleSpec,objectElementValidators:{stops:function(Wr){if(J==="identity")return[new ye(Wr.key,Wr.value,'identity function may not have a "stops" property')];let ia=[],ha=Wr.value;return ia=ia.concat(Cf({key:Wr.key,value:ha,valueSpec:Wr.valueSpec,validateSpec:Wr.validateSpec,style:Wr.style,styleSpec:Wr.styleSpec,arrayElementValidator:Mr})),Zs(ha)==="array"&&ha.length===0&&ia.push(new ye(Wr.key,ha,"array must have at least one stop")),ia},default:function(Wr){return Wr.validateSpec({key:Wr.key,value:Wr.value,valueSpec:D,validateSpec:Wr.validateSpec,style:Wr.style,styleSpec:Wr.styleSpec})}}});return J==="identity"&&ht&&or.push(new ye(W.key,W.value,'missing required property "property"')),J==="identity"||W.value.stops||or.push(new ye(W.key,W.value,'missing required property "stops"')),J==="exponential"&&W.valueSpec.expression&&!Sc(W.valueSpec)&&or.push(new ye(W.key,W.value,"exponential functions not supported")),W.styleSpec.$version>=8&&(Et&&!Ql(W.valueSpec)?or.push(new ye(W.key,W.value,"property functions not supported")):ht&&!qc(W.valueSpec)&&or.push(new ye(W.key,W.value,"zoom functions not supported"))),J!=="categorical"&&!Ut||W.value.property!==void 0||or.push(new ye(W.key,W.value,'"property" property is required')),or;function Mr(Wr){let ia=[],ha=Wr.value,ja=Wr.key;if(Zs(ha)!=="array")return[new ye(ja,ha,`array expected, ${Zs(ha)} found`)];if(ha.length!==2)return[new ye(ja,ha,`array length 2 expected, length ${ha.length} found`)];if(Ut){if(Zs(ha[0])!=="object")return[new ye(ja,ha,`object expected, ${Zs(ha[0])} found`)];if(ha[0].zoom===void 0)return[new ye(ja,ha,"object stop key must have zoom")];if(ha[0].value===void 0)return[new ye(ja,ha,"object stop key must have value")];if(je&&je>sl(ha[0].zoom))return[new ye(ja,ha[0].zoom,"stop zoom values must appear in ascending order")];sl(ha[0].zoom)!==je&&(je=sl(ha[0].zoom),ke=void 0,We={}),ia=ia.concat(Pu({key:`${ja}[0]`,value:ha[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:ha[0],valueSpec:{},validateSpec:Wr.validateSpec,style:Wr.style,styleSpec:Wr.styleSpec},ha));return Mc(_u(ha[1]))?ia.concat([new ye(`${ja}[1]`,ha[1],"expressions are not allowed in function stops.")]):ia.concat(Wr.validateSpec({key:`${ja}[1]`,value:ha[1],valueSpec:D,validateSpec:Wr.validateSpec,style:Wr.style,styleSpec:Wr.styleSpec}))}function zr(Wr,ia){let ha=Zs(Wr.value),ja=sl(Wr.value),Ka=Wr.value!==null?Wr.value:ia;if(pe){if(ha!==pe)return[new ye(Wr.key,Ka,`${ha} stop domain type must match previous stop domain type ${pe}`)]}else pe=ha;if(ha!=="number"&&ha!=="string"&&ha!=="boolean")return[new ye(Wr.key,Ka,"stop domain value must be a number, string, or boolean")];if(ha!=="number"&&J!=="categorical"){let Wi=`number expected, ${ha} found`;return Ql(D)&&J===void 0&&(Wi+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new ye(Wr.key,Ka,Wi)]}return J!=="categorical"||ha!=="number"||isFinite(ja)&&Math.floor(ja)===ja?J!=="categorical"&&ha==="number"&&ke!==void 0&&janew ye(`${W.key}${pe.key}`,W.value,pe.message));let J=D.value.expression||D.value._styleExpression.expression;if(W.expressionContext==="property"&&W.propertyKey==="text-font"&&!J.outputDefined())return[new ye(W.key,W.value,`Invalid data expression for "${W.propertyKey}". Output values must be contained as literals within the expression.`)];if(W.expressionContext==="property"&&W.propertyType==="layout"&&!Gu(J))return[new ye(W.key,W.value,'"feature-state" data expressions are not supported with layout properties.')];if(W.expressionContext==="filter"&&!Gu(J))return[new ye(W.key,W.value,'"feature-state" data expressions are not supported with filters.')];if(W.expressionContext&&W.expressionContext.indexOf("cluster")===0){if(!Ef(J,["zoom","feature-state"]))return[new ye(W.key,W.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(W.expressionContext==="cluster-initial"&&!Nf(J))return[new ye(W.key,W.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Hu(W){let D=W.key,J=W.value,pe=W.valueSpec,ke=[];return Array.isArray(pe.values)?pe.values.indexOf(sl(J))===-1&&ke.push(new ye(D,J,`expected one of [${pe.values.join(", ")}], ${JSON.stringify(J)} found`)):Object.keys(pe.values).indexOf(sl(J))===-1&&ke.push(new ye(D,J,`expected one of [${Object.keys(pe.values).join(", ")}], ${JSON.stringify(J)} found`)),ke}function gf(W){return Qf(_u(W.value))?kc(he({},W,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Wu(W)}function Wu(W){let D=W.value,J=W.key;if(Zs(D)!=="array")return[new ye(J,D,`array expected, ${Zs(D)} found`)];let pe=W.styleSpec,ke,je=[];if(D.length<1)return[new ye(J,D,"filter array must have at least 1 element")];switch(je=je.concat(Hu({key:`${J}[0]`,value:D[0],valueSpec:pe.filter_operator,style:W.style,styleSpec:W.styleSpec})),sl(D[0])){case"<":case"<=":case">":case">=":D.length>=2&&sl(D[1])==="$type"&&je.push(new ye(J,D,`"$type" cannot be use with operator "${D[0]}"`));case"==":case"!=":D.length!==3&&je.push(new ye(J,D,`filter array for operator "${D[0]}" must have 3 elements`));case"in":case"!in":D.length>=2&&(ke=Zs(D[1]),ke!=="string"&&je.push(new ye(`${J}[1]`,D[1],`string expected, ${ke} found`)));for(let We=2;We{Ut in J&&D.push(new ye(pe,J[Ut],`"${Ut}" is prohibited for ref layers`))}),ke.layers.forEach(Ut=>{sl(Ut.id)===ht&&(Et=Ut)}),Et?Et.ref?D.push(new ye(pe,J.ref,"ref cannot reference another ref layer")):We=sl(Et.type):D.push(new ye(pe,J.ref,`ref layer "${ht}" not found`))}else if(We!=="background")if(J.source){let Et=ke.sources&&ke.sources[J.source],Ut=Et&&sl(Et.type);Et?Ut==="vector"&&We==="raster"?D.push(new ye(pe,J.source,`layer "${J.id}" requires a raster source`)):Ut!=="raster-dem"&&We==="hillshade"?D.push(new ye(pe,J.source,`layer "${J.id}" requires a raster-dem source`)):Ut==="raster"&&We!=="raster"?D.push(new ye(pe,J.source,`layer "${J.id}" requires a vector source`)):Ut!=="vector"||J["source-layer"]?Ut==="raster-dem"&&We!=="hillshade"?D.push(new ye(pe,J.source,"raster-dem source can only be used with layer type 'hillshade'.")):We!=="line"||!J.paint||!J.paint["line-gradient"]||Ut==="geojson"&&Et.lineMetrics||D.push(new ye(pe,J,`layer "${J.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):D.push(new ye(pe,J,`layer "${J.id}" must specify a "source-layer"`)):D.push(new ye(pe,J.source,`source "${J.source}" not found`))}else D.push(new ye(pe,J,'missing required property "source"'));return D=D.concat(Pu({key:pe,value:J,valueSpec:je.layer,style:W.style,styleSpec:W.styleSpec,validateSpec:W.validateSpec,objectElementValidators:{"*":()=>[],type:()=>W.validateSpec({key:`${pe}.type`,value:J.type,valueSpec:je.layer.type,style:W.style,styleSpec:W.styleSpec,validateSpec:W.validateSpec,object:J,objectKey:"type"}),filter:gf,layout:Et=>Pu({layer:J,key:Et.key,value:Et.value,style:Et.style,styleSpec:Et.styleSpec,validateSpec:Et.validateSpec,objectElementValidators:{"*":Ut=>iu(he({layerType:We},Ut))}}),paint:Et=>Pu({layer:J,key:Et.key,value:Et.value,style:Et.style,styleSpec:Et.styleSpec,validateSpec:Et.validateSpec,objectElementValidators:{"*":Ut=>Lf(he({layerType:We},Ut))}})}})),D}function Xu(W){let D=W.value,J=W.key,pe=Zs(D);return pe!=="string"?[new ye(J,D,`string expected, ${pe} found`)]:[]}let Cc={promoteId:function({key:W,value:D}){if(Zs(D)==="string")return Xu({key:W,value:D});{let J=[];for(let pe in D)J.push(...Xu({key:`${W}.${pe}`,value:D[pe]}));return J}}};function gc(W){let D=W.value,J=W.key,pe=W.styleSpec,ke=W.style,je=W.validateSpec;if(!D.type)return[new ye(J,D,'"type" is required')];let We=sl(D.type),ht;switch(We){case"vector":case"raster":return ht=Pu({key:J,value:D,valueSpec:pe[`source_${We.replace("-","_")}`],style:W.style,styleSpec:pe,objectElementValidators:Cc,validateSpec:je}),ht;case"raster-dem":return ht=function(Et){var Ut;let or=(Ut=Et.sourceName)!==null&&Ut!==void 0?Ut:"",Mr=Et.value,zr=Et.styleSpec,Wr=zr.source_raster_dem,ia=Et.style,ha=[],ja=Zs(Mr);if(Mr===void 0)return ha;if(ja!=="object")return ha.push(new ye("source_raster_dem",Mr,`object expected, ${ja} found`)),ha;let Ka=sl(Mr.encoding)==="custom",Wi=["redFactor","greenFactor","blueFactor","baseShift"],gi=Et.value.encoding?`"${Et.value.encoding}"`:"Default";for(let qi in Mr)!Ka&&Wi.includes(qi)?ha.push(new ye(qi,Mr[qi],`In "${or}": "${qi}" is only valid when "encoding" is set to "custom". ${gi} encoding found`)):Wr[qi]?ha=ha.concat(Et.validateSpec({key:qi,value:Mr[qi],valueSpec:Wr[qi],validateSpec:Et.validateSpec,style:ia,styleSpec:zr})):ha.push(new ye(qi,Mr[qi],`unknown property "${qi}"`));return ha}({sourceName:J,value:D,style:W.style,styleSpec:pe,validateSpec:je}),ht;case"geojson":if(ht=Pu({key:J,value:D,valueSpec:pe.source_geojson,style:ke,styleSpec:pe,validateSpec:je,objectElementValidators:Cc}),D.cluster)for(let Et in D.clusterProperties){let[Ut,or]=D.clusterProperties[Et],Mr=typeof Ut=="string"?[Ut,["accumulated"],["get",Et]]:Ut;ht.push(...kc({key:`${J}.${Et}.map`,value:or,validateSpec:je,expressionContext:"cluster-map"})),ht.push(...kc({key:`${J}.${Et}.reduce`,value:Mr,validateSpec:je,expressionContext:"cluster-reduce"}))}return ht;case"video":return Pu({key:J,value:D,valueSpec:pe.source_video,style:ke,validateSpec:je,styleSpec:pe});case"image":return Pu({key:J,value:D,valueSpec:pe.source_image,style:ke,validateSpec:je,styleSpec:pe});case"canvas":return[new ye(J,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return Hu({key:`${J}.type`,value:D.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:ke,validateSpec:je,styleSpec:pe})}}function ql(W){let D=W.value,J=W.styleSpec,pe=J.light,ke=W.style,je=[],We=Zs(D);if(D===void 0)return je;if(We!=="object")return je=je.concat([new ye("light",D,`object expected, ${We} found`)]),je;for(let ht in D){let Et=ht.match(/^(.*)-transition$/);je=je.concat(Et&&pe[Et[1]]&&pe[Et[1]].transition?W.validateSpec({key:ht,value:D[ht],valueSpec:J.transition,validateSpec:W.validateSpec,style:ke,styleSpec:J}):pe[ht]?W.validateSpec({key:ht,value:D[ht],valueSpec:pe[ht],validateSpec:W.validateSpec,style:ke,styleSpec:J}):[new ye(ht,D[ht],`unknown property "${ht}"`)])}return je}function xu(W){let D=W.value,J=W.styleSpec,pe=J.sky,ke=W.style,je=Zs(D);if(D===void 0)return[];if(je!=="object")return[new ye("sky",D,`object expected, ${je} found`)];let We=[];for(let ht in D)We=We.concat(pe[ht]?W.validateSpec({key:ht,value:D[ht],valueSpec:pe[ht],style:ke,styleSpec:J}):[new ye(ht,D[ht],`unknown property "${ht}"`)]);return We}function Lc(W){let D=W.value,J=W.styleSpec,pe=J.terrain,ke=W.style,je=[],We=Zs(D);if(D===void 0)return je;if(We!=="object")return je=je.concat([new ye("terrain",D,`object expected, ${We} found`)]),je;for(let ht in D)je=je.concat(pe[ht]?W.validateSpec({key:ht,value:D[ht],valueSpec:pe[ht],validateSpec:W.validateSpec,style:ke,styleSpec:J}):[new ye(ht,D[ht],`unknown property "${ht}"`)]);return je}function Jc(W){let D=[],J=W.value,pe=W.key;if(Array.isArray(J)){let ke=[],je=[];for(let We in J)J[We].id&&ke.includes(J[We].id)&&D.push(new ye(pe,J,`all the sprites' ids must be unique, but ${J[We].id} is duplicated`)),ke.push(J[We].id),J[We].url&&je.includes(J[We].url)&&D.push(new ye(pe,J,`all the sprites' URLs must be unique, but ${J[We].url} is duplicated`)),je.push(J[We].url),D=D.concat(Pu({key:`${pe}[${We}]`,value:J[We],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:W.validateSpec}));return D}return Xu({key:pe,value:J})}let sc={"*":()=>[],array:Cf,boolean:function(W){let D=W.value,J=W.key,pe=Zs(D);return pe!=="boolean"?[new ye(J,D,`boolean expected, ${pe} found`)]:[]},number:hl,color:function(W){let D=W.key,J=W.value,pe=Zs(J);return pe!=="string"?[new ye(D,J,`color expected, ${pe} found`)]:Jt.parse(String(J))?[]:[new ye(D,J,`color expected, "${J}" found`)]},constants:mf,enum:Hu,filter:gf,function:uf,layer:Vf,object:Pu,source:gc,light:ql,sky:xu,terrain:Lc,projection:function(W){let D=W.value,J=W.styleSpec,pe=J.projection,ke=W.style,je=Zs(D);if(D===void 0)return[];if(je!=="object")return[new ye("projection",D,`object expected, ${je} found`)];let We=[];for(let ht in D)We=We.concat(pe[ht]?W.validateSpec({key:ht,value:D[ht],valueSpec:pe[ht],style:ke,styleSpec:J}):[new ye(ht,D[ht],`unknown property "${ht}"`)]);return We},string:Xu,formatted:function(W){return Xu(W).length===0?[]:kc(W)},resolvedImage:function(W){return Xu(W).length===0?[]:kc(W)},padding:function(W){let D=W.key,J=W.value;if(Zs(J)==="array"){if(J.length<1||J.length>4)return[new ye(D,J,`padding requires 1 to 4 values; ${J.length} values found`)];let pe={type:"number"},ke=[];for(let je=0;je[]}})),W.constants&&(J=J.concat(mf({key:"constants",value:W.constants,style:W,styleSpec:D,validateSpec:Pc}))),$r(J)}function aa(W){return function(D){return W(ds(To({},D),{validateSpec:Pc}))}}function $r(W){return[].concat(W).sort((D,J)=>D.line-J.line)}function ka(W){return function(...D){return $r(W.apply(this,D))}}br.source=ka(aa(gc)),br.sprite=ka(aa(Jc)),br.glyphs=ka(aa(Qt)),br.light=ka(aa(ql)),br.sky=ka(aa(xu)),br.terrain=ka(aa(Lc)),br.layer=ka(aa(Vf)),br.filter=ka(aa(gf)),br.paintProperty=ka(aa(Lf)),br.layoutProperty=ka(aa(iu));let li=br,Ci=li.light,Hi=li.sky,Qi=li.paintProperty,dn=li.layoutProperty;function Pi(W,D){let J=!1;if(D&&D.length)for(let pe of D)W.fire(new j(new Error(pe.message))),J=!0;return J}class Di{constructor(D,J,pe){let ke=this.cells=[];if(D instanceof ArrayBuffer){this.arrayBuffer=D;let We=new Int32Array(this.arrayBuffer);D=We[0],this.d=(J=We[1])+2*(pe=We[2]);for(let Et=0;Et=Mr[ia+0]&&ke>=Mr[ia+1])?(ht[Wr]=!0,We.push(or[Wr])):ht[Wr]=!1}}}}_forEachCell(D,J,pe,ke,je,We,ht,Et){let Ut=this._convertToCellCoord(D),or=this._convertToCellCoord(J),Mr=this._convertToCellCoord(pe),zr=this._convertToCellCoord(ke);for(let Wr=Ut;Wr<=Mr;Wr++)for(let ia=or;ia<=zr;ia++){let ha=this.d*ia+Wr;if((!Et||Et(this._convertFromCellCoord(Wr),this._convertFromCellCoord(ia),this._convertFromCellCoord(Wr+1),this._convertFromCellCoord(ia+1)))&&je.call(this,D,J,pe,ke,ha,We,ht,Et))return}}_convertFromCellCoord(D){return(D-this.padding)/this.scale}_convertToCellCoord(D){return Math.max(0,Math.min(this.d-1,Math.floor(D*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;let D=this.cells,J=3+this.cells.length+1+1,pe=0;for(let We=0;We=0)continue;let We=W[je];ke[je]=Ni[J].shallow.indexOf(je)>=0?We:eo(We,D)}W instanceof Error&&(ke.message=W.message)}if(ke.$name)throw new Error("$name property is reserved for worker serialization logic.");return J!=="Object"&&(ke.$name=J),ke}function fo(W){if(ao(W))return W;if(Array.isArray(W))return W.map(fo);if(typeof W!="object")throw new Error("can't deserialize object of type "+typeof W);let D=Qn(W)||"Object";if(!Ni[D])throw new Error(`can't deserialize unregistered class ${D}`);let{klass:J}=Ni[D];if(!J)throw new Error(`can't deserialize unregistered class ${D}`);if(J.deserialize)return J.deserialize(W);let pe=Object.create(J.prototype);for(let ke of Object.keys(W)){if(ke==="$name")continue;let je=W[ke];pe[ke]=Ni[D].shallow.indexOf(ke)>=0?je:fo(je)}return pe}class An{constructor(){this.first=!0}update(D,J){let pe=Math.floor(D);return this.first?(this.first=!1,this.lastIntegerZoom=pe,this.lastIntegerZoomTime=0,this.lastZoom=D,this.lastFloorZoom=pe,!0):(this.lastFloorZoom>pe?(this.lastIntegerZoom=pe+1,this.lastIntegerZoomTime=J):this.lastFloorZoomW>=128&&W<=255,"Hangul Jamo":W=>W>=4352&&W<=4607,Khmer:W=>W>=6016&&W<=6143,"General Punctuation":W=>W>=8192&&W<=8303,"Letterlike Symbols":W=>W>=8448&&W<=8527,"Number Forms":W=>W>=8528&&W<=8591,"Miscellaneous Technical":W=>W>=8960&&W<=9215,"Control Pictures":W=>W>=9216&&W<=9279,"Optical Character Recognition":W=>W>=9280&&W<=9311,"Enclosed Alphanumerics":W=>W>=9312&&W<=9471,"Geometric Shapes":W=>W>=9632&&W<=9727,"Miscellaneous Symbols":W=>W>=9728&&W<=9983,"Miscellaneous Symbols and Arrows":W=>W>=11008&&W<=11263,"Ideographic Description Characters":W=>W>=12272&&W<=12287,"CJK Symbols and Punctuation":W=>W>=12288&&W<=12351,Katakana:W=>W>=12448&&W<=12543,Kanbun:W=>W>=12688&&W<=12703,"CJK Strokes":W=>W>=12736&&W<=12783,"Enclosed CJK Letters and Months":W=>W>=12800&&W<=13055,"CJK Compatibility":W=>W>=13056&&W<=13311,"Yijing Hexagram Symbols":W=>W>=19904&&W<=19967,"Private Use Area":W=>W>=57344&&W<=63743,"Vertical Forms":W=>W>=65040&&W<=65055,"CJK Compatibility Forms":W=>W>=65072&&W<=65103,"Small Form Variants":W=>W>=65104&&W<=65135,"Halfwidth and Fullwidth Forms":W=>W>=65280&&W<=65519};function yo(W){for(let D of W)if(bs(D.charCodeAt(0)))return!0;return!1}function Ko(W){for(let D of W)if(!Os(D.charCodeAt(0)))return!1;return!0}function Ss(W){let D=W.map(J=>{try{return new RegExp(`\\p{sc=${J}}`,"u").source}catch{return null}}).filter(J=>J);return new RegExp(D.join("|"),"u")}let rl=Ss(["Arab","Dupl","Mong","Ougr","Syrc"]);function Os(W){return!rl.test(String.fromCodePoint(W))}let el=Ss(["Bopo","Hani","Hira","Kana","Kits","Nshu","Tang","Yiii"]);function bs(W){return!(W!==746&&W!==747&&(W<4352||!(un["CJK Compatibility Forms"](W)&&!(W>=65097&&W<=65103)||un["CJK Compatibility"](W)||un["CJK Strokes"](W)||!(!un["CJK Symbols and Punctuation"](W)||W>=12296&&W<=12305||W>=12308&&W<=12319||W===12336)||un["Enclosed CJK Letters and Months"](W)||un["Ideographic Description Characters"](W)||un.Kanbun(W)||un.Katakana(W)&&W!==12540||!(!un["Halfwidth and Fullwidth Forms"](W)||W===65288||W===65289||W===65293||W>=65306&&W<=65310||W===65339||W===65341||W===65343||W>=65371&&W<=65503||W===65507||W>=65512&&W<=65519)||!(!un["Small Form Variants"](W)||W>=65112&&W<=65118||W>=65123&&W<=65126)||un["Vertical Forms"](W)||un["Yijing Hexagram Symbols"](W)||new RegExp("\\p{sc=Cans}","u").test(String.fromCodePoint(W))||new RegExp("\\p{sc=Hang}","u").test(String.fromCodePoint(W))||el.test(String.fromCodePoint(W)))))}function Fl(W){return!(bs(W)||function(D){return!!(un["Latin-1 Supplement"](D)&&(D===167||D===169||D===174||D===177||D===188||D===189||D===190||D===215||D===247)||un["General Punctuation"](D)&&(D===8214||D===8224||D===8225||D===8240||D===8241||D===8251||D===8252||D===8258||D===8263||D===8264||D===8265||D===8273)||un["Letterlike Symbols"](D)||un["Number Forms"](D)||un["Miscellaneous Technical"](D)&&(D>=8960&&D<=8967||D>=8972&&D<=8991||D>=8996&&D<=9e3||D===9003||D>=9085&&D<=9114||D>=9150&&D<=9165||D===9167||D>=9169&&D<=9179||D>=9186&&D<=9215)||un["Control Pictures"](D)&&D!==9251||un["Optical Character Recognition"](D)||un["Enclosed Alphanumerics"](D)||un["Geometric Shapes"](D)||un["Miscellaneous Symbols"](D)&&!(D>=9754&&D<=9759)||un["Miscellaneous Symbols and Arrows"](D)&&(D>=11026&&D<=11055||D>=11088&&D<=11097||D>=11192&&D<=11243)||un["CJK Symbols and Punctuation"](D)||un.Katakana(D)||un["Private Use Area"](D)||un["CJK Compatibility Forms"](D)||un["Small Form Variants"](D)||un["Halfwidth and Fullwidth Forms"](D)||D===8734||D===8756||D===8757||D>=9984&&D<=10087||D>=10102&&D<=10131||D===65532||D===65533)}(W))}let _l=Ss(["Adlm","Arab","Armi","Avst","Chrs","Cprt","Egyp","Elym","Gara","Hatr","Hebr","Hung","Khar","Lydi","Mand","Mani","Mend","Merc","Mero","Narb","Nbat","Nkoo","Orkh","Palm","Phli","Phlp","Phnx","Prti","Rohg","Samr","Sarb","Sogo","Syrc","Thaa","Todr","Yezi"]);function ll(W){return _l.test(String.fromCodePoint(W))}function Un(W,D){return!(!D&&ll(W)||W>=2304&&W<=3583||W>=3840&&W<=4255||un.Khmer(W))}function Lo(W){for(let D of W)if(ll(D.charCodeAt(0)))return!0;return!1}let Js=new class{constructor(){this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null}setState(W){this.pluginStatus=W.pluginStatus,this.pluginURL=W.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(W){this.applyArabicShaping=W.applyArabicShaping,this.processBidirectionalText=W.processBidirectionalText,this.processStyledBidirectionalText=W.processStyledBidirectionalText}isParsed(){return this.applyArabicShaping!=null&&this.processBidirectionalText!=null&&this.processStyledBidirectionalText!=null}getPluginURL(){return this.pluginURL}getRTLTextPluginStatus(){return this.pluginStatus}};class Rs{constructor(D,J){this.zoom=D,J?(this.now=J.now,this.fadeDuration=J.fadeDuration,this.zoomHistory=J.zoomHistory,this.transition=J.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new An,this.transition={})}isSupportedScript(D){return function(J,pe){for(let ke of J)if(!Un(ke.charCodeAt(0),pe))return!1;return!0}(D,Js.getRTLTextPluginStatus()==="loaded")}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){let D=this.zoom,J=D-Math.floor(D),pe=this.crossFadingFactor();return D>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:J+(1-J)*pe}:{fromScale:.5,toScale:1,t:1-(1-pe)*J}}}class uu{constructor(D,J){this.property=D,this.value=J,this.expression=function(pe,ke){if(kf(pe))return new El(pe,ke);if(Mc(pe)){let je=Tu(pe,ke);if(je.result==="error")throw new Error(je.value.map(We=>`${We.key}: ${We.message}`).join(", "));return je.value}{let je=pe;return ke.type==="color"&&typeof pe=="string"?je=Jt.parse(pe):ke.type!=="padding"||typeof pe!="number"&&!Array.isArray(pe)?ke.type==="variableAnchorOffsetCollection"&&Array.isArray(pe)&&(je=$a.parse(pe)):je=ca.parse(pe),{kind:"constant",evaluate:()=>je}}}(J===void 0?D.specification.default:J,D.specification)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}possiblyEvaluate(D,J,pe){return this.property.possiblyEvaluate(this,D,J,pe)}}class Iu{constructor(D){this.property=D,this.value=new uu(D,void 0)}transitioned(D,J){return new Ic(this.property,this.value,J,M({},D.transition,this.transition),D.now)}untransitioned(){return new Ic(this.property,this.value,null,{},0)}}class Zu{constructor(D){this._properties=D,this._values=Object.create(D.defaultTransitionablePropertyValues)}getValue(D){return u(this._values[D].value.value)}setValue(D,J){Object.prototype.hasOwnProperty.call(this._values,D)||(this._values[D]=new Iu(this._values[D].property)),this._values[D].value=new uu(this._values[D].property,J===null?void 0:u(J))}getTransition(D){return u(this._values[D].transition)}setTransition(D,J){Object.prototype.hasOwnProperty.call(this._values,D)||(this._values[D]=new Iu(this._values[D].property)),this._values[D].transition=u(J)||void 0}serialize(){let D={};for(let J of Object.keys(this._values)){let pe=this.getValue(J);pe!==void 0&&(D[J]=pe);let ke=this.getTransition(J);ke!==void 0&&(D[`${J}-transition`]=ke)}return D}transitioned(D,J){let pe=new bu(this._properties);for(let ke of Object.keys(this._values))pe._values[ke]=this._values[ke].transitioned(D,J._values[ke]);return pe}untransitioned(){let D=new bu(this._properties);for(let J of Object.keys(this._values))D._values[J]=this._values[J].untransitioned();return D}}class Ic{constructor(D,J,pe,ke,je){this.property=D,this.value=J,this.begin=je+ke.delay||0,this.end=this.begin+ke.duration||0,D.specification.transition&&(ke.delay||ke.duration)&&(this.prior=pe)}possiblyEvaluate(D,J,pe){let ke=D.now||0,je=this.value.possiblyEvaluate(D,J,pe),We=this.prior;if(We){if(ke>this.end)return this.prior=null,je;if(this.value.isDataDriven())return this.prior=null,je;if(ke=1)return 1;let Ut=Et*Et,or=Ut*Et;return 4*(Et<.5?or:3*(Et-Ut)+or-.75)}(ht))}}return je}}class bu{constructor(D){this._properties=D,this._values=Object.create(D.defaultTransitioningPropertyValues)}possiblyEvaluate(D,J,pe){let ke=new yc(this._properties);for(let je of Object.keys(this._values))ke._values[je]=this._values[je].possiblyEvaluate(D,J,pe);return ke}hasTransition(){for(let D of Object.keys(this._values))if(this._values[D].prior)return!0;return!1}}class Rc{constructor(D){this._properties=D,this._values=Object.create(D.defaultPropertyValues)}hasValue(D){return this._values[D].value!==void 0}getValue(D){return u(this._values[D].value)}setValue(D,J){this._values[D]=new uu(this._values[D].property,J===null?void 0:u(J))}serialize(){let D={};for(let J of Object.keys(this._values)){let pe=this.getValue(J);pe!==void 0&&(D[J]=pe)}return D}possiblyEvaluate(D,J,pe){let ke=new yc(this._properties);for(let je of Object.keys(this._values))ke._values[je]=this._values[je].possiblyEvaluate(D,J,pe);return ke}}class Au{constructor(D,J,pe){this.property=D,this.value=J,this.parameters=pe}isConstant(){return this.value.kind==="constant"}constantOr(D){return this.value.kind==="constant"?this.value.value:D}evaluate(D,J,pe,ke){return this.property.evaluate(this.value,this.parameters,D,J,pe,ke)}}class yc{constructor(D){this._properties=D,this._values=Object.create(D.defaultPossiblyEvaluatedValues)}get(D){return this._values[D]}}class ho{constructor(D){this.specification=D}possiblyEvaluate(D,J){if(D.isDataDriven())throw new Error("Value should not be data driven");return D.expression.evaluate(J)}interpolate(D,J,pe){let ke=On[this.specification.type];return ke?ke(D,J,pe):D}}class Ro{constructor(D,J){this.specification=D,this.overrides=J}possiblyEvaluate(D,J,pe,ke){return new Au(this,D.expression.kind==="constant"||D.expression.kind==="camera"?{kind:"constant",value:D.expression.evaluate(J,null,{},pe,ke)}:D.expression,J)}interpolate(D,J,pe){if(D.value.kind!=="constant"||J.value.kind!=="constant")return D;if(D.value.value===void 0||J.value.value===void 0)return new Au(this,{kind:"constant",value:void 0},D.parameters);let ke=On[this.specification.type];if(ke){let je=ke(D.value.value,J.value.value,pe);return new Au(this,{kind:"constant",value:je},D.parameters)}return D}evaluate(D,J,pe,ke,je,We){return D.kind==="constant"?D.value:D.evaluate(J,pe,ke,je,We)}}class Dc extends Ro{possiblyEvaluate(D,J,pe,ke){if(D.value===void 0)return new Au(this,{kind:"constant",value:void 0},J);if(D.expression.kind==="constant"){let je=D.expression.evaluate(J,null,{},pe,ke),We=D.property.specification.type==="resolvedImage"&&typeof je!="string"?je.name:je,ht=this._calculate(We,We,We,J);return new Au(this,{kind:"constant",value:ht},J)}if(D.expression.kind==="camera"){let je=this._calculate(D.expression.evaluate({zoom:J.zoom-1}),D.expression.evaluate({zoom:J.zoom}),D.expression.evaluate({zoom:J.zoom+1}),J);return new Au(this,{kind:"constant",value:je},J)}return new Au(this,D.expression,J)}evaluate(D,J,pe,ke,je,We){if(D.kind==="source"){let ht=D.evaluate(J,pe,ke,je,We);return this._calculate(ht,ht,ht,J)}return D.kind==="composite"?this._calculate(D.evaluate({zoom:Math.floor(J.zoom)-1},pe,ke),D.evaluate({zoom:Math.floor(J.zoom)},pe,ke),D.evaluate({zoom:Math.floor(J.zoom)+1},pe,ke),J):D.value}_calculate(D,J,pe,ke){return ke.zoom>ke.zoomHistory.lastIntegerZoom?{from:D,to:J}:{from:pe,to:J}}interpolate(D){return D}}class lc{constructor(D){this.specification=D}possiblyEvaluate(D,J,pe,ke){if(D.value!==void 0){if(D.expression.kind==="constant"){let je=D.expression.evaluate(J,null,{},pe,ke);return this._calculate(je,je,je,J)}return this._calculate(D.expression.evaluate(new Rs(Math.floor(J.zoom-1),J)),D.expression.evaluate(new Rs(Math.floor(J.zoom),J)),D.expression.evaluate(new Rs(Math.floor(J.zoom+1),J)),J)}}_calculate(D,J,pe,ke){return ke.zoom>ke.zoomHistory.lastIntegerZoom?{from:D,to:J}:{from:pe,to:J}}interpolate(D){return D}}class Yu{constructor(D){this.specification=D}possiblyEvaluate(D,J,pe,ke){return!!D.expression.evaluate(J,null,{},pe,ke)}interpolate(){return!1}}class Ue{constructor(D){this.properties=D,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(let J in D){let pe=D[J];pe.specification.overridable&&this.overridableProperties.push(J);let ke=this.defaultPropertyValues[J]=new uu(pe,void 0),je=this.defaultTransitionablePropertyValues[J]=new Iu(pe);this.defaultTransitioningPropertyValues[J]=je.untransitioned(),this.defaultPossiblyEvaluatedValues[J]=ke.possiblyEvaluate({})}}}mi("DataDrivenProperty",Ro),mi("DataConstantProperty",ho),mi("CrossFadedDataDrivenProperty",Dc),mi("CrossFadedProperty",lc),mi("ColorRampProperty",Yu);let I="-transition";class ie extends Q{constructor(D,J){if(super(),this.id=D.id,this.type=D.type,this._featureFilter={filter:()=>!0,needGeometry:!1},D.type!=="custom"&&(this.metadata=D.metadata,this.minzoom=D.minzoom,this.maxzoom=D.maxzoom,D.type!=="background"&&(this.source=D.source,this.sourceLayer=D["source-layer"],this.filter=D.filter),J.layout&&(this._unevaluatedLayout=new Rc(J.layout)),J.paint)){this._transitionablePaint=new Zu(J.paint);for(let pe in D.paint)this.setPaintProperty(pe,D.paint[pe],{validate:!1});for(let pe in D.layout)this.setLayoutProperty(pe,D.layout[pe],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new yc(J.paint)}}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(D){return D==="visibility"?this.visibility:this._unevaluatedLayout.getValue(D)}setLayoutProperty(D,J,pe={}){J!=null&&this._validate(dn,`layers.${this.id}.layout.${D}`,D,J,pe)||(D!=="visibility"?this._unevaluatedLayout.setValue(D,J):this.visibility=J)}getPaintProperty(D){return D.endsWith(I)?this._transitionablePaint.getTransition(D.slice(0,-11)):this._transitionablePaint.getValue(D)}setPaintProperty(D,J,pe={}){if(J!=null&&this._validate(Qi,`layers.${this.id}.paint.${D}`,D,J,pe))return!1;if(D.endsWith(I))return this._transitionablePaint.setTransition(D.slice(0,-11),J||void 0),!1;{let ke=this._transitionablePaint._values[D],je=ke.property.specification["property-type"]==="cross-faded-data-driven",We=ke.value.isDataDriven(),ht=ke.value;this._transitionablePaint.setValue(D,J),this._handleSpecialPaintPropertyUpdate(D);let Et=this._transitionablePaint._values[D].value;return Et.isDataDriven()||We||je||this._handleOverridablePaintPropertyUpdate(D,ht,Et)}}_handleSpecialPaintPropertyUpdate(D){}_handleOverridablePaintPropertyUpdate(D,J,pe){return!1}isHidden(D){return!!(this.minzoom&&D=this.maxzoom)||this.visibility==="none"}updateTransitions(D){this._transitioningPaint=this._transitionablePaint.transitioned(D,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(D,J){D.getCrossfadeParameters&&(this._crossfadeParameters=D.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(D,void 0,J)),this.paint=this._transitioningPaint.possiblyEvaluate(D,void 0,J)}serialize(){let D={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(D.layout=D.layout||{},D.layout.visibility=this.visibility),d(D,(J,pe)=>!(J===void 0||pe==="layout"&&!Object.keys(J).length||pe==="paint"&&!Object.keys(J).length))}_validate(D,J,pe,ke,je={}){return(!je||je.validate!==!1)&&Pi(this,D.call(li,{key:J,layerType:this.type,objectKey:pe,value:ke,styleSpec:re,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(let D in this.paint._values){let J=this.paint.get(D);if(J instanceof Au&&Ql(J.property.specification)&&(J.value.kind==="source"||J.value.kind==="composite")&&J.value.isStateDependent)return!0}return!1}}let we={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class Se{constructor(D,J){this._structArray=D,this._pos1=J*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class Be{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(D,J){return D._trim(),J&&(D.isTransferred=!0,J.push(D.arrayBuffer)),{length:D.length,arrayBuffer:D.arrayBuffer}}static deserialize(D){let J=Object.create(this.prototype);return J.arrayBuffer=D.arrayBuffer,J.length=D.length,J.capacity=D.arrayBuffer.byteLength/J.bytesPerElement,J._refreshViews(),J}_trim(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())}clear(){this.length=0}resize(D){this.reserve(D),this.length=D}reserve(D){if(D>this.capacity){this.capacity=Math.max(D,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);let J=this.uint8;this._refreshViews(),J&&this.uint8.set(J)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}}function dt(W,D=1){let J=0,pe=0;return{members:W.map(ke=>{let je=we[ke.type].BYTES_PER_ELEMENT,We=J=St(J,Math.max(D,je)),ht=ke.components||1;return pe=Math.max(pe,je),J+=je*ht,{name:ke.name,type:ke.type,components:ht,offset:We}}),size:St(J,Math.max(pe,D)),alignment:D}}function St(W,D){return Math.ceil(W/D)*D}class Nt extends Be{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,J){let pe=this.length;return this.resize(pe+1),this.emplace(pe,D,J)}emplace(D,J,pe){let ke=2*D;return this.int16[ke+0]=J,this.int16[ke+1]=pe,D}}Nt.prototype.bytesPerElement=4,mi("StructArrayLayout2i4",Nt);class $t extends Be{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,J,pe){let ke=this.length;return this.resize(ke+1),this.emplace(ke,D,J,pe)}emplace(D,J,pe,ke){let je=3*D;return this.int16[je+0]=J,this.int16[je+1]=pe,this.int16[je+2]=ke,D}}$t.prototype.bytesPerElement=6,mi("StructArrayLayout3i6",$t);class Tr extends Be{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,J,pe,ke){let je=this.length;return this.resize(je+1),this.emplace(je,D,J,pe,ke)}emplace(D,J,pe,ke,je){let We=4*D;return this.int16[We+0]=J,this.int16[We+1]=pe,this.int16[We+2]=ke,this.int16[We+3]=je,D}}Tr.prototype.bytesPerElement=8,mi("StructArrayLayout4i8",Tr);class Ar extends Be{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,J,pe,ke,je,We){let ht=this.length;return this.resize(ht+1),this.emplace(ht,D,J,pe,ke,je,We)}emplace(D,J,pe,ke,je,We,ht){let Et=6*D;return this.int16[Et+0]=J,this.int16[Et+1]=pe,this.int16[Et+2]=ke,this.int16[Et+3]=je,this.int16[Et+4]=We,this.int16[Et+5]=ht,D}}Ar.prototype.bytesPerElement=12,mi("StructArrayLayout2i4i12",Ar);class Kr extends Be{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,J,pe,ke,je,We){let ht=this.length;return this.resize(ht+1),this.emplace(ht,D,J,pe,ke,je,We)}emplace(D,J,pe,ke,je,We,ht){let Et=4*D,Ut=8*D;return this.int16[Et+0]=J,this.int16[Et+1]=pe,this.uint8[Ut+4]=ke,this.uint8[Ut+5]=je,this.uint8[Ut+6]=We,this.uint8[Ut+7]=ht,D}}Kr.prototype.bytesPerElement=8,mi("StructArrayLayout2i4ub8",Kr);class na extends Be{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(D,J){let pe=this.length;return this.resize(pe+1),this.emplace(pe,D,J)}emplace(D,J,pe){let ke=2*D;return this.float32[ke+0]=J,this.float32[ke+1]=pe,D}}na.prototype.bytesPerElement=8,mi("StructArrayLayout2f8",na);class He extends Be{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(D,J,pe,ke,je,We,ht,Et,Ut,or){let Mr=this.length;return this.resize(Mr+1),this.emplace(Mr,D,J,pe,ke,je,We,ht,Et,Ut,or)}emplace(D,J,pe,ke,je,We,ht,Et,Ut,or,Mr){let zr=10*D;return this.uint16[zr+0]=J,this.uint16[zr+1]=pe,this.uint16[zr+2]=ke,this.uint16[zr+3]=je,this.uint16[zr+4]=We,this.uint16[zr+5]=ht,this.uint16[zr+6]=Et,this.uint16[zr+7]=Ut,this.uint16[zr+8]=or,this.uint16[zr+9]=Mr,D}}He.prototype.bytesPerElement=20,mi("StructArrayLayout10ui20",He);class Je extends Be{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(D,J,pe,ke,je,We,ht,Et,Ut,or,Mr,zr){let Wr=this.length;return this.resize(Wr+1),this.emplace(Wr,D,J,pe,ke,je,We,ht,Et,Ut,or,Mr,zr)}emplace(D,J,pe,ke,je,We,ht,Et,Ut,or,Mr,zr,Wr){let ia=12*D;return this.int16[ia+0]=J,this.int16[ia+1]=pe,this.int16[ia+2]=ke,this.int16[ia+3]=je,this.uint16[ia+4]=We,this.uint16[ia+5]=ht,this.uint16[ia+6]=Et,this.uint16[ia+7]=Ut,this.int16[ia+8]=or,this.int16[ia+9]=Mr,this.int16[ia+10]=zr,this.int16[ia+11]=Wr,D}}Je.prototype.bytesPerElement=24,mi("StructArrayLayout4i4ui4i24",Je);class lt extends Be{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(D,J,pe){let ke=this.length;return this.resize(ke+1),this.emplace(ke,D,J,pe)}emplace(D,J,pe,ke){let je=3*D;return this.float32[je+0]=J,this.float32[je+1]=pe,this.float32[je+2]=ke,D}}lt.prototype.bytesPerElement=12,mi("StructArrayLayout3f12",lt);class vt extends Be{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(D){let J=this.length;return this.resize(J+1),this.emplace(J,D)}emplace(D,J){return this.uint32[1*D+0]=J,D}}vt.prototype.bytesPerElement=4,mi("StructArrayLayout1ul4",vt);class Lt extends Be{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(D,J,pe,ke,je,We,ht,Et,Ut){let or=this.length;return this.resize(or+1),this.emplace(or,D,J,pe,ke,je,We,ht,Et,Ut)}emplace(D,J,pe,ke,je,We,ht,Et,Ut,or){let Mr=10*D,zr=5*D;return this.int16[Mr+0]=J,this.int16[Mr+1]=pe,this.int16[Mr+2]=ke,this.int16[Mr+3]=je,this.int16[Mr+4]=We,this.int16[Mr+5]=ht,this.uint32[zr+3]=Et,this.uint16[Mr+8]=Ut,this.uint16[Mr+9]=or,D}}Lt.prototype.bytesPerElement=20,mi("StructArrayLayout6i1ul2ui20",Lt);class At extends Be{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,J,pe,ke,je,We){let ht=this.length;return this.resize(ht+1),this.emplace(ht,D,J,pe,ke,je,We)}emplace(D,J,pe,ke,je,We,ht){let Et=6*D;return this.int16[Et+0]=J,this.int16[Et+1]=pe,this.int16[Et+2]=ke,this.int16[Et+3]=je,this.int16[Et+4]=We,this.int16[Et+5]=ht,D}}At.prototype.bytesPerElement=12,mi("StructArrayLayout2i2i2i12",At);class zt extends Be{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,J,pe,ke,je){let We=this.length;return this.resize(We+1),this.emplace(We,D,J,pe,ke,je)}emplace(D,J,pe,ke,je,We){let ht=4*D,Et=8*D;return this.float32[ht+0]=J,this.float32[ht+1]=pe,this.float32[ht+2]=ke,this.int16[Et+6]=je,this.int16[Et+7]=We,D}}zt.prototype.bytesPerElement=16,mi("StructArrayLayout2f1f2i16",zt);class cr extends Be{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,J,pe,ke,je,We){let ht=this.length;return this.resize(ht+1),this.emplace(ht,D,J,pe,ke,je,We)}emplace(D,J,pe,ke,je,We,ht){let Et=16*D,Ut=4*D,or=8*D;return this.uint8[Et+0]=J,this.uint8[Et+1]=pe,this.float32[Ut+1]=ke,this.float32[Ut+2]=je,this.int16[or+6]=We,this.int16[or+7]=ht,D}}cr.prototype.bytesPerElement=16,mi("StructArrayLayout2ub2f2i16",cr);class yr extends Be{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(D,J,pe){let ke=this.length;return this.resize(ke+1),this.emplace(ke,D,J,pe)}emplace(D,J,pe,ke){let je=3*D;return this.uint16[je+0]=J,this.uint16[je+1]=pe,this.uint16[je+2]=ke,D}}yr.prototype.bytesPerElement=6,mi("StructArrayLayout3ui6",yr);class Er extends Be{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(D,J,pe,ke,je,We,ht,Et,Ut,or,Mr,zr,Wr,ia,ha,ja,Ka){let Wi=this.length;return this.resize(Wi+1),this.emplace(Wi,D,J,pe,ke,je,We,ht,Et,Ut,or,Mr,zr,Wr,ia,ha,ja,Ka)}emplace(D,J,pe,ke,je,We,ht,Et,Ut,or,Mr,zr,Wr,ia,ha,ja,Ka,Wi){let gi=24*D,qi=12*D,en=48*D;return this.int16[gi+0]=J,this.int16[gi+1]=pe,this.uint16[gi+2]=ke,this.uint16[gi+3]=je,this.uint32[qi+2]=We,this.uint32[qi+3]=ht,this.uint32[qi+4]=Et,this.uint16[gi+10]=Ut,this.uint16[gi+11]=or,this.uint16[gi+12]=Mr,this.float32[qi+7]=zr,this.float32[qi+8]=Wr,this.uint8[en+36]=ia,this.uint8[en+37]=ha,this.uint8[en+38]=ja,this.uint32[qi+10]=Ka,this.int16[gi+22]=Wi,D}}Er.prototype.bytesPerElement=48,mi("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Er);class jr extends Be{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(D,J,pe,ke,je,We,ht,Et,Ut,or,Mr,zr,Wr,ia,ha,ja,Ka,Wi,gi,qi,en,qn,Eo,ys,mo,zn,ts,Uo){let zo=this.length;return this.resize(zo+1),this.emplace(zo,D,J,pe,ke,je,We,ht,Et,Ut,or,Mr,zr,Wr,ia,ha,ja,Ka,Wi,gi,qi,en,qn,Eo,ys,mo,zn,ts,Uo)}emplace(D,J,pe,ke,je,We,ht,Et,Ut,or,Mr,zr,Wr,ia,ha,ja,Ka,Wi,gi,qi,en,qn,Eo,ys,mo,zn,ts,Uo,zo){let wn=32*D,os=16*D;return this.int16[wn+0]=J,this.int16[wn+1]=pe,this.int16[wn+2]=ke,this.int16[wn+3]=je,this.int16[wn+4]=We,this.int16[wn+5]=ht,this.int16[wn+6]=Et,this.int16[wn+7]=Ut,this.uint16[wn+8]=or,this.uint16[wn+9]=Mr,this.uint16[wn+10]=zr,this.uint16[wn+11]=Wr,this.uint16[wn+12]=ia,this.uint16[wn+13]=ha,this.uint16[wn+14]=ja,this.uint16[wn+15]=Ka,this.uint16[wn+16]=Wi,this.uint16[wn+17]=gi,this.uint16[wn+18]=qi,this.uint16[wn+19]=en,this.uint16[wn+20]=qn,this.uint16[wn+21]=Eo,this.uint16[wn+22]=ys,this.uint32[os+12]=mo,this.float32[os+13]=zn,this.float32[os+14]=ts,this.uint16[wn+30]=Uo,this.uint16[wn+31]=zo,D}}jr.prototype.bytesPerElement=64,mi("StructArrayLayout8i15ui1ul2f2ui64",jr);class Qr extends Be{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(D){let J=this.length;return this.resize(J+1),this.emplace(J,D)}emplace(D,J){return this.float32[1*D+0]=J,D}}Qr.prototype.bytesPerElement=4,mi("StructArrayLayout1f4",Qr);class pa extends Be{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(D,J,pe){let ke=this.length;return this.resize(ke+1),this.emplace(ke,D,J,pe)}emplace(D,J,pe,ke){let je=3*D;return this.uint16[6*D+0]=J,this.float32[je+1]=pe,this.float32[je+2]=ke,D}}pa.prototype.bytesPerElement=12,mi("StructArrayLayout1ui2f12",pa);class Aa extends Be{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(D,J,pe){let ke=this.length;return this.resize(ke+1),this.emplace(ke,D,J,pe)}emplace(D,J,pe,ke){let je=4*D;return this.uint32[2*D+0]=J,this.uint16[je+2]=pe,this.uint16[je+3]=ke,D}}Aa.prototype.bytesPerElement=8,mi("StructArrayLayout1ul2ui8",Aa);class za extends Be{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(D,J){let pe=this.length;return this.resize(pe+1),this.emplace(pe,D,J)}emplace(D,J,pe){let ke=2*D;return this.uint16[ke+0]=J,this.uint16[ke+1]=pe,D}}za.prototype.bytesPerElement=4,mi("StructArrayLayout2ui4",za);class ci extends Be{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(D){let J=this.length;return this.resize(J+1),this.emplace(J,D)}emplace(D,J){return this.uint16[1*D+0]=J,D}}ci.prototype.bytesPerElement=2,mi("StructArrayLayout1ui2",ci);class Vi extends Be{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(D,J,pe,ke){let je=this.length;return this.resize(je+1),this.emplace(je,D,J,pe,ke)}emplace(D,J,pe,ke,je){let We=4*D;return this.float32[We+0]=J,this.float32[We+1]=pe,this.float32[We+2]=ke,this.float32[We+3]=je,D}}Vi.prototype.bytesPerElement=16,mi("StructArrayLayout4f16",Vi);class ji extends Se{get anchorPointX(){return this._structArray.int16[this._pos2+0]}get anchorPointY(){return this._structArray.int16[this._pos2+1]}get x1(){return this._structArray.int16[this._pos2+2]}get y1(){return this._structArray.int16[this._pos2+3]}get x2(){return this._structArray.int16[this._pos2+4]}get y2(){return this._structArray.int16[this._pos2+5]}get featureIndex(){return this._structArray.uint32[this._pos4+3]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+8]}get bucketIndex(){return this._structArray.uint16[this._pos2+9]}get anchorPoint(){return new n(this.anchorPointX,this.anchorPointY)}}ji.prototype.size=20;class nn extends Lt{get(D){return new ji(this,D)}}mi("CollisionBoxArray",nn);class Sn extends Se{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get glyphStartIndex(){return this._structArray.uint16[this._pos2+2]}get numGlyphs(){return this._structArray.uint16[this._pos2+3]}get vertexStartIndex(){return this._structArray.uint32[this._pos4+2]}get lineStartIndex(){return this._structArray.uint32[this._pos4+3]}get lineLength(){return this._structArray.uint32[this._pos4+4]}get segment(){return this._structArray.uint16[this._pos2+10]}get lowerSize(){return this._structArray.uint16[this._pos2+11]}get upperSize(){return this._structArray.uint16[this._pos2+12]}get lineOffsetX(){return this._structArray.float32[this._pos4+7]}get lineOffsetY(){return this._structArray.float32[this._pos4+8]}get writingMode(){return this._structArray.uint8[this._pos1+36]}get placedOrientation(){return this._structArray.uint8[this._pos1+37]}set placedOrientation(D){this._structArray.uint8[this._pos1+37]=D}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(D){this._structArray.uint8[this._pos1+38]=D}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(D){this._structArray.uint32[this._pos4+10]=D}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}Sn.prototype.size=48;class Kn extends Er{get(D){return new Sn(this,D)}}mi("PlacedSymbolArray",Kn);class Bn extends Se{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get rightJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+2]}get centerJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+3]}get leftJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+4]}get verticalPlacedTextSymbolIndex(){return this._structArray.int16[this._pos2+5]}get placedIconSymbolIndex(){return this._structArray.int16[this._pos2+6]}get verticalPlacedIconSymbolIndex(){return this._structArray.int16[this._pos2+7]}get key(){return this._structArray.uint16[this._pos2+8]}get textBoxStartIndex(){return this._structArray.uint16[this._pos2+9]}get textBoxEndIndex(){return this._structArray.uint16[this._pos2+10]}get verticalTextBoxStartIndex(){return this._structArray.uint16[this._pos2+11]}get verticalTextBoxEndIndex(){return this._structArray.uint16[this._pos2+12]}get iconBoxStartIndex(){return this._structArray.uint16[this._pos2+13]}get iconBoxEndIndex(){return this._structArray.uint16[this._pos2+14]}get verticalIconBoxStartIndex(){return this._structArray.uint16[this._pos2+15]}get verticalIconBoxEndIndex(){return this._structArray.uint16[this._pos2+16]}get featureIndex(){return this._structArray.uint16[this._pos2+17]}get numHorizontalGlyphVertices(){return this._structArray.uint16[this._pos2+18]}get numVerticalGlyphVertices(){return this._structArray.uint16[this._pos2+19]}get numIconVertices(){return this._structArray.uint16[this._pos2+20]}get numVerticalIconVertices(){return this._structArray.uint16[this._pos2+21]}get useRuntimeCollisionCircles(){return this._structArray.uint16[this._pos2+22]}get crossTileID(){return this._structArray.uint32[this._pos4+12]}set crossTileID(D){this._structArray.uint32[this._pos4+12]=D}get textBoxScale(){return this._structArray.float32[this._pos4+13]}get collisionCircleDiameter(){return this._structArray.float32[this._pos4+14]}get textAnchorOffsetStartIndex(){return this._structArray.uint16[this._pos2+30]}get textAnchorOffsetEndIndex(){return this._structArray.uint16[this._pos2+31]}}Bn.prototype.size=64;class wo extends jr{get(D){return new Bn(this,D)}}mi("SymbolInstanceArray",wo);class is extends Qr{getoffsetX(D){return this.float32[1*D+0]}}mi("GlyphOffsetArray",is);class Ao extends $t{getx(D){return this.int16[3*D+0]}gety(D){return this.int16[3*D+1]}gettileUnitDistanceFromAnchor(D){return this.int16[3*D+2]}}mi("SymbolLineVertexArray",Ao);class Zo extends Se{get textAnchor(){return this._structArray.uint16[this._pos2+0]}get textOffset0(){return this._structArray.float32[this._pos4+1]}get textOffset1(){return this._structArray.float32[this._pos4+2]}}Zo.prototype.size=12;class ps extends pa{get(D){return new Zo(this,D)}}mi("TextAnchorOffsetArray",ps);class ul extends Se{get featureIndex(){return this._structArray.uint32[this._pos4+0]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+2]}get bucketIndex(){return this._structArray.uint16[this._pos2+3]}}ul.prototype.size=8;class tl extends Aa{get(D){return new ul(this,D)}}mi("FeatureIndexArray",tl);class Jo extends Nt{}class $o extends Nt{}class Il extends Nt{}class eu extends Ar{}class Ru extends Kr{}class vu extends na{}class Tl extends He{}class cu extends Je{}class uc extends lt{}class Vl extends vt{}class Gl extends At{}class de extends cr{}class Fe extends yr{}class et extends za{}let mt=dt([{name:"a_pos",components:2,type:"Int16"}],4),{members:bt}=mt;class Mt{constructor(D=[]){this.segments=D}prepareSegment(D,J,pe,ke){let je=this.segments[this.segments.length-1];return D>Mt.MAX_VERTEX_ARRAY_LENGTH&&f(`Max vertices per segment is ${Mt.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${D}`),(!je||je.vertexLength+D>Mt.MAX_VERTEX_ARRAY_LENGTH||je.sortKey!==ke)&&(je={vertexOffset:J.length,primitiveOffset:pe.length,vertexLength:0,primitiveLength:0},ke!==void 0&&(je.sortKey=ke),this.segments.push(je)),je}get(){return this.segments}destroy(){for(let D of this.segments)for(let J in D.vaos)D.vaos[J].destroy()}static simpleSegment(D,J,pe,ke){return new Mt([{vertexOffset:D,primitiveOffset:J,vertexLength:pe,primitiveLength:ke,vaos:{},sortKey:0}])}}function ar(W,D){return 256*(W=w(Math.floor(W),0,255))+w(Math.floor(D),0,255)}Mt.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,mi("SegmentVector",Mt);let Ot=dt([{name:"a_pattern_from",components:4,type:"Uint16"},{name:"a_pattern_to",components:4,type:"Uint16"},{name:"a_pixel_ratio_from",components:1,type:"Uint16"},{name:"a_pixel_ratio_to",components:1,type:"Uint16"}]);var _r={exports:{}},Gr={exports:{}};Gr.exports=function(W,D){var J,pe,ke,je,We,ht,Et,Ut;for(pe=W.length-(J=3&W.length),ke=D,We=3432918353,ht=461845907,Ut=0;Ut>>16)*We&65535)<<16)&4294967295)<<15|Et>>>17))*ht+(((Et>>>16)*ht&65535)<<16)&4294967295)<<13|ke>>>19))+((5*(ke>>>16)&65535)<<16)&4294967295))+((58964+(je>>>16)&65535)<<16);switch(Et=0,J){case 3:Et^=(255&W.charCodeAt(Ut+2))<<16;case 2:Et^=(255&W.charCodeAt(Ut+1))<<8;case 1:ke^=Et=(65535&(Et=(Et=(65535&(Et^=255&W.charCodeAt(Ut)))*We+(((Et>>>16)*We&65535)<<16)&4294967295)<<15|Et>>>17))*ht+(((Et>>>16)*ht&65535)<<16)&4294967295}return ke^=W.length,ke=2246822507*(65535&(ke^=ke>>>16))+((2246822507*(ke>>>16)&65535)<<16)&4294967295,ke=3266489909*(65535&(ke^=ke>>>13))+((3266489909*(ke>>>16)&65535)<<16)&4294967295,(ke^=ke>>>16)>>>0};var Xr=Gr.exports,xa={exports:{}};xa.exports=function(W,D){for(var J,pe=W.length,ke=D^pe,je=0;pe>=4;)J=1540483477*(65535&(J=255&W.charCodeAt(je)|(255&W.charCodeAt(++je))<<8|(255&W.charCodeAt(++je))<<16|(255&W.charCodeAt(++je))<<24))+((1540483477*(J>>>16)&65535)<<16),ke=1540483477*(65535&ke)+((1540483477*(ke>>>16)&65535)<<16)^(J=1540483477*(65535&(J^=J>>>24))+((1540483477*(J>>>16)&65535)<<16)),pe-=4,++je;switch(pe){case 3:ke^=(255&W.charCodeAt(je+2))<<16;case 2:ke^=(255&W.charCodeAt(je+1))<<8;case 1:ke=1540483477*(65535&(ke^=255&W.charCodeAt(je)))+((1540483477*(ke>>>16)&65535)<<16)}return ke=1540483477*(65535&(ke^=ke>>>13))+((1540483477*(ke>>>16)&65535)<<16),(ke^=ke>>>15)>>>0};var da=Xr,Ja=xa.exports;_r.exports=da,_r.exports.murmur3=da,_r.exports.murmur2=Ja;var ti=r(_r.exports);class Sa{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(D,J,pe,ke){this.ids.push(Fa(D)),this.positions.push(J,pe,ke)}getPositions(D){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");let J=Fa(D),pe=0,ke=this.ids.length-1;for(;pe>1;this.ids[We]>=J?ke=We:pe=We+1}let je=[];for(;this.ids[pe]===J;)je.push({index:this.positions[3*pe],start:this.positions[3*pe+1],end:this.positions[3*pe+2]}),pe++;return je}static serialize(D,J){let pe=new Float64Array(D.ids),ke=new Uint32Array(D.positions);return Xa(pe,ke,0,pe.length-1),J&&J.push(pe.buffer,ke.buffer),{ids:pe,positions:ke}}static deserialize(D){let J=new Sa;return J.ids=D.ids,J.positions=D.positions,J.indexed=!0,J}}function Fa(W){let D=+W;return!isNaN(D)&&D<=Number.MAX_SAFE_INTEGER?D:ti(String(W))}function Xa(W,D,J,pe){for(;J>1],je=J-1,We=pe+1;for(;;){do je++;while(W[je]ke);if(je>=We)break;fi(W,je,We),fi(D,3*je,3*We),fi(D,3*je+1,3*We+1),fi(D,3*je+2,3*We+2)}We-J`u_${ke}`),this.type=pe}setUniform(D,J,pe){D.set(pe.constantOr(this.value))}getBinding(D,J,pe){return this.type==="color"?new rn(D,J):new La(D,J)}}class ro{constructor(D,J){this.uniformNames=J.map(pe=>`u_${pe}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(D,J){this.pixelRatioFrom=J.pixelRatio,this.pixelRatioTo=D.pixelRatio,this.patternFrom=J.tlbr,this.patternTo=D.tlbr}setUniform(D,J,pe,ke){let je=ke==="u_pattern_to"?this.patternTo:ke==="u_pattern_from"?this.patternFrom:ke==="u_pixel_ratio_to"?this.pixelRatioTo:ke==="u_pixel_ratio_from"?this.pixelRatioFrom:null;je&&D.set(je)}getBinding(D,J,pe){return pe.substr(0,9)==="u_pattern"?new sn(D,J):new La(D,J)}}class Yo{constructor(D,J,pe,ke){this.expression=D,this.type=pe,this.maxValue=0,this.paintVertexAttributes=J.map(je=>({name:`a_${je}`,type:"Float32",components:pe==="color"?2:1,offset:0})),this.paintVertexArray=new ke}populatePaintArray(D,J,pe,ke,je){let We=this.paintVertexArray.length,ht=this.expression.evaluate(new Rs(0),J,{},ke,[],je);this.paintVertexArray.resize(D),this._setPaintValue(We,D,ht)}updatePaintArray(D,J,pe,ke){let je=this.expression.evaluate({zoom:0},pe,ke);this._setPaintValue(D,J,je)}_setPaintValue(D,J,pe){if(this.type==="color"){let ke=Pn(pe);for(let je=D;je`u_${ht}_t`),this.type=pe,this.useIntegerZoom=ke,this.zoom=je,this.maxValue=0,this.paintVertexAttributes=J.map(ht=>({name:`a_${ht}`,type:"Float32",components:pe==="color"?4:2,offset:0})),this.paintVertexArray=new We}populatePaintArray(D,J,pe,ke,je){let We=this.expression.evaluate(new Rs(this.zoom),J,{},ke,[],je),ht=this.expression.evaluate(new Rs(this.zoom+1),J,{},ke,[],je),Et=this.paintVertexArray.length;this.paintVertexArray.resize(D),this._setPaintValue(Et,D,We,ht)}updatePaintArray(D,J,pe,ke){let je=this.expression.evaluate({zoom:this.zoom},pe,ke),We=this.expression.evaluate({zoom:this.zoom+1},pe,ke);this._setPaintValue(D,J,je,We)}_setPaintValue(D,J,pe,ke){if(this.type==="color"){let je=Pn(pe),We=Pn(ke);for(let ht=D;ht`#define HAS_UNIFORM_${ke}`))}return D}getBinderAttributes(){let D=[];for(let J in this.binders){let pe=this.binders[J];if(pe instanceof Yo||pe instanceof io)for(let ke=0;ke!0){this.programConfigurations={};for(let ke of D)this.programConfigurations[ke.id]=new cl(ke,J,pe);this.needsUpload=!1,this._featureMap=new Sa,this._bufferOffset=0}populatePaintArrays(D,J,pe,ke,je,We){for(let ht in this.programConfigurations)this.programConfigurations[ht].populatePaintArrays(D,J,ke,je,We);J.id!==void 0&&this._featureMap.add(J.id,pe,this._bufferOffset,D),this._bufferOffset=D,this.needsUpload=!0}updatePaintArrays(D,J,pe,ke){for(let je of pe)this.needsUpload=this.programConfigurations[je.id].updatePaintArrays(D,this._featureMap,J,je,ke)||this.needsUpload}get(D){return this.programConfigurations[D]}upload(D){if(this.needsUpload){for(let J in this.programConfigurations)this.programConfigurations[J].upload(D);this.needsUpload=!1}}destroy(){for(let D in this.programConfigurations)this.programConfigurations[D].destroy()}}function xl(W,D){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-extrusion-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"]}[W]||[W.replace(`${D}-`,"").replace(/-/g,"_")]}function gn(W,D,J){let pe={color:{source:na,composite:Vi},number:{source:Qr,composite:na}},ke=function(je){return{"line-pattern":{source:Tl,composite:Tl},"fill-pattern":{source:Tl,composite:Tl},"fill-extrusion-pattern":{source:Tl,composite:Tl}}[je]}(W);return ke&&ke[J]||pe[D][J]}mi("ConstantBinder",Jn),mi("CrossFadedConstantBinder",ro),mi("SourceExpressionBinder",Yo),mi("CrossFadedCompositeBinder",Ho),mi("CompositeExpressionBinder",io),mi("ProgramConfiguration",cl,{omit:["_buffers"]}),mi("ProgramConfigurationSet",al);let vo=8192,cs=Math.pow(2,14)-1,ms=-cs-1;function Al(W){let D=vo/W.extent,J=W.loadGeometry();for(let pe=0;peWe.x+1||EtWe.y+1)&&f("Geometry exceeds allowed extent, reduce your vector tile buffer size")}}return J}function Hl(W,D){return{type:W.type,id:W.id,properties:W.properties,geometry:D?Al(W):[]}}function Su(W,D,J,pe,ke){W.emplaceBack(2*D+(pe+1)/2,2*J+(ke+1)/2)}class Rl{constructor(D){this.zoom=D.zoom,this.overscaling=D.overscaling,this.layers=D.layers,this.layerIds=this.layers.map(J=>J.id),this.index=D.index,this.hasPattern=!1,this.layoutVertexArray=new $o,this.indexArray=new Fe,this.segments=new Mt,this.programConfigurations=new al(D.layers,D.zoom),this.stateDependentLayerIds=this.layers.filter(J=>J.isStateDependent()).map(J=>J.id)}populate(D,J,pe){let ke=this.layers[0],je=[],We=null,ht=!1;ke.type==="circle"&&(We=ke.layout.get("circle-sort-key"),ht=!We.isConstant());for(let{feature:Et,id:Ut,index:or,sourceLayerIndex:Mr}of D){let zr=this.layers[0]._featureFilter.needGeometry,Wr=Hl(Et,zr);if(!this.layers[0]._featureFilter.filter(new Rs(this.zoom),Wr,pe))continue;let ia=ht?We.evaluate(Wr,{},pe):void 0,ha={id:Ut,properties:Et.properties,type:Et.type,sourceLayerIndex:Mr,index:or,geometry:zr?Wr.geometry:Al(Et),patterns:{},sortKey:ia};je.push(ha)}ht&&je.sort((Et,Ut)=>Et.sortKey-Ut.sortKey);for(let Et of je){let{geometry:Ut,index:or,sourceLayerIndex:Mr}=Et,zr=D[or].feature;this.addFeature(Et,Ut,or,pe),J.featureIndex.insert(zr,Ut,or,Mr,this.index)}}update(D,J,pe){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(D,J,this.stateDependentLayers,pe)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(D){this.uploaded||(this.layoutVertexBuffer=D.createVertexBuffer(this.layoutVertexArray,bt),this.indexBuffer=D.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(D),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(D,J,pe,ke){for(let je of J)for(let We of je){let ht=We.x,Et=We.y;if(ht<0||ht>=vo||Et<0||Et>=vo)continue;let Ut=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,D.sortKey),or=Ut.vertexLength;Su(this.layoutVertexArray,ht,Et,-1,-1),Su(this.layoutVertexArray,ht,Et,1,-1),Su(this.layoutVertexArray,ht,Et,1,1),Su(this.layoutVertexArray,ht,Et,-1,1),this.indexArray.emplaceBack(or,or+1,or+2),this.indexArray.emplaceBack(or,or+3,or+2),Ut.vertexLength+=4,Ut.primitiveLength+=2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,D,pe,{},ke)}}function _c(W,D){for(let J=0;J1){if(oa(W,D))return!0;for(let pe=0;pe1?J:J.sub(D)._mult(ke)._add(D))}function Ya(W,D){let J,pe,ke,je=!1;for(let We=0;WeD.y!=ke.y>D.y&&D.x<(ke.x-pe.x)*(D.y-pe.y)/(ke.y-pe.y)+pe.x&&(je=!je)}return je}function bi(W,D){let J=!1;for(let pe=0,ke=W.length-1;peD.y!=We.y>D.y&&D.x<(We.x-je.x)*(D.y-je.y)/(We.y-je.y)+je.x&&(J=!J)}return J}function yi(W,D,J){let pe=J[0],ke=J[2];if(W.xke.x&&D.x>ke.x||W.yke.y&&D.y>ke.y)return!1;let je=R(W,D,J[0]);return je!==R(W,D,J[1])||je!==R(W,D,J[2])||je!==R(W,D,J[3])}function si(W,D,J){let pe=D.paint.get(W).value;return pe.kind==="constant"?pe.value:J.programConfigurations.get(D.id).getMaxValue(W)}function yn(W){return Math.sqrt(W[0]*W[0]+W[1]*W[1])}function zi(W,D,J,pe,ke){if(!D[0]&&!D[1])return W;let je=n.convert(D)._mult(ke);J==="viewport"&&je._rotate(-pe);let We=[];for(let ht=0;htUa(ja,ha))}(Ut,Et),Wr=Mr?or*ht:or;for(let ia of ke)for(let ha of ia){let ja=Mr?ha:Ua(ha,Et),Ka=Wr,Wi=pn([],[ha.x,ha.y,0,1],Et);if(this.paint.get("circle-pitch-scale")==="viewport"&&this.paint.get("circle-pitch-alignment")==="map"?Ka*=Wi[3]/We.cameraToCenterDistance:this.paint.get("circle-pitch-scale")==="map"&&this.paint.get("circle-pitch-alignment")==="viewport"&&(Ka*=We.cameraToCenterDistance/Wi[3]),it(zr,ja,Ka))return!0}return!1}}function Ua(W,D){let J=pn([],[W.x,W.y,0,1],D);return new n(J[0]/J[3],J[1]/J[3])}class Yi extends Rl{}let Ri;mi("HeatmapBucket",Yi,{omit:["layers"]});var Ti={get paint(){return Ri=Ri||new Ue({"heatmap-radius":new Ro(re.paint_heatmap["heatmap-radius"]),"heatmap-weight":new Ro(re.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new ho(re.paint_heatmap["heatmap-intensity"]),"heatmap-color":new Yu(re.paint_heatmap["heatmap-color"]),"heatmap-opacity":new ho(re.paint_heatmap["heatmap-opacity"])})}};function xi(W,{width:D,height:J},pe,ke){if(ke){if(ke instanceof Uint8ClampedArray)ke=new Uint8Array(ke.buffer);else if(ke.length!==D*J*pe)throw new RangeError(`mismatched image size. expected: ${ke.length} but got: ${D*J*pe}`)}else ke=new Uint8Array(D*J*pe);return W.width=D,W.height=J,W.data=ke,W}function Xi(W,{width:D,height:J},pe){if(D===W.width&&J===W.height)return;let ke=xi({},{width:D,height:J},pe);mn(W,ke,{x:0,y:0},{x:0,y:0},{width:Math.min(W.width,D),height:Math.min(W.height,J)},pe),W.width=D,W.height=J,W.data=ke.data}function mn(W,D,J,pe,ke,je){if(ke.width===0||ke.height===0)return D;if(ke.width>W.width||ke.height>W.height||J.x>W.width-ke.width||J.y>W.height-ke.height)throw new RangeError("out of range source coordinates for image copy");if(ke.width>D.width||ke.height>D.height||pe.x>D.width-ke.width||pe.y>D.height-ke.height)throw new RangeError("out of range destination coordinates for image copy");let We=W.data,ht=D.data;if(We===ht)throw new Error("srcData equals dstData, so image is already copied");for(let Et=0;Et{D[W.evaluationKey]=Et;let Ut=W.expression.evaluate(D);ke.data[We+ht+0]=Math.floor(255*Ut.r/Ut.a),ke.data[We+ht+1]=Math.floor(255*Ut.g/Ut.a),ke.data[We+ht+2]=Math.floor(255*Ut.b/Ut.a),ke.data[We+ht+3]=Math.floor(255*Ut.a)};if(W.clips)for(let We=0,ht=0;We80*J){ht=1/0,Et=1/0;let or=-1/0,Mr=-1/0;for(let zr=J;zror&&(or=Wr),ia>Mr&&(Mr=ia)}Ut=Math.max(or-ht,Mr-Et),Ut=Ut!==0?32767/Ut:0}return tu(je,We,J,ht,Et,Ut,0),We}function Sl(W,D,J,pe,ke){let je;if(ke===function(We,ht,Et,Ut){let or=0;for(let Mr=ht,zr=Et-Ut;Mr0)for(let We=D;We=D;We-=pe)je=pr(We/pe|0,W[We],W[We+1],je);return je&&Le(je,je.next)&&(yt(je),je=je.next),je}function kl(W,D){if(!W)return W;D||(D=W);let J,pe=W;do if(J=!1,pe.steiner||!Le(pe,pe.next)&&Ge(pe.prev,pe,pe.next)!==0)pe=pe.next;else{if(yt(pe),pe=D=pe.prev,pe===pe.next)break;J=!0}while(J||pe!==D);return D}function tu(W,D,J,pe,ke,je,We){if(!W)return;!We&&je&&function(Et,Ut,or,Mr){let zr=Et;do zr.z===0&&(zr.z=K(zr.x,zr.y,Ut,or,Mr)),zr.prevZ=zr.prev,zr.nextZ=zr.next,zr=zr.next;while(zr!==Et);zr.prevZ.nextZ=null,zr.prevZ=null,function(Wr){let ia,ha=1;do{let ja,Ka=Wr;Wr=null;let Wi=null;for(ia=0;Ka;){ia++;let gi=Ka,qi=0;for(let qn=0;qn0||en>0&&gi;)qi!==0&&(en===0||!gi||Ka.z<=gi.z)?(ja=Ka,Ka=Ka.nextZ,qi--):(ja=gi,gi=gi.nextZ,en--),Wi?Wi.nextZ=ja:Wr=ja,ja.prevZ=Wi,Wi=ja;Ka=gi}Wi.nextZ=null,ha*=2}while(ia>1)}(zr)}(W,pe,ke,je);let ht=W;for(;W.prev!==W.next;){let Et=W.prev,Ut=W.next;if(je?pl(W,pe,ke,je):qs(W))D.push(Et.i,W.i,Ut.i),yt(W),W=Ut.next,ht=Ut.next;else if((W=Ut)===ht){We?We===1?tu(W=wl(kl(W),D),D,J,pe,ke,je,2):We===2&&Yn(W,D,J,pe,ke,je):tu(kl(W),D,J,pe,ke,je,1);break}}}function qs(W){let D=W.prev,J=W,pe=W.next;if(Ge(D,J,pe)>=0)return!1;let ke=D.x,je=J.x,We=pe.x,ht=D.y,Et=J.y,Ut=pe.y,or=keje?ke>We?ke:We:je>We?je:We,Wr=ht>Et?ht>Ut?ht:Ut:Et>Ut?Et:Ut,ia=pe.next;for(;ia!==D;){if(ia.x>=or&&ia.x<=zr&&ia.y>=Mr&&ia.y<=Wr&&te(ke,ht,je,Et,We,Ut,ia.x,ia.y)&&Ge(ia.prev,ia,ia.next)>=0)return!1;ia=ia.next}return!0}function pl(W,D,J,pe){let ke=W.prev,je=W,We=W.next;if(Ge(ke,je,We)>=0)return!1;let ht=ke.x,Et=je.x,Ut=We.x,or=ke.y,Mr=je.y,zr=We.y,Wr=htEt?ht>Ut?ht:Ut:Et>Ut?Et:Ut,ja=or>Mr?or>zr?or:zr:Mr>zr?Mr:zr,Ka=K(Wr,ia,D,J,pe),Wi=K(ha,ja,D,J,pe),gi=W.prevZ,qi=W.nextZ;for(;gi&&gi.z>=Ka&&qi&&qi.z<=Wi;){if(gi.x>=Wr&&gi.x<=ha&&gi.y>=ia&&gi.y<=ja&&gi!==ke&&gi!==We&&te(ht,or,Et,Mr,Ut,zr,gi.x,gi.y)&&Ge(gi.prev,gi,gi.next)>=0||(gi=gi.prevZ,qi.x>=Wr&&qi.x<=ha&&qi.y>=ia&&qi.y<=ja&&qi!==ke&&qi!==We&&te(ht,or,Et,Mr,Ut,zr,qi.x,qi.y)&&Ge(qi.prev,qi,qi.next)>=0))return!1;qi=qi.nextZ}for(;gi&&gi.z>=Ka;){if(gi.x>=Wr&&gi.x<=ha&&gi.y>=ia&&gi.y<=ja&&gi!==ke&&gi!==We&&te(ht,or,Et,Mr,Ut,zr,gi.x,gi.y)&&Ge(gi.prev,gi,gi.next)>=0)return!1;gi=gi.prevZ}for(;qi&&qi.z<=Wi;){if(qi.x>=Wr&&qi.x<=ha&&qi.y>=ia&&qi.y<=ja&&qi!==ke&&qi!==We&&te(ht,or,Et,Mr,Ut,zr,qi.x,qi.y)&&Ge(qi.prev,qi,qi.next)>=0)return!1;qi=qi.nextZ}return!0}function wl(W,D){let J=W;do{let pe=J.prev,ke=J.next.next;!Le(pe,ke)&&$e(pe,J,J.next,ke)&&wr(pe,ke)&&wr(ke,pe)&&(D.push(pe.i,J.i,ke.i),yt(J),yt(J.next),J=W=ke),J=J.next}while(J!==W);return kl(J)}function Yn(W,D,J,pe,ke,je){let We=W;do{let ht=We.next.next;for(;ht!==We.prev;){if(We.i!==ht.i&&me(We,ht)){let Et=Nr(We,ht);return We=kl(We,We.next),Et=kl(Et,Et.next),tu(We,D,J,pe,ke,je,0),void tu(Et,D,J,pe,ke,je,0)}ht=ht.next}We=We.next}while(We!==W)}function Cl(W,D){return W.x-D.x}function Co(W,D){let J=function(ke,je){let We=je,ht=ke.x,Et=ke.y,Ut,or=-1/0;do{if(Et<=We.y&&Et>=We.next.y&&We.next.y!==We.y){let ha=We.x+(Et-We.y)*(We.next.x-We.x)/(We.next.y-We.y);if(ha<=ht&&ha>or&&(or=ha,Ut=We.x=We.x&&We.x>=zr&&ht!==We.x&&te(EtUt.x||We.x===Ut.x&&ve(Ut,We)))&&(Ut=We,ia=ha)}We=We.next}while(We!==Mr);return Ut}(W,D);if(!J)return D;let pe=Nr(J,W);return kl(pe,pe.next),kl(J,J.next)}function ve(W,D){return Ge(W.prev,W,D.prev)<0&&Ge(D.next,W,W.next)<0}function K(W,D,J,pe,ke){return(W=1431655765&((W=858993459&((W=252645135&((W=16711935&((W=(W-J)*ke|0)|W<<8))|W<<4))|W<<2))|W<<1))|(D=1431655765&((D=858993459&((D=252645135&((D=16711935&((D=(D-pe)*ke|0)|D<<8))|D<<4))|D<<2))|D<<1))<<1}function _e(W){let D=W,J=W;do(D.x=(W-We)*(je-ht)&&(W-We)*(pe-ht)>=(J-We)*(D-ht)&&(J-We)*(je-ht)>=(ke-We)*(pe-ht)}function me(W,D){return W.next.i!==D.i&&W.prev.i!==D.i&&!function(J,pe){let ke=J;do{if(ke.i!==J.i&&ke.next.i!==J.i&&ke.i!==pe.i&&ke.next.i!==pe.i&&$e(ke,ke.next,J,pe))return!0;ke=ke.next}while(ke!==J);return!1}(W,D)&&(wr(W,D)&&wr(D,W)&&function(J,pe){let ke=J,je=!1,We=(J.x+pe.x)/2,ht=(J.y+pe.y)/2;do ke.y>ht!=ke.next.y>ht&&ke.next.y!==ke.y&&We<(ke.next.x-ke.x)*(ht-ke.y)/(ke.next.y-ke.y)+ke.x&&(je=!je),ke=ke.next;while(ke!==J);return je}(W,D)&&(Ge(W.prev,W,D.prev)||Ge(W,D.prev,D))||Le(W,D)&&Ge(W.prev,W,W.next)>0&&Ge(D.prev,D,D.next)>0)}function Ge(W,D,J){return(D.y-W.y)*(J.x-D.x)-(D.x-W.x)*(J.y-D.y)}function Le(W,D){return W.x===D.x&&W.y===D.y}function $e(W,D,J,pe){let ke=jt(Ge(W,D,J)),je=jt(Ge(W,D,pe)),We=jt(Ge(J,pe,W)),ht=jt(Ge(J,pe,D));return ke!==je&&We!==ht||!(ke!==0||!gt(W,J,D))||!(je!==0||!gt(W,pe,D))||!(We!==0||!gt(J,W,pe))||!(ht!==0||!gt(J,D,pe))}function gt(W,D,J){return D.x<=Math.max(W.x,J.x)&&D.x>=Math.min(W.x,J.x)&&D.y<=Math.max(W.y,J.y)&&D.y>=Math.min(W.y,J.y)}function jt(W){return W>0?1:W<0?-1:0}function wr(W,D){return Ge(W.prev,W,W.next)<0?Ge(W,D,W.next)>=0&&Ge(W,W.prev,D)>=0:Ge(W,D,W.prev)<0||Ge(W,W.next,D)<0}function Nr(W,D){let J=kt(W.i,W.x,W.y),pe=kt(D.i,D.x,D.y),ke=W.next,je=D.prev;return W.next=D,D.prev=W,J.next=ke,ke.prev=J,pe.next=J,J.prev=pe,je.next=pe,pe.prev=je,pe}function pr(W,D,J,pe){let ke=kt(W,D,J);return pe?(ke.next=pe.next,ke.prev=pe,pe.next.prev=ke,pe.next=ke):(ke.prev=ke,ke.next=ke),ke}function yt(W){W.next.prev=W.prev,W.prev.next=W.next,W.prevZ&&(W.prevZ.nextZ=W.nextZ),W.nextZ&&(W.nextZ.prevZ=W.prevZ)}function kt(W,D,J){return{i:W,x:D,y:J,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function Bt(W,D,J){let pe=J.patternDependencies,ke=!1;for(let je of D){let We=je.paint.get(`${W}-pattern`);We.isConstant()||(ke=!0);let ht=We.constantOr(null);ht&&(ke=!0,pe[ht.to]=!0,pe[ht.from]=!0)}return ke}function nr(W,D,J,pe,ke){let je=ke.patternDependencies;for(let We of D){let ht=We.paint.get(`${W}-pattern`).value;if(ht.kind!=="constant"){let Et=ht.evaluate({zoom:pe-1},J,{},ke.availableImages),Ut=ht.evaluate({zoom:pe},J,{},ke.availableImages),or=ht.evaluate({zoom:pe+1},J,{},ke.availableImages);Et=Et&&Et.name?Et.name:Et,Ut=Ut&&Ut.name?Ut.name:Ut,or=or&&or.name?or.name:or,je[Et]=!0,je[Ut]=!0,je[or]=!0,J.patterns[We.id]={min:Et,mid:Ut,max:or}}}return J}class hr{constructor(D){this.zoom=D.zoom,this.overscaling=D.overscaling,this.layers=D.layers,this.layerIds=this.layers.map(J=>J.id),this.index=D.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new Il,this.indexArray=new Fe,this.indexArray2=new et,this.programConfigurations=new al(D.layers,D.zoom),this.segments=new Mt,this.segments2=new Mt,this.stateDependentLayerIds=this.layers.filter(J=>J.isStateDependent()).map(J=>J.id)}populate(D,J,pe){this.hasPattern=Bt("fill",this.layers,J);let ke=this.layers[0].layout.get("fill-sort-key"),je=!ke.isConstant(),We=[];for(let{feature:ht,id:Et,index:Ut,sourceLayerIndex:or}of D){let Mr=this.layers[0]._featureFilter.needGeometry,zr=Hl(ht,Mr);if(!this.layers[0]._featureFilter.filter(new Rs(this.zoom),zr,pe))continue;let Wr=je?ke.evaluate(zr,{},pe,J.availableImages):void 0,ia={id:Et,properties:ht.properties,type:ht.type,sourceLayerIndex:or,index:Ut,geometry:Mr?zr.geometry:Al(ht),patterns:{},sortKey:Wr};We.push(ia)}je&&We.sort((ht,Et)=>ht.sortKey-Et.sortKey);for(let ht of We){let{geometry:Et,index:Ut,sourceLayerIndex:or}=ht;if(this.hasPattern){let Mr=nr("fill",this.layers,ht,this.zoom,J);this.patternFeatures.push(Mr)}else this.addFeature(ht,Et,Ut,pe,{});J.featureIndex.insert(D[Ut].feature,Et,Ut,or,this.index)}}update(D,J,pe){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(D,J,this.stateDependentLayers,pe)}addFeatures(D,J,pe){for(let ke of this.patternFeatures)this.addFeature(ke,ke.geometry,ke.index,J,pe)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(D){this.uploaded||(this.layoutVertexBuffer=D.createVertexBuffer(this.layoutVertexArray,Wl),this.indexBuffer=D.createIndexBuffer(this.indexArray),this.indexBuffer2=D.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(D),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())}addFeature(D,J,pe,ke,je){for(let We of Tc(J,500)){let ht=0;for(let Wr of We)ht+=Wr.length;let Et=this.segments.prepareSegment(ht,this.layoutVertexArray,this.indexArray),Ut=Et.vertexLength,or=[],Mr=[];for(let Wr of We){if(Wr.length===0)continue;Wr!==We[0]&&Mr.push(or.length/2);let ia=this.segments2.prepareSegment(Wr.length,this.layoutVertexArray,this.indexArray2),ha=ia.vertexLength;this.layoutVertexArray.emplaceBack(Wr[0].x,Wr[0].y),this.indexArray2.emplaceBack(ha+Wr.length-1,ha),or.push(Wr[0].x),or.push(Wr[0].y);for(let ja=1;ja>3}if(ke--,pe===1||pe===2)je+=W.readSVarint(),We+=W.readSVarint(),pe===1&&(D&&ht.push(D),D=[]),D.push(new ga(je,We));else{if(pe!==7)throw new Error("unknown command "+pe);D&&D.push(D[0].clone())}}return D&&ht.push(D),ht},Ga.prototype.bbox=function(){var W=this._pbf;W.pos=this._geometry;for(var D=W.readVarint()+W.pos,J=1,pe=0,ke=0,je=0,We=1/0,ht=-1/0,Et=1/0,Ut=-1/0;W.pos>3}if(pe--,J===1||J===2)(ke+=W.readSVarint())ht&&(ht=ke),(je+=W.readSVarint())Ut&&(Ut=je);else if(J!==7)throw new Error("unknown command "+J)}return[We,Et,ht,Ut]},Ga.prototype.toGeoJSON=function(W,D,J){var pe,ke,je=this.extent*Math.pow(2,J),We=this.extent*W,ht=this.extent*D,Et=this.loadGeometry(),Ut=Ga.types[this.type];function or(Wr){for(var ia=0;ia>3;ke=We===1?pe.readString():We===2?pe.readFloat():We===3?pe.readDouble():We===4?pe.readVarint64():We===5?pe.readVarint():We===6?pe.readSVarint():We===7?pe.readBoolean():null}return ke}(J))}_i.prototype.feature=function(W){if(W<0||W>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[W];var D=this._pbf.readVarint()+this._pbf.pos;return new Fi(this._pbf,D,this.extent,this._keys,this._values)};var Ui=ui;function fn(W,D,J){if(W===3){var pe=new Ui(J,J.readVarint()+J.pos);pe.length&&(D[pe.name]=pe)}}Jr.VectorTile=function(W,D){this.layers=W.readFields(fn,{},D)},Jr.VectorTileFeature=vi,Jr.VectorTileLayer=ui;let _o=Jr.VectorTileFeature.types,Bo=Math.pow(2,13);function Ps(W,D,J,pe,ke,je,We,ht){W.emplaceBack(D,J,2*Math.floor(pe*Bo)+We,ke*Bo*2,je*Bo*2,Math.round(ht))}class Do{constructor(D){this.zoom=D.zoom,this.overscaling=D.overscaling,this.layers=D.layers,this.layerIds=this.layers.map(J=>J.id),this.index=D.index,this.hasPattern=!1,this.layoutVertexArray=new eu,this.centroidVertexArray=new Jo,this.indexArray=new Fe,this.programConfigurations=new al(D.layers,D.zoom),this.segments=new Mt,this.stateDependentLayerIds=this.layers.filter(J=>J.isStateDependent()).map(J=>J.id)}populate(D,J,pe){this.features=[],this.hasPattern=Bt("fill-extrusion",this.layers,J);for(let{feature:ke,id:je,index:We,sourceLayerIndex:ht}of D){let Et=this.layers[0]._featureFilter.needGeometry,Ut=Hl(ke,Et);if(!this.layers[0]._featureFilter.filter(new Rs(this.zoom),Ut,pe))continue;let or={id:je,sourceLayerIndex:ht,index:We,geometry:Et?Ut.geometry:Al(ke),properties:ke.properties,type:ke.type,patterns:{}};this.hasPattern?this.features.push(nr("fill-extrusion",this.layers,or,this.zoom,J)):this.addFeature(or,or.geometry,We,pe,{}),J.featureIndex.insert(ke,or.geometry,We,ht,this.index,!0)}}addFeatures(D,J,pe){for(let ke of this.features){let{geometry:je}=ke;this.addFeature(ke,je,ke.index,J,pe)}}update(D,J,pe){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(D,J,this.stateDependentLayers,pe)}isEmpty(){return this.layoutVertexArray.length===0&&this.centroidVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(D){this.uploaded||(this.layoutVertexBuffer=D.createVertexBuffer(this.layoutVertexArray,Dr),this.centroidVertexBuffer=D.createVertexBuffer(this.centroidVertexArray,Vt.members,!0),this.indexBuffer=D.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(D),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(D,J,pe,ke,je){for(let We of Tc(J,500)){let ht={x:0,y:0,vertexCount:0},Et=0;for(let ia of We)Et+=ia.length;let Ut=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray);for(let ia of We){if(ia.length===0||Ys(ia))continue;let ha=0;for(let ja=0;ja=1){let Wi=ia[ja-1];if(!Ms(Ka,Wi)){Ut.vertexLength+4>Mt.MAX_VERTEX_ARRAY_LENGTH&&(Ut=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));let gi=Ka.sub(Wi)._perp()._unit(),qi=Wi.dist(Ka);ha+qi>32768&&(ha=0),Ps(this.layoutVertexArray,Ka.x,Ka.y,gi.x,gi.y,0,0,ha),Ps(this.layoutVertexArray,Ka.x,Ka.y,gi.x,gi.y,0,1,ha),ht.x+=2*Ka.x,ht.y+=2*Ka.y,ht.vertexCount+=2,ha+=qi,Ps(this.layoutVertexArray,Wi.x,Wi.y,gi.x,gi.y,0,0,ha),Ps(this.layoutVertexArray,Wi.x,Wi.y,gi.x,gi.y,0,1,ha),ht.x+=2*Wi.x,ht.y+=2*Wi.y,ht.vertexCount+=2;let en=Ut.vertexLength;this.indexArray.emplaceBack(en,en+2,en+1),this.indexArray.emplaceBack(en+1,en+2,en+3),Ut.vertexLength+=4,Ut.primitiveLength+=2}}}}if(Ut.vertexLength+Et>Mt.MAX_VERTEX_ARRAY_LENGTH&&(Ut=this.segments.prepareSegment(Et,this.layoutVertexArray,this.indexArray)),_o[D.type]!=="Polygon")continue;let or=[],Mr=[],zr=Ut.vertexLength;for(let ia of We)if(ia.length!==0){ia!==We[0]&&Mr.push(or.length/2);for(let ha=0;havo)||W.y===D.y&&(W.y<0||W.y>vo)}function Ys(W){return W.every(D=>D.x<0)||W.every(D=>D.x>vo)||W.every(D=>D.y<0)||W.every(D=>D.y>vo)}let mu;mi("FillExtrusionBucket",Do,{omit:["layers","features"]});var Ep={get paint(){return mu=mu||new Ue({"fill-extrusion-opacity":new ho(re["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Ro(re["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new ho(re["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new ho(re["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new Dc(re["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Ro(re["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Ro(re["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new ho(re["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class kp extends ie{constructor(D){super(D,Ep)}createBucket(D){return new Do(D)}queryRadius(){return yn(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature(D,J,pe,ke,je,We,ht,Et){let Ut=zi(D,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),We.angle,ht),or=this.paint.get("fill-extrusion-height").evaluate(J,pe),Mr=this.paint.get("fill-extrusion-base").evaluate(J,pe),zr=function(ia,ha,ja,Ka){let Wi=[];for(let gi of ia){let qi=[gi.x,gi.y,0,1];pn(qi,qi,ha),Wi.push(new n(qi[0]/qi[3],qi[1]/qi[3]))}return Wi}(Ut,Et),Wr=function(ia,ha,ja,Ka){let Wi=[],gi=[],qi=Ka[8]*ha,en=Ka[9]*ha,qn=Ka[10]*ha,Eo=Ka[11]*ha,ys=Ka[8]*ja,mo=Ka[9]*ja,zn=Ka[10]*ja,ts=Ka[11]*ja;for(let Uo of ia){let zo=[],wn=[];for(let os of Uo){let Fo=os.x,Ls=os.y,Ku=Ka[0]*Fo+Ka[4]*Ls+Ka[12],Uu=Ka[1]*Fo+Ka[5]*Ls+Ka[13],th=Ka[2]*Fo+Ka[6]*Ls+Ka[14],Hp=Ka[3]*Fo+Ka[7]*Ls+Ka[15],Th=th+qn,rh=Hp+Eo,Jh=Ku+ys,$h=Uu+mo,Qh=th+zn,ff=Hp+ts,ah=new n((Ku+qi)/rh,(Uu+en)/rh);ah.z=Th/rh,zo.push(ah);let Fh=new n(Jh/ff,$h/ff);Fh.z=Qh/ff,wn.push(Fh)}Wi.push(zo),gi.push(wn)}return[Wi,gi]}(ke,Mr,or,Et);return function(ia,ha,ja){let Ka=1/0;Zt(ja,ha)&&(Ka=qp(ja,ha[0]));for(let Wi=0;WiJ.id),this.index=D.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(J=>{this.gradients[J.id]={}}),this.layoutVertexArray=new Ru,this.layoutVertexArray2=new vu,this.indexArray=new Fe,this.programConfigurations=new al(D.layers,D.zoom),this.segments=new Mt,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(J=>J.isStateDependent()).map(J=>J.id)}populate(D,J,pe){this.hasPattern=Bt("line",this.layers,J);let ke=this.layers[0].layout.get("line-sort-key"),je=!ke.isConstant(),We=[];for(let{feature:ht,id:Et,index:Ut,sourceLayerIndex:or}of D){let Mr=this.layers[0]._featureFilter.needGeometry,zr=Hl(ht,Mr);if(!this.layers[0]._featureFilter.filter(new Rs(this.zoom),zr,pe))continue;let Wr=je?ke.evaluate(zr,{},pe):void 0,ia={id:Et,properties:ht.properties,type:ht.type,sourceLayerIndex:or,index:Ut,geometry:Mr?zr.geometry:Al(ht),patterns:{},sortKey:Wr};We.push(ia)}je&&We.sort((ht,Et)=>ht.sortKey-Et.sortKey);for(let ht of We){let{geometry:Et,index:Ut,sourceLayerIndex:or}=ht;if(this.hasPattern){let Mr=nr("line",this.layers,ht,this.zoom,J);this.patternFeatures.push(Mr)}else this.addFeature(ht,Et,Ut,pe,{});J.featureIndex.insert(D[Ut].feature,Et,Ut,or,this.index)}}update(D,J,pe){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(D,J,this.stateDependentLayers,pe)}addFeatures(D,J,pe){for(let ke of this.patternFeatures)this.addFeature(ke,ke.geometry,ke.index,J,pe)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(D){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=D.createVertexBuffer(this.layoutVertexArray2,td)),this.layoutVertexBuffer=D.createVertexBuffer(this.layoutVertexArray,ed),this.indexBuffer=D.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(D),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(D){if(D.properties&&Object.prototype.hasOwnProperty.call(D.properties,"mapbox_clip_start")&&Object.prototype.hasOwnProperty.call(D.properties,"mapbox_clip_end"))return{start:+D.properties.mapbox_clip_start,end:+D.properties.mapbox_clip_end}}addFeature(D,J,pe,ke,je){let We=this.layers[0].layout,ht=We.get("line-join").evaluate(D,{}),Et=We.get("line-cap"),Ut=We.get("line-miter-limit"),or=We.get("line-round-limit");this.lineClips=this.lineFeatureClips(D);for(let Mr of J)this.addLine(Mr,D,ht,Et,Ut,or);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,D,pe,je,ke)}addLine(D,J,pe,ke,je,We){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(let Ka=0;Ka=2&&D[Et-1].equals(D[Et-2]);)Et--;let Ut=0;for(;Ut0;if(Eo&&Ka>Ut){let ts=zr.dist(Wr);if(ts>2*or){let Uo=zr.sub(zr.sub(Wr)._mult(or/ts)._round());this.updateDistance(Wr,Uo),this.addCurrentVertex(Uo,ha,0,0,Mr),Wr=Uo}}let mo=Wr&&ia,zn=mo?pe:ht?"butt":ke;if(mo&&zn==="round"&&(enje&&(zn="bevel"),zn==="bevel"&&(en>2&&(zn="flipbevel"),en100)Wi=ja.mult(-1);else{let ts=en*ha.add(ja).mag()/ha.sub(ja).mag();Wi._perp()._mult(ts*(ys?-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 ts=-Math.sqrt(en*en-1),Uo=ys?ts:0,zo=ys?0:ts;if(Wr&&this.addCurrentVertex(zr,ha,Uo,zo,Mr),zn==="fakeround"){let wn=Math.round(180*qn/Math.PI/20);for(let os=1;os2*or){let Uo=zr.add(ia.sub(zr)._mult(or/ts)._round());this.updateDistance(zr,Uo),this.addCurrentVertex(Uo,ja,0,0,Mr),zr=Uo}}}}addCurrentVertex(D,J,pe,ke,je,We=!1){let ht=J.y*ke-J.x,Et=-J.y-J.x*ke;this.addHalfVertex(D,J.x+J.y*pe,J.y-J.x*pe,We,!1,pe,je),this.addHalfVertex(D,ht,Et,We,!0,-ke,je),this.distance>Cp/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(D,J,pe,ke,je,We))}addHalfVertex({x:D,y:J},pe,ke,je,We,ht,Et){let Ut=.5*(this.lineClips?this.scaledDistance*(Cp-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((D<<1)+(je?1:0),(J<<1)+(We?1:0),Math.round(63*pe)+128,Math.round(63*ke)+128,1+(ht===0?0:ht<0?-1:1)|(63&Ut)<<2,Ut>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);let or=Et.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,or),Et.primitiveLength++),We?this.e2=or:this.e1=or}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(D,J){this.distance+=D.dist(J),this.updateScaledDistance()}}let Lp,Cv;mi("LineBucket",Vp,{omit:["layers","patternFeatures"]});var Vd={get paint(){return Cv=Cv||new Ue({"line-opacity":new Ro(re.paint_line["line-opacity"]),"line-color":new Ro(re.paint_line["line-color"]),"line-translate":new ho(re.paint_line["line-translate"]),"line-translate-anchor":new ho(re.paint_line["line-translate-anchor"]),"line-width":new Ro(re.paint_line["line-width"]),"line-gap-width":new Ro(re.paint_line["line-gap-width"]),"line-offset":new Ro(re.paint_line["line-offset"]),"line-blur":new Ro(re.paint_line["line-blur"]),"line-dasharray":new lc(re.paint_line["line-dasharray"]),"line-pattern":new Dc(re.paint_line["line-pattern"]),"line-gradient":new Yu(re.paint_line["line-gradient"])})},get layout(){return Lp=Lp||new Ue({"line-cap":new ho(re.layout_line["line-cap"]),"line-join":new Ro(re.layout_line["line-join"]),"line-miter-limit":new ho(re.layout_line["line-miter-limit"]),"line-round-limit":new ho(re.layout_line["line-round-limit"]),"line-sort-key":new Ro(re.layout_line["line-sort-key"])})}};class Gf extends Ro{possiblyEvaluate(D,J){return J=new Rs(Math.floor(J.zoom),{now:J.now,fadeDuration:J.fadeDuration,zoomHistory:J.zoomHistory,transition:J.transition}),super.possiblyEvaluate(D,J)}evaluate(D,J,pe,ke){return J=M({},J,{zoom:Math.floor(J.zoom)}),super.evaluate(D,J,pe,ke)}}let Gd;class Lv extends ie{constructor(D){super(D,Vd),this.gradientVersion=0,Gd||(Gd=new Gf(Vd.paint.properties["line-width"].specification),Gd.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(D){if(D==="line-gradient"){let J=this.gradientExpression();this.stepInterpolant=!!function(pe){return pe._styleExpression!==void 0}(J)&&J._styleExpression.expression instanceof Ta,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(D,J){super.recalculate(D,J),this.paint._values["line-floorwidth"]=Gd.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,D)}createBucket(D){return new Vp(D)}queryRadius(D){let J=D,pe=ph(si("line-width",this,J),si("line-gap-width",this,J)),ke=si("line-offset",this,J);return pe/2+Math.abs(ke)+yn(this.paint.get("line-translate"))}queryIntersectsFeature(D,J,pe,ke,je,We,ht){let Et=zi(D,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),We.angle,ht),Ut=ht/2*ph(this.paint.get("line-width").evaluate(J,pe),this.paint.get("line-gap-width").evaluate(J,pe)),or=this.paint.get("line-offset").evaluate(J,pe);return or&&(ke=function(Mr,zr){let Wr=[];for(let ia=0;ia=3){for(let ja=0;ja0?D+2*W:W}let iv=dt([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),nm=dt([{name:"a_projected_pos",components:3,type:"Float32"}],4);dt([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);let om=dt([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);dt([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"}]);let Pv=dt([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),nv=dt([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function ov(W,D,J){return W.sections.forEach(pe=>{pe.text=function(ke,je,We){let ht=je.layout.get("text-transform").evaluate(We,{});return ht==="uppercase"?ke=ke.toLocaleUpperCase():ht==="lowercase"&&(ke=ke.toLocaleLowerCase()),Js.applyArabicShaping&&(ke=Js.applyArabicShaping(ke)),ke}(pe.text,D,J)}),W}dt([{name:"triangle",components:3,type:"Uint16"}]),dt([{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"}]),dt([{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"}]),dt([{type:"Float32",name:"offsetX"}]),dt([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),dt([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);let cc={"!":"\uFE15","#":"\uFF03",$:"\uFF04","%":"\uFF05","&":"\uFF06","(":"\uFE35",")":"\uFE36","*":"\uFF0A","+":"\uFF0B",",":"\uFE10","-":"\uFE32",".":"\u30FB","/":"\uFF0F",":":"\uFE13",";":"\uFE14","<":"\uFE3F","=":"\uFF1D",">":"\uFE40","?":"\uFE16","@":"\uFF20","[":"\uFE47","\\":"\uFF3C","]":"\uFE48","^":"\uFF3E",_:"\uFE33","`":"\uFF40","{":"\uFE37","|":"\u2015","}":"\uFE38","~":"\uFF5E","\xA2":"\uFFE0","\xA3":"\uFFE1","\xA5":"\uFFE5","\xA6":"\uFFE4","\xAC":"\uFFE2","\xAF":"\uFFE3","\u2013":"\uFE32","\u2014":"\uFE31","\u2018":"\uFE43","\u2019":"\uFE44","\u201C":"\uFE41","\u201D":"\uFE42","\u2026":"\uFE19","\u2027":"\u30FB","\u20A9":"\uFFE6","\u3001":"\uFE11","\u3002":"\uFE12","\u3008":"\uFE3F","\u3009":"\uFE40","\u300A":"\uFE3D","\u300B":"\uFE3E","\u300C":"\uFE41","\u300D":"\uFE42","\u300E":"\uFE43","\u300F":"\uFE44","\u3010":"\uFE3B","\u3011":"\uFE3C","\u3014":"\uFE39","\u3015":"\uFE3A","\u3016":"\uFE17","\u3017":"\uFE18","\uFF01":"\uFE15","\uFF08":"\uFE35","\uFF09":"\uFE36","\uFF0C":"\uFE10","\uFF0D":"\uFE32","\uFF0E":"\u30FB","\uFF1A":"\uFE13","\uFF1B":"\uFE14","\uFF1C":"\uFE3F","\uFF1E":"\uFE40","\uFF1F":"\uFE16","\uFF3B":"\uFE47","\uFF3D":"\uFE48","\uFF3F":"\uFE33","\uFF5B":"\uFE37","\uFF5C":"\u2015","\uFF5D":"\uFE38","\uFF5F":"\uFE35","\uFF60":"\uFE36","\uFF61":"\uFE12","\uFF62":"\uFE41","\uFF63":"\uFE42"};var fu=24,Dh=Mu,Iv=function(W,D,J,pe,ke){var je,We,ht=8*ke-pe-1,Et=(1<>1,or=-7,Mr=J?ke-1:0,zr=J?-1:1,Wr=W[D+Mr];for(Mr+=zr,je=Wr&(1<<-or)-1,Wr>>=-or,or+=ht;or>0;je=256*je+W[D+Mr],Mr+=zr,or-=8);for(We=je&(1<<-or)-1,je>>=-or,or+=pe;or>0;We=256*We+W[D+Mr],Mr+=zr,or-=8);if(je===0)je=1-Ut;else{if(je===Et)return We?NaN:1/0*(Wr?-1:1);We+=Math.pow(2,pe),je-=Ut}return(Wr?-1:1)*We*Math.pow(2,je-pe)},sm=function(W,D,J,pe,ke,je){var We,ht,Et,Ut=8*je-ke-1,or=(1<>1,zr=ke===23?Math.pow(2,-24)-Math.pow(2,-77):0,Wr=pe?0:je-1,ia=pe?1:-1,ha=D<0||D===0&&1/D<0?1:0;for(D=Math.abs(D),isNaN(D)||D===1/0?(ht=isNaN(D)?1:0,We=or):(We=Math.floor(Math.log(D)/Math.LN2),D*(Et=Math.pow(2,-We))<1&&(We--,Et*=2),(D+=We+Mr>=1?zr/Et:zr*Math.pow(2,1-Mr))*Et>=2&&(We++,Et/=2),We+Mr>=or?(ht=0,We=or):We+Mr>=1?(ht=(D*Et-1)*Math.pow(2,ke),We+=Mr):(ht=D*Math.pow(2,Mr-1)*Math.pow(2,ke),We=0));ke>=8;W[J+Wr]=255&ht,Wr+=ia,ht/=256,ke-=8);for(We=We<0;W[J+Wr]=255&We,Wr+=ia,We/=256,Ut-=8);W[J+Wr-ia]|=128*ha};function Mu(W){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(W)?W:new Uint8Array(W||0),this.pos=0,this.type=0,this.length=this.buf.length}Mu.Varint=0,Mu.Fixed64=1,Mu.Bytes=2,Mu.Fixed32=5;var w0=4294967296,sv=1/w0,xg=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");function Pp(W){return W.type===Mu.Bytes?W.readVarint()+W.pos:W.pos+1}function lv(W,D,J){return J?4294967296*D+(W>>>0):4294967296*(D>>>0)+(W>>>0)}function bg(W,D,J){var pe=D<=16383?1:D<=2097151?2:D<=268435455?3:Math.floor(Math.log(D)/(7*Math.LN2));J.realloc(pe);for(var ke=J.pos-1;ke>=W;ke--)J.buf[ke+pe]=J.buf[ke]}function T0(W,D){for(var J=0;J>>8,W[J+2]=D>>>16,W[J+3]=D>>>24}function Lx(W,D){return(W[D]|W[D+1]<<8|W[D+2]<<16)+(W[D+3]<<24)}Mu.prototype={destroy:function(){this.buf=null},readFields:function(W,D,J){for(J=J||this.length;this.pos>3,je=this.pos;this.type=7&pe,W(ke,D,this),this.pos===je&&this.skip(pe)}return D},readMessage:function(W,D){return this.readFields(W,D,this.readVarint()+this.pos)},readFixed32:function(){var W=Rv(this.buf,this.pos);return this.pos+=4,W},readSFixed32:function(){var W=Lx(this.buf,this.pos);return this.pos+=4,W},readFixed64:function(){var W=Rv(this.buf,this.pos)+Rv(this.buf,this.pos+4)*w0;return this.pos+=8,W},readSFixed64:function(){var W=Rv(this.buf,this.pos)+Lx(this.buf,this.pos+4)*w0;return this.pos+=8,W},readFloat:function(){var W=Iv(this.buf,this.pos,!0,23,4);return this.pos+=4,W},readDouble:function(){var W=Iv(this.buf,this.pos,!0,52,8);return this.pos+=8,W},readVarint:function(W){var D,J,pe=this.buf;return D=127&(J=pe[this.pos++]),J<128?D:(D|=(127&(J=pe[this.pos++]))<<7,J<128?D:(D|=(127&(J=pe[this.pos++]))<<14,J<128?D:(D|=(127&(J=pe[this.pos++]))<<21,J<128?D:function(ke,je,We){var ht,Et,Ut=We.buf;if(ht=(112&(Et=Ut[We.pos++]))>>4,Et<128||(ht|=(127&(Et=Ut[We.pos++]))<<3,Et<128)||(ht|=(127&(Et=Ut[We.pos++]))<<10,Et<128)||(ht|=(127&(Et=Ut[We.pos++]))<<17,Et<128)||(ht|=(127&(Et=Ut[We.pos++]))<<24,Et<128)||(ht|=(1&(Et=Ut[We.pos++]))<<31,Et<128))return lv(ke,ht,je);throw new Error("Expected varint not more than 10 bytes")}(D|=(15&(J=pe[this.pos]))<<28,W,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var W=this.readVarint();return W%2==1?(W+1)/-2:W/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var W=this.readVarint()+this.pos,D=this.pos;return this.pos=W,W-D>=12&&xg?function(J,pe,ke){return xg.decode(J.subarray(pe,ke))}(this.buf,D,W):function(J,pe,ke){for(var je="",We=pe;We239?4:or>223?3:or>191?2:1;if(We+zr>ke)break;zr===1?or<128&&(Mr=or):zr===2?(192&(ht=J[We+1]))==128&&(Mr=(31&or)<<6|63&ht)<=127&&(Mr=null):zr===3?(Et=J[We+2],(192&(ht=J[We+1]))==128&&(192&Et)==128&&((Mr=(15&or)<<12|(63&ht)<<6|63&Et)<=2047||Mr>=55296&&Mr<=57343)&&(Mr=null)):zr===4&&(Et=J[We+2],Ut=J[We+3],(192&(ht=J[We+1]))==128&&(192&Et)==128&&(192&Ut)==128&&((Mr=(15&or)<<18|(63&ht)<<12|(63&Et)<<6|63&Ut)<=65535||Mr>=1114112)&&(Mr=null)),Mr===null?(Mr=65533,zr=1):Mr>65535&&(Mr-=65536,je+=String.fromCharCode(Mr>>>10&1023|55296),Mr=56320|1023&Mr),je+=String.fromCharCode(Mr),We+=zr}return je}(this.buf,D,W)},readBytes:function(){var W=this.readVarint()+this.pos,D=this.buf.subarray(this.pos,W);return this.pos=W,D},readPackedVarint:function(W,D){if(this.type!==Mu.Bytes)return W.push(this.readVarint(D));var J=Pp(this);for(W=W||[];this.pos127;);else if(D===Mu.Bytes)this.pos=this.readVarint()+this.pos;else if(D===Mu.Fixed32)this.pos+=4;else{if(D!==Mu.Fixed64)throw new Error("Unimplemented type: "+D);this.pos+=8}},writeTag:function(W,D){this.writeVarint(W<<3|D)},realloc:function(W){for(var D=this.length||16;D268435455||W<0?function(D,J){var pe,ke;if(D>=0?(pe=D%4294967296|0,ke=D/4294967296|0):(ke=~(-D/4294967296),4294967295^(pe=~(-D%4294967296))?pe=pe+1|0:(pe=0,ke=ke+1|0)),D>=18446744073709552e3||D<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");J.realloc(10),function(je,We,ht){ht.buf[ht.pos++]=127&je|128,je>>>=7,ht.buf[ht.pos++]=127&je|128,je>>>=7,ht.buf[ht.pos++]=127&je|128,je>>>=7,ht.buf[ht.pos++]=127&je|128,ht.buf[ht.pos]=127&(je>>>=7)}(pe,0,J),function(je,We){var ht=(7&je)<<4;We.buf[We.pos++]|=ht|((je>>>=3)?128:0),je&&(We.buf[We.pos++]=127&je|((je>>>=7)?128:0),je&&(We.buf[We.pos++]=127&je|((je>>>=7)?128:0),je&&(We.buf[We.pos++]=127&je|((je>>>=7)?128:0),je&&(We.buf[We.pos++]=127&je|((je>>>=7)?128:0),je&&(We.buf[We.pos++]=127&je)))))}(ke,J)}(W,this):(this.realloc(4),this.buf[this.pos++]=127&W|(W>127?128:0),W<=127||(this.buf[this.pos++]=127&(W>>>=7)|(W>127?128:0),W<=127||(this.buf[this.pos++]=127&(W>>>=7)|(W>127?128:0),W<=127||(this.buf[this.pos++]=W>>>7&127))))},writeSVarint:function(W){this.writeVarint(W<0?2*-W-1:2*W)},writeBoolean:function(W){this.writeVarint(!!W)},writeString:function(W){W=String(W),this.realloc(4*W.length),this.pos++;var D=this.pos;this.pos=function(pe,ke,je){for(var We,ht,Et=0;Et55295&&We<57344){if(!ht){We>56319||Et+1===ke.length?(pe[je++]=239,pe[je++]=191,pe[je++]=189):ht=We;continue}if(We<56320){pe[je++]=239,pe[je++]=191,pe[je++]=189,ht=We;continue}We=ht-55296<<10|We-56320|65536,ht=null}else ht&&(pe[je++]=239,pe[je++]=191,pe[je++]=189,ht=null);We<128?pe[je++]=We:(We<2048?pe[je++]=We>>6|192:(We<65536?pe[je++]=We>>12|224:(pe[je++]=We>>18|240,pe[je++]=We>>12&63|128),pe[je++]=We>>6&63|128),pe[je++]=63&We|128)}return je}(this.buf,W,this.pos);var J=this.pos-D;J>=128&&bg(D,J,this),this.pos=D-1,this.writeVarint(J),this.pos+=J},writeFloat:function(W){this.realloc(4),sm(this.buf,W,this.pos,!0,23,4),this.pos+=4},writeDouble:function(W){this.realloc(8),sm(this.buf,W,this.pos,!0,52,8),this.pos+=8},writeBytes:function(W){var D=W.length;this.writeVarint(D),this.realloc(D);for(var J=0;J=128&&bg(J,pe,this),this.pos=J-1,this.writeVarint(pe),this.pos+=pe},writeMessage:function(W,D,J){this.writeTag(W,Mu.Bytes),this.writeRawMessage(D,J)},writePackedVarint:function(W,D){D.length&&this.writeMessage(W,T0,D)},writePackedSVarint:function(W,D){D.length&&this.writeMessage(W,UT,D)},writePackedBoolean:function(W,D){D.length&&this.writeMessage(W,VT,D)},writePackedFloat:function(W,D){D.length&&this.writeMessage(W,jT,D)},writePackedDouble:function(W,D){D.length&&this.writeMessage(W,qT,D)},writePackedFixed32:function(W,D){D.length&&this.writeMessage(W,vk,D)},writePackedSFixed32:function(W,D){D.length&&this.writeMessage(W,GT,D)},writePackedFixed64:function(W,D){D.length&&this.writeMessage(W,HT,D)},writePackedSFixed64:function(W,D){D.length&&this.writeMessage(W,WT,D)},writeBytesField:function(W,D){this.writeTag(W,Mu.Bytes),this.writeBytes(D)},writeFixed32Field:function(W,D){this.writeTag(W,Mu.Fixed32),this.writeFixed32(D)},writeSFixed32Field:function(W,D){this.writeTag(W,Mu.Fixed32),this.writeSFixed32(D)},writeFixed64Field:function(W,D){this.writeTag(W,Mu.Fixed64),this.writeFixed64(D)},writeSFixed64Field:function(W,D){this.writeTag(W,Mu.Fixed64),this.writeSFixed64(D)},writeVarintField:function(W,D){this.writeTag(W,Mu.Varint),this.writeVarint(D)},writeSVarintField:function(W,D){this.writeTag(W,Mu.Varint),this.writeSVarint(D)},writeStringField:function(W,D){this.writeTag(W,Mu.Bytes),this.writeString(D)},writeFloatField:function(W,D){this.writeTag(W,Mu.Fixed32),this.writeFloat(D)},writeDoubleField:function(W,D){this.writeTag(W,Mu.Fixed64),this.writeDouble(D)},writeBooleanField:function(W,D){this.writeVarintField(W,!!D)}};var P1=r(Dh);let I1=3;function mk(W,D,J){W===1&&J.readMessage(XT,D)}function XT(W,D,J){if(W===3){let{id:pe,bitmap:ke,width:je,height:We,left:ht,top:Et,advance:Ut}=J.readMessage(Px,{});D.push({id:pe,bitmap:new In({width:je+2*I1,height:We+2*I1},ke),metrics:{width:je,height:We,left:ht,top:Et,advance:Ut}})}}function Px(W,D,J){W===1?D.id=J.readVarint():W===2?D.bitmap=J.readBytes():W===3?D.width=J.readVarint():W===4?D.height=J.readVarint():W===5?D.left=J.readSVarint():W===6?D.top=J.readSVarint():W===7&&(D.advance=J.readVarint())}let Ix=I1;function R1(W){let D=0,J=0;for(let We of W)D+=We.w*We.h,J=Math.max(J,We.w);W.sort((We,ht)=>ht.h-We.h);let pe=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(D/.95)),J),h:1/0}],ke=0,je=0;for(let We of W)for(let ht=pe.length-1;ht>=0;ht--){let Et=pe[ht];if(!(We.w>Et.w||We.h>Et.h)){if(We.x=Et.x,We.y=Et.y,je=Math.max(je,We.y+We.h),ke=Math.max(ke,We.x+We.w),We.w===Et.w&&We.h===Et.h){let Ut=pe.pop();ht=0&&pe>=D&&Ag[this.text.charCodeAt(pe)];pe--)J--;this.text=this.text.substring(D,J),this.sectionIndex=this.sectionIndex.slice(D,J)}substring(D,J){let pe=new lm;return pe.text=this.text.substring(D,J),pe.sectionIndex=this.sectionIndex.slice(D,J),pe.sections=this.sections,pe}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((D,J)=>Math.max(D,this.sections[J].scale),0)}addTextSection(D,J){this.text+=D.text,this.sections.push(S0.forText(D.scale,D.fontStack||J));let pe=this.sections.length-1;for(let ke=0;ke=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function M0(W,D,J,pe,ke,je,We,ht,Et,Ut,or,Mr,zr,Wr,ia){let ha=lm.fromFeature(W,ke),ja;Mr===e.ah.vertical&&ha.verticalizePunctuation();let{processBidirectionalText:Ka,processStyledBidirectionalText:Wi}=Js;if(Ka&&ha.sections.length===1){ja=[];let en=Ka(ha.toString(),um(ha,Ut,je,D,pe,Wr));for(let qn of en){let Eo=new lm;Eo.text=qn,Eo.sections=ha.sections;for(let ys=0;ys0&&Xp>yf&&(yf=Xp)}else{let zc=Eo[hu.fontStack],Pf=zc&&zc[Ju];if(Pf&&Pf.rect)vm=Pf.rect,$c=Pf.metrics;else{let Xp=qn[hu.fontStack],Zd=Xp&&Xp[Ju];if(!Zd)continue;$c=Zd.metrics}Dp=(ah-hu.scale)*fu}Wp?(en.verticalizable=!0,dh.push({glyph:Ju,imageName:_d,x:Ls,y:Ku+Dp,vertical:Wp,scale:hu.scale,fontStack:hu.fontStack,sectionIndex:fc,metrics:$c,rect:vm}),Ls+=fd*hu.scale+wn):(dh.push({glyph:Ju,imageName:_d,x:Ls,y:Ku+Dp,vertical:Wp,scale:hu.scale,fontStack:hu.fontStack,sectionIndex:fc,metrics:$c,rect:vm}),Ls+=$c.advance*hu.scale+wn)}dh.length!==0&&(Uu=Math.max(Ls-wn,Uu),uv(dh,0,dh.length-1,Hp,yf)),Ls=0;let Rp=zn*ah+yf;Ah.lineOffset=Math.max(yf,Fh),Ku+=Rp,th=Math.max(Rp,th),++Th}var rh;let Jh=Ku-eh,{horizontalAlign:$h,verticalAlign:Qh}=Mg(ts);(function(ff,ah,Fh,Ah,dh,yf,Rp,dp,hu){let fc=(ah-Fh)*dh,Ju=0;Ju=yf!==Rp?-dp*Ah-eh:(-Ah*hu+.5)*Rp;for(let Dp of ff)for(let $c of Dp.positionedGlyphs)$c.x+=fc,$c.y+=Ju})(en.positionedLines,Hp,$h,Qh,Uu,th,zn,Jh,mo.length),en.top+=-Qh*Jh,en.bottom=en.top+Jh,en.left+=-$h*Uu,en.right=en.left+Uu}(qi,D,J,pe,ja,We,ht,Et,Mr,Ut,zr,ia),!function(en){for(let qn of en)if(qn.positionedGlyphs.length!==0)return!1;return!0}(gi)&&qi}let Ag={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},ZT={10:!0,32:!0,38:!0,41:!0,43:!0,45:!0,47:!0,173:!0,183:!0,8203:!0,8208:!0,8211:!0,8231:!0},YT={40:!0};function Rx(W,D,J,pe,ke,je){if(D.imageName){let We=pe[D.imageName];return We?We.displaySize[0]*D.scale*fu/je+ke:0}{let We=J[D.fontStack],ht=We&&We[W];return ht?ht.metrics.advance*D.scale+ke:0}}function Dx(W,D,J,pe){let ke=Math.pow(W-D,2);return pe?W=0,Ut=0;for(let Mr=0;MrUt){let or=Math.ceil(je/Ut);ke*=or/We,We=or}return{x1:pe,y1:ke,x2:pe+je,y2:ke+We}}function Ox(W,D,J,pe,ke,je){let We=W.image,ht;if(We.content){let ja=We.content,Ka=We.pixelRatio||1;ht=[ja[0]/Ka,ja[1]/Ka,We.displaySize[0]-ja[2]/Ka,We.displaySize[1]-ja[3]/Ka]}let Et=D.left*je,Ut=D.right*je,or,Mr,zr,Wr;J==="width"||J==="both"?(Wr=ke[0]+Et-pe[3],Mr=ke[0]+Ut+pe[1]):(Wr=ke[0]+(Et+Ut-We.displaySize[0])/2,Mr=Wr+We.displaySize[0]);let ia=D.top*je,ha=D.bottom*je;return J==="height"||J==="both"?(or=ke[1]+ia-pe[0],zr=ke[1]+ha+pe[2]):(or=ke[1]+(ia+ha-We.displaySize[1])/2,zr=or+We.displaySize[1]),{image:We,top:or,right:Mr,bottom:zr,left:Wr,collisionPadding:ht}}let k0=255,yd=128,cv=k0*yd;function Bx(W,D){let{expression:J}=D;if(J.kind==="constant")return{kind:"constant",layoutSize:J.evaluate(new Rs(W+1))};if(J.kind==="source")return{kind:"source"};{let{zoomStops:pe,interpolationType:ke}=J,je=0;for(;jeWe.id),this.index=D.index,this.pixelRatio=D.pixelRatio,this.sourceLayerIndex=D.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=di([]),this.placementViewportMatrix=di([]);let J=this.layers[0]._unevaluatedLayout._values;this.textSizeData=Bx(this.zoom,J["text-size"]),this.iconSizeData=Bx(this.zoom,J["icon-size"]);let pe=this.layers[0].layout,ke=pe.get("symbol-sort-key"),je=pe.get("symbol-z-order");this.canOverlap=D1(pe,"text-overlap","text-allow-overlap")!=="never"||D1(pe,"icon-overlap","icon-allow-overlap")!=="never"||pe.get("text-ignore-placement")||pe.get("icon-ignore-placement"),this.sortFeaturesByKey=je!=="viewport-y"&&!ke.isConstant(),this.sortFeaturesByY=(je==="viewport-y"||je==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,pe.get("symbol-placement")==="point"&&(this.writingModes=pe.get("text-writing-mode").map(We=>e.ah[We])),this.stateDependentLayerIds=this.layers.filter(We=>We.isStateDependent()).map(We=>We.id),this.sourceID=D.sourceID}createArrays(){this.text=new O1(new al(this.layers,this.zoom,D=>/^text/.test(D))),this.icon=new O1(new al(this.layers,this.zoom,D=>/^icon/.test(D))),this.glyphOffsetArray=new is,this.lineVertexArray=new Ao,this.symbolInstances=new wo,this.textAnchorOffsets=new ps}calculateGlyphDependencies(D,J,pe,ke,je){for(let We=0;We0)&&(We.value.kind!=="constant"||We.value.value.length>0),or=Et.value.kind!=="constant"||!!Et.value.value||Object.keys(Et.parameters).length>0,Mr=je.get("symbol-sort-key");if(this.features=[],!Ut&&!or)return;let zr=J.iconDependencies,Wr=J.glyphDependencies,ia=J.availableImages,ha=new Rs(this.zoom);for(let{feature:ja,id:Ka,index:Wi,sourceLayerIndex:gi}of D){let qi=ke._featureFilter.needGeometry,en=Hl(ja,qi);if(!ke._featureFilter.filter(ha,en,pe))continue;let qn,Eo;if(qi||(en.geometry=Al(ja)),Ut){let mo=ke.getValueAndResolveTokens("text-field",en,pe,ia),zn=ra.factory(mo),ts=this.hasRTLText=this.hasRTLText||F1(zn);(!ts||Js.getRTLTextPluginStatus()==="unavailable"||ts&&Js.isParsed())&&(qn=ov(zn,ke,en))}if(or){let mo=ke.getValueAndResolveTokens("icon-image",en,pe,ia);Eo=mo instanceof Za?mo:Za.fromString(mo)}if(!qn&&!Eo)continue;let ys=this.sortFeaturesByKey?Mr.evaluate(en,{},pe):void 0;if(this.features.push({id:Ka,text:qn,icon:Eo,index:Wi,sourceLayerIndex:gi,geometry:en.geometry,properties:ja.properties,type:JT[ja.type],sortKey:ys}),Eo&&(zr[Eo.name]=!0),qn){let mo=We.evaluate(en,{},pe).join(","),zn=je.get("text-rotation-alignment")!=="viewport"&&je.get("symbol-placement")!=="point";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(e.ah.vertical)>=0;for(let ts of qn.sections)if(ts.image)zr[ts.image.name]=!0;else{let Uo=yo(qn.toString()),zo=ts.fontStack||mo,wn=Wr[zo]=Wr[zo]||{};this.calculateGlyphDependencies(ts.text,wn,zn,this.allowVerticalPlacement,Uo)}}}je.get("symbol-placement")==="line"&&(this.features=function(ja){let Ka={},Wi={},gi=[],qi=0;function en(mo){gi.push(ja[mo]),qi++}function qn(mo,zn,ts){let Uo=Wi[mo];return delete Wi[mo],Wi[zn]=Uo,gi[Uo].geometry[0].pop(),gi[Uo].geometry[0]=gi[Uo].geometry[0].concat(ts[0]),Uo}function Eo(mo,zn,ts){let Uo=Ka[zn];return delete Ka[zn],Ka[mo]=Uo,gi[Uo].geometry[0].shift(),gi[Uo].geometry[0]=ts[0].concat(gi[Uo].geometry[0]),Uo}function ys(mo,zn,ts){let Uo=ts?zn[0][zn[0].length-1]:zn[0][0];return`${mo}:${Uo.x}:${Uo.y}`}for(let mo=0;momo.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort((ja,Ka)=>ja.sortKey-Ka.sortKey)}update(D,J,pe){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(D,J,this.layers,pe),this.icon.programConfigurations.updatePaintArrays(D,J,this.layers,pe))}isEmpty(){return this.symbolInstances.length===0&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(D){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(D),this.iconCollisionBox.upload(D)),this.text.upload(D,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(D,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0}destroyDebugData(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()}destroy(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()}addToLineVertexArray(D,J){let pe=this.lineVertexArray.length;if(D.segment!==void 0){let ke=D.dist(J[D.segment+1]),je=D.dist(J[D.segment]),We={};for(let ht=D.segment+1;ht=0;ht--)We[ht]={x:J[ht].x,y:J[ht].y,tileUnitDistanceFromAnchor:je},ht>0&&(je+=J[ht-1].dist(J[ht]));for(let ht=0;ht0}hasIconData(){return this.icon.segments.get().length>0}hasDebugData(){return this.textCollisionBox&&this.iconCollisionBox}hasTextCollisionBoxData(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0}hasIconCollisionBoxData(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0}addIndicesForPlacedSymbol(D,J){let pe=D.placedSymbolArray.get(J),ke=pe.vertexStartIndex+4*pe.numGlyphs;for(let je=pe.vertexStartIndex;jeke[ht]-ke[Et]||je[Et]-je[ht]),We}addToSortKeyRanges(D,J){let pe=this.sortKeyRanges[this.sortKeyRanges.length-1];pe&&pe.sortKey===J?pe.symbolInstanceEnd=D+1:this.sortKeyRanges.push({sortKey:J,symbolInstanceStart:D,symbolInstanceEnd:D+1})}sortFeatures(D){if(this.sortFeaturesByY&&this.sortedAngle!==D&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(D),this.sortedAngle=D,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(let J of this.symbolInstanceIndexes){let pe=this.symbolInstances.get(J);this.featureSortOrder.push(pe.featureIndex),[pe.rightJustifiedTextSymbolIndex,pe.centerJustifiedTextSymbolIndex,pe.leftJustifiedTextSymbolIndex].forEach((ke,je,We)=>{ke>=0&&We.indexOf(ke)===je&&this.addIndicesForPlacedSymbol(this.text,ke)}),pe.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,pe.verticalPlacedTextSymbolIndex),pe.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,pe.placedIconSymbolIndex),pe.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,pe.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}let cf,C0;mi("SymbolBucket",cm,{omit:["layers","collisionBoxArray","features","compareText"]}),cm.MAX_GLYPHS=65535,cm.addDynamicAttributes=z1;var kg={get paint(){return C0=C0||new Ue({"icon-opacity":new Ro(re.paint_symbol["icon-opacity"]),"icon-color":new Ro(re.paint_symbol["icon-color"]),"icon-halo-color":new Ro(re.paint_symbol["icon-halo-color"]),"icon-halo-width":new Ro(re.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Ro(re.paint_symbol["icon-halo-blur"]),"icon-translate":new ho(re.paint_symbol["icon-translate"]),"icon-translate-anchor":new ho(re.paint_symbol["icon-translate-anchor"]),"text-opacity":new Ro(re.paint_symbol["text-opacity"]),"text-color":new Ro(re.paint_symbol["text-color"],{runtimeType:qt,getOverride:W=>W.textColor,hasOverride:W=>!!W.textColor}),"text-halo-color":new Ro(re.paint_symbol["text-halo-color"]),"text-halo-width":new Ro(re.paint_symbol["text-halo-width"]),"text-halo-blur":new Ro(re.paint_symbol["text-halo-blur"]),"text-translate":new ho(re.paint_symbol["text-translate"]),"text-translate-anchor":new ho(re.paint_symbol["text-translate-anchor"])})},get layout(){return cf=cf||new Ue({"symbol-placement":new ho(re.layout_symbol["symbol-placement"]),"symbol-spacing":new ho(re.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new ho(re.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Ro(re.layout_symbol["symbol-sort-key"]),"symbol-z-order":new ho(re.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new ho(re.layout_symbol["icon-allow-overlap"]),"icon-overlap":new ho(re.layout_symbol["icon-overlap"]),"icon-ignore-placement":new ho(re.layout_symbol["icon-ignore-placement"]),"icon-optional":new ho(re.layout_symbol["icon-optional"]),"icon-rotation-alignment":new ho(re.layout_symbol["icon-rotation-alignment"]),"icon-size":new Ro(re.layout_symbol["icon-size"]),"icon-text-fit":new ho(re.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new ho(re.layout_symbol["icon-text-fit-padding"]),"icon-image":new Ro(re.layout_symbol["icon-image"]),"icon-rotate":new Ro(re.layout_symbol["icon-rotate"]),"icon-padding":new Ro(re.layout_symbol["icon-padding"]),"icon-keep-upright":new ho(re.layout_symbol["icon-keep-upright"]),"icon-offset":new Ro(re.layout_symbol["icon-offset"]),"icon-anchor":new Ro(re.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new ho(re.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new ho(re.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new ho(re.layout_symbol["text-rotation-alignment"]),"text-field":new Ro(re.layout_symbol["text-field"]),"text-font":new Ro(re.layout_symbol["text-font"]),"text-size":new Ro(re.layout_symbol["text-size"]),"text-max-width":new Ro(re.layout_symbol["text-max-width"]),"text-line-height":new ho(re.layout_symbol["text-line-height"]),"text-letter-spacing":new Ro(re.layout_symbol["text-letter-spacing"]),"text-justify":new Ro(re.layout_symbol["text-justify"]),"text-radial-offset":new Ro(re.layout_symbol["text-radial-offset"]),"text-variable-anchor":new ho(re.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new Ro(re.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new Ro(re.layout_symbol["text-anchor"]),"text-max-angle":new ho(re.layout_symbol["text-max-angle"]),"text-writing-mode":new ho(re.layout_symbol["text-writing-mode"]),"text-rotate":new Ro(re.layout_symbol["text-rotate"]),"text-padding":new ho(re.layout_symbol["text-padding"]),"text-keep-upright":new ho(re.layout_symbol["text-keep-upright"]),"text-transform":new Ro(re.layout_symbol["text-transform"]),"text-offset":new Ro(re.layout_symbol["text-offset"]),"text-allow-overlap":new ho(re.layout_symbol["text-allow-overlap"]),"text-overlap":new ho(re.layout_symbol["text-overlap"]),"text-ignore-placement":new ho(re.layout_symbol["text-ignore-placement"]),"text-optional":new ho(re.layout_symbol["text-optional"])})}};class L0{constructor(D){if(D.property.overrides===void 0)throw new Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=D.property.overrides?D.property.overrides.runtimeType:ot,this.defaultValue=D}evaluate(D){if(D.formattedSection){let J=this.defaultValue.property.overrides;if(J&&J.hasOverride(D.formattedSection))return J.getOverride(D.formattedSection)}return D.feature&&D.featureState?this.defaultValue.evaluate(D.feature,D.featureState):this.defaultValue.property.specification.default}eachChild(D){this.defaultValue.isConstant()||D(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}mi("FormatSectionOverride",L0,{omit:["defaultValue"]});class Dv extends ie{constructor(D){super(D,kg)}recalculate(D,J){if(super.recalculate(D,J),this.layout.get("icon-rotation-alignment")==="auto"&&(this.layout._values["icon-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout._values["text-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-pitch-alignment")==="auto"&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")==="map"?"map":"viewport"),this.layout.get("icon-pitch-alignment")==="auto"&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),this.layout.get("symbol-placement")==="point"){let pe=this.layout.get("text-writing-mode");if(pe){let ke=[];for(let je of pe)ke.indexOf(je)<0&&ke.push(je);this.layout._values["text-writing-mode"]=ke}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(D,J,pe,ke){let je=this.layout.get(D).evaluate(J,{},pe,ke),We=this._unevaluatedLayout._values[D];return We.isDataDriven()||Mc(We.value)||!je?je:function(ht,Et){return Et.replace(/{([^{}]+)}/g,(Ut,or)=>ht&&or in ht?String(ht[or]):"")}(J.properties,je)}createBucket(D){return new cm(D)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(let D of kg.paint.overridableProperties){if(!Dv.hasPaintOverride(this.layout,D))continue;let J=this.paint.get(D),pe=new L0(J),ke=new Lu(pe,J.property.specification),je=null;je=J.value.kind==="constant"||J.value.kind==="source"?new vc("source",ke):new yu("composite",ke,J.value.zoomStops),this.paint._values[D]=new Au(J.property,je,J.parameters)}}_handleOverridablePaintPropertyUpdate(D,J,pe){return!(!this.layout||J.isDataDriven()||pe.isDataDriven())&&Dv.hasPaintOverride(this.layout,D)}static hasPaintOverride(D,J){let pe=D.get("text-field"),ke=kg.paint.properties[J],je=!1,We=ht=>{for(let Et of ht)if(ke.overrides&&ke.overrides.hasOverride(Et))return void(je=!0)};if(pe.value.kind==="constant"&&pe.value.value instanceof ra)We(pe.value.value.sections);else if(pe.value.kind==="source"){let ht=Ut=>{je||(Ut instanceof on&&Ra(Ut.value)===qr?We(Ut.value.sections):Ut instanceof ls?We(Ut.sections):Ut.eachChild(ht))},Et=pe.value;Et._styleExpression&&ht(Et._styleExpression.expression)}return je}}let Nx;var P0={get paint(){return Nx=Nx||new Ue({"background-color":new ho(re.paint_background["background-color"]),"background-pattern":new lc(re.paint_background["background-pattern"]),"background-opacity":new ho(re.paint_background["background-opacity"])})}};class QT extends ie{constructor(D){super(D,P0)}}let B1;var Ux={get paint(){return B1=B1||new Ue({"raster-opacity":new ho(re.paint_raster["raster-opacity"]),"raster-hue-rotate":new ho(re.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new ho(re.paint_raster["raster-brightness-min"]),"raster-brightness-max":new ho(re.paint_raster["raster-brightness-max"]),"raster-saturation":new ho(re.paint_raster["raster-saturation"]),"raster-contrast":new ho(re.paint_raster["raster-contrast"]),"raster-resampling":new ho(re.paint_raster["raster-resampling"]),"raster-fade-duration":new ho(re.paint_raster["raster-fade-duration"])})}};class I0 extends ie{constructor(D){super(D,Ux)}}class N1 extends ie{constructor(D){super(D,{}),this.onAdd=J=>{this.implementation.onAdd&&this.implementation.onAdd(J,J.painter.context.gl)},this.onRemove=J=>{this.implementation.onRemove&&this.implementation.onRemove(J,J.painter.context.gl)},this.implementation=D}is3D(){return this.implementation.renderingMode==="3d"}hasOffscreenPass(){return this.implementation.prerender!==void 0}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){throw new Error("Custom layers cannot be serialized")}}class U1{constructor(D){this._methodToThrottle=D,this._triggered=!1,typeof MessageChannel<"u"&&(this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._methodToThrottle()})}trigger(){this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout(()=>{this._triggered=!1,this._methodToThrottle()},0))}remove(){delete this._channel,this._methodToThrottle=()=>{}}}let j1=63710088e-1;class Hd{constructor(D,J){if(isNaN(D)||isNaN(J))throw new Error(`Invalid LngLat object: (${D}, ${J})`);if(this.lng=+D,this.lat=+J,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new Hd(A(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(D){let J=Math.PI/180,pe=this.lat*J,ke=D.lat*J,je=Math.sin(pe)*Math.sin(ke)+Math.cos(pe)*Math.cos(ke)*Math.cos((D.lng-this.lng)*J);return j1*Math.acos(Math.min(je,1))}static convert(D){if(D instanceof Hd)return D;if(Array.isArray(D)&&(D.length===2||D.length===3))return new Hd(Number(D[0]),Number(D[1]));if(!Array.isArray(D)&&typeof D=="object"&&D!==null)return new Hd(Number("lng"in D?D.lng:D.lon),Number(D.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")}}let fm=2*Math.PI*j1;function jx(W){return fm*Math.cos(W*Math.PI/180)}function Cg(W){return(180+W)/360}function qx(W){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+W*Math.PI/360)))/360}function Lg(W,D){return W/jx(D)}function R0(W){return 360/Math.PI*Math.atan(Math.exp((180-360*W)*Math.PI/180))-90}class D0{constructor(D,J,pe=0){this.x=+D,this.y=+J,this.z=+pe}static fromLngLat(D,J=0){let pe=Hd.convert(D);return new D0(Cg(pe.lng),qx(pe.lat),Lg(J,pe.lat))}toLngLat(){return new Hd(360*this.x-180,R0(this.y))}toAltitude(){return this.z*jx(R0(this.y))}meterInMercatorCoordinateUnits(){return 1/fm*(D=R0(this.y),1/Math.cos(D*Math.PI/180));var D}}function rd(W,D,J){var pe=2*Math.PI*6378137/256/Math.pow(2,J);return[W*pe-2*Math.PI*6378137/2,D*pe-2*Math.PI*6378137/2]}class q1{constructor(D,J,pe){if(!function(ke,je,We){return!(ke<0||ke>25||We<0||We>=Math.pow(2,ke)||je<0||je>=Math.pow(2,ke))}(D,J,pe))throw new Error(`x=${J}, y=${pe}, z=${D} outside of bounds. 0<=x<${Math.pow(2,D)}, 0<=y<${Math.pow(2,D)} 0<=z<=25 `);this.z=D,this.x=J,this.y=pe,this.key=z0(0,D,D,J,pe)}equals(D){return this.z===D.z&&this.x===D.x&&this.y===D.y}url(D,J,pe){let ke=(We=this.y,ht=this.z,Et=rd(256*(je=this.x),256*(We=Math.pow(2,ht)-We-1),ht),Ut=rd(256*(je+1),256*(We+1),ht),Et[0]+","+Et[1]+","+Ut[0]+","+Ut[1]);var je,We,ht,Et,Ut;let or=function(Mr,zr,Wr){let ia,ha="";for(let ja=Mr;ja>0;ja--)ia=1<1?"@2x":"").replace(/{quadkey}/g,or).replace(/{bbox-epsg-3857}/g,ke)}isChildOf(D){let J=this.z-D.z;return J>0&&D.x===this.x>>J&&D.y===this.y>>J}getTilePoint(D){let J=Math.pow(2,this.z);return new n((D.x*J-this.x)*vo,(D.y*J-this.y)*vo)}toString(){return`${this.z}/${this.x}/${this.y}`}}class Vx{constructor(D,J){this.wrap=D,this.canonical=J,this.key=z0(D,J.z,J.z,J.x,J.y)}}class Gp{constructor(D,J,pe,ke,je){if(D= z; overscaledZ = ${D}; z = ${pe}`);this.overscaledZ=D,this.wrap=J,this.canonical=new q1(pe,+ke,+je),this.key=z0(J,D,pe,ke,je)}clone(){return new Gp(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(D){return this.overscaledZ===D.overscaledZ&&this.wrap===D.wrap&&this.canonical.equals(D.canonical)}scaledTo(D){if(D>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${D}; overscaledZ = ${this.overscaledZ}`);let J=this.canonical.z-D;return D>this.canonical.z?new Gp(D,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Gp(D,this.wrap,D,this.canonical.x>>J,this.canonical.y>>J)}calculateScaledKey(D,J){if(D>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${D}; overscaledZ = ${this.overscaledZ}`);let pe=this.canonical.z-D;return D>this.canonical.z?z0(this.wrap*+J,D,this.canonical.z,this.canonical.x,this.canonical.y):z0(this.wrap*+J,D,D,this.canonical.x>>pe,this.canonical.y>>pe)}isChildOf(D){if(D.wrap!==this.wrap)return!1;let J=this.canonical.z-D.canonical.z;return D.overscaledZ===0||D.overscaledZ>J&&D.canonical.y===this.canonical.y>>J}children(D){if(this.overscaledZ>=D)return[new Gp(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];let J=this.canonical.z+1,pe=2*this.canonical.x,ke=2*this.canonical.y;return[new Gp(J,this.wrap,J,pe,ke),new Gp(J,this.wrap,J,pe+1,ke),new Gp(J,this.wrap,J,pe,ke+1),new Gp(J,this.wrap,J,pe+1,ke+1)]}isLessThan(D){return this.wrapD.wrap)&&(this.overscaledZD.overscaledZ)&&(this.canonical.xD.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+(D+1)}unpack(D,J,pe){return D*this.redFactor+J*this.greenFactor+pe*this.blueFactor-this.baseShift}getPixels(){return new Ii({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(D,J,pe){if(this.dim!==D.dim)throw new Error("dem dimension mismatch");let ke=J*this.dim,je=J*this.dim+this.dim,We=pe*this.dim,ht=pe*this.dim+this.dim;switch(J){case-1:ke=je-1;break;case 1:je=ke+1}switch(pe){case-1:We=ht-1;break;case 1:ht=We+1}let Et=-J*this.dim,Ut=-pe*this.dim;for(let or=We;or=this._numberToString.length)throw new Error(`Out of bounds. Index requested n=${D} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[D]}}class V1{constructor(D,J,pe,ke,je){this.type="Feature",this._vectorTileFeature=D,D._z=J,D._x=pe,D._y=ke,this.properties=D.properties,this.id=je}get geometry(){return this._geometry===void 0&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry}set geometry(D){this._geometry=D}toJSON(){let D={geometry:this.geometry};for(let J in this)J!=="_geometry"&&J!=="_vectorTileFeature"&&(D[J]=this[J]);return D}}class zv{constructor(D,J){this.tileID=D,this.x=D.canonical.x,this.y=D.canonical.y,this.z=D.canonical.z,this.grid=new Di(vo,16,0),this.grid3D=new Di(vo,16,0),this.featureIndexArray=new tl,this.promoteId=J}insert(D,J,pe,ke,je,We){let ht=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(pe,ke,je);let Et=We?this.grid3D:this.grid;for(let Ut=0;Ut=0&&Mr[3]>=0&&Et.insert(ht,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(D,J,pe,ke){this.loadVTLayers();let je=D.params||{},We=vo/D.tileSize/D.scale,ht=Ec(je.filter),Et=D.queryGeometry,Ut=D.queryPadding*We,or=Xx(Et),Mr=this.grid.query(or.minX-Ut,or.minY-Ut,or.maxX+Ut,or.maxY+Ut),zr=Xx(D.cameraQueryGeometry),Wr=this.grid3D.query(zr.minX-Ut,zr.minY-Ut,zr.maxX+Ut,zr.maxY+Ut,(ja,Ka,Wi,gi)=>function(qi,en,qn,Eo,ys){for(let zn of qi)if(en<=zn.x&&qn<=zn.y&&Eo>=zn.x&&ys>=zn.y)return!0;let mo=[new n(en,qn),new n(en,ys),new n(Eo,ys),new n(Eo,qn)];if(qi.length>2){for(let zn of mo)if(bi(qi,zn))return!0}for(let zn=0;zn(gi||(gi=Al(qi)),en.queryIntersectsFeature(Et,qi,qn,gi,this.z,D.transform,We,D.pixelPosMatrix)))}return ia}loadMatchingFeature(D,J,pe,ke,je,We,ht,Et,Ut,or,Mr){let zr=this.bucketLayerIDs[J];if(We&&!function(ja,Ka){for(let Wi=0;Wi=0)return!0;return!1}(We,zr))return;let Wr=this.sourceLayerCoder.decode(pe),ia=this.vtLayers[Wr].feature(ke);if(je.needGeometry){let ja=Hl(ia,!0);if(!je.filter(new Rs(this.tileID.overscaledZ),ja,this.tileID.canonical))return}else if(!je.filter(new Rs(this.tileID.overscaledZ),ia))return;let ha=this.getId(ia,Wr);for(let ja=0;ja{let ht=D instanceof yc?D.get(We):null;return ht&&ht.evaluate?ht.evaluate(J,pe,ke):ht})}function Xx(W){let D=1/0,J=1/0,pe=-1/0,ke=-1/0;for(let je of W)D=Math.min(D,je.x),J=Math.min(J,je.y),pe=Math.max(pe,je.x),ke=Math.max(ke,je.y);return{minX:D,minY:J,maxX:pe,maxY:ke}}function eA(W,D){return D-W}function Zx(W,D,J,pe,ke){let je=[];for(let We=0;We=pe&&Mr.x>=pe||(or.x>=pe?or=new n(pe,or.y+(pe-or.x)/(Mr.x-or.x)*(Mr.y-or.y))._round():Mr.x>=pe&&(Mr=new n(pe,or.y+(pe-or.x)/(Mr.x-or.x)*(Mr.y-or.y))._round()),or.y>=ke&&Mr.y>=ke||(or.y>=ke?or=new n(or.x+(ke-or.y)/(Mr.y-or.y)*(Mr.x-or.x),ke)._round():Mr.y>=ke&&(Mr=new n(or.x+(ke-or.y)/(Mr.y-or.y)*(Mr.x-or.x),ke)._round()),Et&&or.equals(Et[Et.length-1])||(Et=[or],je.push(Et)),Et.push(Mr)))))}}return je}mi("FeatureIndex",zv,{omit:["rawTileData","sourceLayerCoder"]});class Wd extends n{constructor(D,J,pe,ke){super(D,J),this.angle=pe,ke!==void 0&&(this.segment=ke)}clone(){return new Wd(this.x,this.y,this.angle,this.segment)}}function G1(W,D,J,pe,ke){if(D.segment===void 0||J===0)return!0;let je=D,We=D.segment+1,ht=0;for(;ht>-J/2;){if(We--,We<0)return!1;ht-=W[We].dist(je),je=W[We]}ht+=W[We].dist(W[We+1]),We++;let Et=[],Ut=0;for(;htpe;)Ut-=Et.shift().angleDelta;if(Ut>ke)return!1;We++,ht+=or.dist(Mr)}return!0}function Yx(W){let D=0;for(let J=0;JUt){let ia=(Ut-Et)/Wr,ha=On.number(Mr.x,zr.x,ia),ja=On.number(Mr.y,zr.y,ia),Ka=new Wd(ha,ja,zr.angleTo(Mr),or);return Ka._round(),!We||G1(W,Ka,ht,We,D)?Ka:void 0}Et+=Wr}}function rA(W,D,J,pe,ke,je,We,ht,Et){let Ut=Kx(pe,je,We),or=Jx(pe,ke),Mr=or*We,zr=W[0].x===0||W[0].x===Et||W[0].y===0||W[0].y===Et;return D-Mr=0&&qi=0&&en=0&&zr+Ut<=or){let qn=new Wd(qi,en,Wi,ia);qn._round(),pe&&!G1(W,qn,je,pe,ke)||Wr.push(qn)}}Mr+=Ka}return ht||Wr.length||We||(Wr=$x(W,Mr/2,J,pe,ke,je,We,!0,Et)),Wr}mi("Anchor",Wd);let hm=zh;function Qx(W,D,J,pe){let ke=[],je=W.image,We=je.pixelRatio,ht=je.paddedRect.w-2*hm,Et=je.paddedRect.h-2*hm,Ut={x1:W.left,y1:W.top,x2:W.right,y2:W.bottom},or=je.stretchX||[[0,ht]],Mr=je.stretchY||[[0,Et]],zr=(wn,os)=>wn+os[1]-os[0],Wr=or.reduce(zr,0),ia=Mr.reduce(zr,0),ha=ht-Wr,ja=Et-ia,Ka=0,Wi=Wr,gi=0,qi=ia,en=0,qn=ha,Eo=0,ys=ja;if(je.content&&pe){let wn=je.content,os=wn[2]-wn[0],Fo=wn[3]-wn[1];(je.textFitWidth||je.textFitHeight)&&(Ut=Fx(W)),Ka=Xd(or,0,wn[0]),gi=Xd(Mr,0,wn[1]),Wi=Xd(or,wn[0],wn[2]),qi=Xd(Mr,wn[1],wn[3]),en=wn[0]-Ka,Eo=wn[1]-gi,qn=os-Wi,ys=Fo-qi}let mo=Ut.x1,zn=Ut.y1,ts=Ut.x2-mo,Uo=Ut.y2-zn,zo=(wn,os,Fo,Ls)=>{let Ku=Pg(wn.stretch-Ka,Wi,ts,mo),Uu=pm(wn.fixed-en,qn,wn.stretch,Wr),th=Pg(os.stretch-gi,qi,Uo,zn),Hp=pm(os.fixed-Eo,ys,os.stretch,ia),Th=Pg(Fo.stretch-Ka,Wi,ts,mo),rh=pm(Fo.fixed-en,qn,Fo.stretch,Wr),Jh=Pg(Ls.stretch-gi,qi,Uo,zn),$h=pm(Ls.fixed-Eo,ys,Ls.stretch,ia),Qh=new n(Ku,th),ff=new n(Th,th),ah=new n(Th,Jh),Fh=new n(Ku,Jh),Ah=new n(Uu/We,Hp/We),dh=new n(rh/We,$h/We),yf=D*Math.PI/180;if(yf){let hu=Math.sin(yf),fc=Math.cos(yf),Ju=[fc,-hu,hu,fc];Qh._matMult(Ju),ff._matMult(Ju),Fh._matMult(Ju),ah._matMult(Ju)}let Rp=wn.stretch+wn.fixed,dp=os.stretch+os.fixed;return{tl:Qh,tr:ff,bl:Fh,br:ah,tex:{x:je.paddedRect.x+hm+Rp,y:je.paddedRect.y+hm+dp,w:Fo.stretch+Fo.fixed-Rp,h:Ls.stretch+Ls.fixed-dp},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:Ah,pixelOffsetBR:dh,minFontScaleX:qn/We/ts,minFontScaleY:ys/We/Uo,isSDF:J}};if(pe&&(je.stretchX||je.stretchY)){let wn=eb(or,ha,Wr),os=eb(Mr,ja,ia);for(let Fo=0;Fo0&&(ha=Math.max(10,ha),this.circleDiameter=ha)}else{let zr=!((Mr=We.image)===null||Mr===void 0)&&Mr.content&&(We.image.textFitWidth||We.image.textFitHeight)?Fx(We):{x1:We.left,y1:We.top,x2:We.right,y2:We.bottom};zr.y1=zr.y1*ht-Et[0],zr.y2=zr.y2*ht+Et[2],zr.x1=zr.x1*ht-Et[3],zr.x2=zr.x2*ht+Et[1];let Wr=We.collisionPadding;if(Wr&&(zr.x1-=Wr[0]*ht,zr.y1-=Wr[1]*ht,zr.x2+=Wr[2]*ht,zr.y2+=Wr[3]*ht),or){let ia=new n(zr.x1,zr.y1),ha=new n(zr.x2,zr.y1),ja=new n(zr.x1,zr.y2),Ka=new n(zr.x2,zr.y2),Wi=or*Math.PI/180;ia._rotate(Wi),ha._rotate(Wi),ja._rotate(Wi),Ka._rotate(Wi),zr.x1=Math.min(ia.x,ha.x,ja.x,Ka.x),zr.x2=Math.max(ia.x,ha.x,ja.x,Ka.x),zr.y1=Math.min(ia.y,ha.y,ja.y,Ka.y),zr.y2=Math.max(ia.y,ha.y,ja.y,Ka.y)}D.emplaceBack(J.x,J.y,zr.x1,zr.y1,zr.x2,zr.y2,pe,ke,je)}this.boxEndIndex=D.length}}class cd{constructor(D=[],J=(pe,ke)=>peke?1:0){if(this.data=D,this.length=this.data.length,this.compare=J,this.length>0)for(let pe=(this.length>>1)-1;pe>=0;pe--)this._down(pe)}push(D){this.data.push(D),this._up(this.length++)}pop(){if(this.length===0)return;let D=this.data[0],J=this.data.pop();return--this.length>0&&(this.data[0]=J,this._down(0)),D}peek(){return this.data[0]}_up(D){let{data:J,compare:pe}=this,ke=J[D];for(;D>0;){let je=D-1>>1,We=J[je];if(pe(ke,We)>=0)break;J[D]=We,D=je}J[D]=ke}_down(D){let{data:J,compare:pe}=this,ke=this.length>>1,je=J[D];for(;D=0)break;J[D]=J[We],D=We}J[D]=je}}function aA(W,D=1,J=!1){let pe=1/0,ke=1/0,je=-1/0,We=-1/0,ht=W[0];for(let Wr=0;Wrje)&&(je=ia.x),(!Wr||ia.y>We)&&(We=ia.y)}let Et=Math.min(je-pe,We-ke),Ut=Et/2,or=new cd([],iA);if(Et===0)return new n(pe,ke);for(let Wr=pe;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<=D||(Ut=Wr.h/2,or.push(new dm(Wr.p.x-Ut,Wr.p.y-Ut,Ut,W)),or.push(new dm(Wr.p.x+Ut,Wr.p.y-Ut,Ut,W)),or.push(new dm(Wr.p.x-Ut,Wr.p.y+Ut,Ut,W)),or.push(new dm(Wr.p.x+Ut,Wr.p.y+Ut,Ut,W)),zr+=4)}return J&&(console.log(`num probes: ${zr}`),console.log(`best distance: ${Mr.d}`)),Mr.p}function iA(W,D){return D.max-W.max}function dm(W,D,J,pe){this.p=new n(W,D),this.h=J,this.d=function(ke,je){let We=!1,ht=1/0;for(let Et=0;Etke.y!=ia.y>ke.y&&ke.x<(ia.x-Wr.x)*(ke.y-Wr.y)/(ia.y-Wr.y)+Wr.x&&(We=!We),ht=Math.min(ht,_a(ke,Wr,ia))}}return(We?1:-1)*Math.sqrt(ht)}(this.p,pe),this.max=this.d+this.h*Math.SQRT2}var wh;e.aq=void 0,(wh=e.aq||(e.aq={}))[wh.center=1]="center",wh[wh.left=2]="left",wh[wh.right=3]="right",wh[wh.top=4]="top",wh[wh.bottom=5]="bottom",wh[wh["top-left"]=6]="top-left",wh[wh["top-right"]=7]="top-right",wh[wh["bottom-left"]=8]="bottom-left",wh[wh["bottom-right"]=9]="bottom-right";let pv=7,Fv=Number.POSITIVE_INFINITY;function H1(W,D){return D[1]!==Fv?function(J,pe,ke){let je=0,We=0;switch(pe=Math.abs(pe),ke=Math.abs(ke),J){case"top-right":case"top-left":case"top":We=ke-pv;break;case"bottom-right":case"bottom-left":case"bottom":We=-ke+pv}switch(J){case"top-right":case"bottom-right":case"right":je=-pe;break;case"top-left":case"bottom-left":case"left":je=pe}return[je,We]}(W,D[0],D[1]):function(J,pe){let ke=0,je=0;pe<0&&(pe=0);let We=pe/Math.SQRT2;switch(J){case"top-right":case"top-left":je=We-pv;break;case"bottom-right":case"bottom-left":je=-We+pv;break;case"bottom":je=-pe+pv;break;case"top":je=pe-pv}switch(J){case"top-right":case"bottom-right":ke=-We;break;case"top-left":case"bottom-left":ke=We;break;case"left":ke=pe;break;case"right":ke=-pe}return[ke,je]}(W,D[0])}function tb(W,D,J){var pe;let ke=W.layout,je=(pe=ke.get("text-variable-anchor-offset"))===null||pe===void 0?void 0:pe.evaluate(D,{},J);if(je){let ht=je.values,Et=[];for(let Ut=0;Utzr*fu);or.startsWith("top")?Mr[1]-=pv:or.startsWith("bottom")&&(Mr[1]+=pv),Et[Ut+1]=Mr}return new $a(Et)}let We=ke.get("text-variable-anchor");if(We){let ht;ht=W._unevaluatedLayout.getValue("text-radial-offset")!==void 0?[ke.get("text-radial-offset").evaluate(D,{},J)*fu,Fv]:ke.get("text-offset").evaluate(D,{},J).map(Ut=>Ut*fu);let Et=[];for(let Ut of We)Et.push(Ut,H1(Ut,ht));return new $a(Et)}return null}function W1(W){switch(W){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function nA(W,D,J,pe,ke,je,We,ht,Et,Ut,or){let Mr=je.textMaxSize.evaluate(D,{});Mr===void 0&&(Mr=We);let zr=W.layers[0].layout,Wr=zr.get("icon-offset").evaluate(D,{},or),ia=ab(J.horizontal),ha=We/24,ja=W.tilePixelRatio*ha,Ka=W.tilePixelRatio*Mr/24,Wi=W.tilePixelRatio*ht,gi=W.tilePixelRatio*zr.get("symbol-spacing"),qi=zr.get("text-padding")*W.tilePixelRatio,en=function(wn,os,Fo,Ls=1){let Ku=wn.get("icon-padding").evaluate(os,{},Fo),Uu=Ku&&Ku.values;return[Uu[0]*Ls,Uu[1]*Ls,Uu[2]*Ls,Uu[3]*Ls]}(zr,D,or,W.tilePixelRatio),qn=zr.get("text-max-angle")/180*Math.PI,Eo=zr.get("text-rotation-alignment")!=="viewport"&&zr.get("symbol-placement")!=="point",ys=zr.get("icon-rotation-alignment")==="map"&&zr.get("symbol-placement")!=="point",mo=zr.get("symbol-placement"),zn=gi/2,ts=zr.get("icon-text-fit"),Uo;pe&&ts!=="none"&&(W.allowVerticalPlacement&&J.vertical&&(Uo=Ox(pe,J.vertical,ts,zr.get("icon-text-fit-padding"),Wr,ha)),ia&&(pe=Ox(pe,ia,ts,zr.get("icon-text-fit-padding"),Wr,ha)));let zo=(wn,os)=>{os.x<0||os.x>=vo||os.y<0||os.y>=vo||function(Fo,Ls,Ku,Uu,th,Hp,Th,rh,Jh,$h,Qh,ff,ah,Fh,Ah,dh,yf,Rp,dp,hu,fc,Ju,Dp,$c,vm){let _d=Fo.addToLineVertexArray(Ls,Ku),fd,Wp,zc,Pf,Xp=0,Zd=0,vp=0,mm=0,J1=-1,zg=-1,xd={},Ov=ti("");if(Fo.allowVerticalPlacement&&Uu.vertical){let Oh=rh.layout.get("text-rotate").evaluate(fc,{},$c)+90;zc=new hv(Jh,Ls,$h,Qh,ff,Uu.vertical,ah,Fh,Ah,Oh),Th&&(Pf=new hv(Jh,Ls,$h,Qh,ff,Th,yf,Rp,Ah,Oh))}if(th){let Oh=rh.layout.get("icon-rotate").evaluate(fc,{}),Zp=rh.layout.get("icon-text-fit")!=="none",dv=Qx(th,Oh,Dp,Zp),ep=Th?Qx(Th,Oh,Dp,Zp):void 0;Wp=new hv(Jh,Ls,$h,Qh,ff,th,yf,Rp,!1,Oh),Xp=4*dv.length;let Bh=Fo.iconSizeData,id=null;Bh.kind==="source"?(id=[yd*rh.layout.get("icon-size").evaluate(fc,{})],id[0]>cv&&f(`${Fo.layerIds[0]}: Value for "icon-size" is >= ${k0}. Reduce your "icon-size".`)):Bh.kind==="composite"&&(id=[yd*Ju.compositeIconSizes[0].evaluate(fc,{},$c),yd*Ju.compositeIconSizes[1].evaluate(fc,{},$c)],(id[0]>cv||id[1]>cv)&&f(`${Fo.layerIds[0]}: Value for "icon-size" is >= ${k0}. Reduce your "icon-size".`)),Fo.addSymbols(Fo.icon,dv,id,hu,dp,fc,e.ah.none,Ls,_d.lineStartIndex,_d.lineLength,-1,$c),J1=Fo.icon.placedSymbolArray.length-1,ep&&(Zd=4*ep.length,Fo.addSymbols(Fo.icon,ep,id,hu,dp,fc,e.ah.vertical,Ls,_d.lineStartIndex,_d.lineLength,-1,$c),zg=Fo.icon.placedSymbolArray.length-1)}let vh=Object.keys(Uu.horizontal);for(let Oh of vh){let Zp=Uu.horizontal[Oh];if(!fd){Ov=ti(Zp.text);let ep=rh.layout.get("text-rotate").evaluate(fc,{},$c);fd=new hv(Jh,Ls,$h,Qh,ff,Zp,ah,Fh,Ah,ep)}let dv=Zp.positionedLines.length===1;if(vp+=rb(Fo,Ls,Zp,Hp,rh,Ah,fc,dh,_d,Uu.vertical?e.ah.horizontal:e.ah.horizontalOnly,dv?vh:[Oh],xd,J1,Ju,$c),dv)break}Uu.vertical&&(mm+=rb(Fo,Ls,Uu.vertical,Hp,rh,Ah,fc,dh,_d,e.ah.vertical,["vertical"],xd,zg,Ju,$c));let lA=fd?fd.boxStartIndex:Fo.collisionBoxArray.length,Fg=fd?fd.boxEndIndex:Fo.collisionBoxArray.length,bd=zc?zc.boxStartIndex:Fo.collisionBoxArray.length,mp=zc?zc.boxEndIndex:Fo.collisionBoxArray.length,sb=Wp?Wp.boxStartIndex:Fo.collisionBoxArray.length,uA=Wp?Wp.boxEndIndex:Fo.collisionBoxArray.length,lb=Pf?Pf.boxStartIndex:Fo.collisionBoxArray.length,cA=Pf?Pf.boxEndIndex:Fo.collisionBoxArray.length,ad=-1,B0=(Oh,Zp)=>Oh&&Oh.circleDiameter?Math.max(Oh.circleDiameter,Zp):Zp;ad=B0(fd,ad),ad=B0(zc,ad),ad=B0(Wp,ad),ad=B0(Pf,ad);let Og=ad>-1?1:0;Og&&(ad*=vm/fu),Fo.glyphOffsetArray.length>=cm.MAX_GLYPHS&&f("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),fc.sortKey!==void 0&&Fo.addToSortKeyRanges(Fo.symbolInstances.length,fc.sortKey);let $1=tb(rh,fc,$c),[fA,hA]=function(Oh,Zp){let dv=Oh.length,ep=Zp?.values;if(ep?.length>0)for(let Bh=0;Bh=0?xd.right:-1,xd.center>=0?xd.center:-1,xd.left>=0?xd.left:-1,xd.vertical||-1,J1,zg,Ov,lA,Fg,bd,mp,sb,uA,lb,cA,$h,vp,mm,Xp,Zd,Og,0,ah,ad,fA,hA)}(W,os,wn,J,pe,ke,Uo,W.layers[0],W.collisionBoxArray,D.index,D.sourceLayerIndex,W.index,ja,[qi,qi,qi,qi],Eo,Et,Wi,en,ys,Wr,D,je,Ut,or,We)};if(mo==="line")for(let wn of Zx(D.geometry,0,0,vo,vo)){let os=rA(wn,gi,qn,J.vertical||ia,pe,24,Ka,W.overscaling,vo);for(let Fo of os)ia&&oA(W,ia.text,zn,Fo)||zo(wn,Fo)}else if(mo==="line-center"){for(let wn of D.geometry)if(wn.length>1){let os=tA(wn,qn,J.vertical||ia,pe,24,Ka);os&&zo(wn,os)}}else if(D.type==="Polygon")for(let wn of Tc(D.geometry,0)){let os=aA(wn,16);zo(wn[0],new Wd(os.x,os.y,0))}else if(D.type==="LineString")for(let wn of D.geometry)zo(wn,new Wd(wn[0].x,wn[0].y,0));else if(D.type==="Point")for(let wn of D.geometry)for(let os of wn)zo([os],new Wd(os.x,os.y,0))}function rb(W,D,J,pe,ke,je,We,ht,Et,Ut,or,Mr,zr,Wr,ia){let ha=function(Wi,gi,qi,en,qn,Eo,ys,mo){let zn=en.layout.get("text-rotate").evaluate(Eo,{})*Math.PI/180,ts=[];for(let Uo of gi.positionedLines)for(let zo of Uo.positionedGlyphs){if(!zo.rect)continue;let wn=zo.rect||{},os=Ix+1,Fo=!0,Ls=1,Ku=0,Uu=(qn||mo)&&zo.vertical,th=zo.metrics.advance*zo.scale/2;if(mo&&gi.verticalizable&&(Ku=Uo.lineOffset/2-(zo.imageName?-(fu-zo.metrics.width*zo.scale)/2:(zo.scale-1)*fu)),zo.imageName){let hu=ys[zo.imageName];Fo=hu.sdf,Ls=hu.pixelRatio,os=zh/Ls}let Hp=qn?[zo.x+th,zo.y]:[0,0],Th=qn?[0,0]:[zo.x+th+qi[0],zo.y+qi[1]-Ku],rh=[0,0];Uu&&(rh=Th,Th=[0,0]);let Jh=zo.metrics.isDoubleResolution?2:1,$h=(zo.metrics.left-os)*zo.scale-th+Th[0],Qh=(-zo.metrics.top-os)*zo.scale+Th[1],ff=$h+wn.w/Jh*zo.scale/Ls,ah=Qh+wn.h/Jh*zo.scale/Ls,Fh=new n($h,Qh),Ah=new n(ff,Qh),dh=new n($h,ah),yf=new n(ff,ah);if(Uu){let hu=new n(-th,th-eh),fc=-Math.PI/2,Ju=fu/2-th,Dp=new n(5-eh-Ju,-(zo.imageName?Ju:0)),$c=new n(...rh);Fh._rotateAround(fc,hu)._add(Dp)._add($c),Ah._rotateAround(fc,hu)._add(Dp)._add($c),dh._rotateAround(fc,hu)._add(Dp)._add($c),yf._rotateAround(fc,hu)._add(Dp)._add($c)}if(zn){let hu=Math.sin(zn),fc=Math.cos(zn),Ju=[fc,-hu,hu,fc];Fh._matMult(Ju),Ah._matMult(Ju),dh._matMult(Ju),yf._matMult(Ju)}let Rp=new n(0,0),dp=new n(0,0);ts.push({tl:Fh,tr:Ah,bl:dh,br:yf,tex:wn,writingMode:gi.writingMode,glyphOffset:Hp,sectionIndex:zo.sectionIndex,isSDF:Fo,pixelOffsetTL:Rp,pixelOffsetBR:dp,minFontScaleX:0,minFontScaleY:0})}return ts}(0,J,ht,ke,je,We,pe,W.allowVerticalPlacement),ja=W.textSizeData,Ka=null;ja.kind==="source"?(Ka=[yd*ke.layout.get("text-size").evaluate(We,{})],Ka[0]>cv&&f(`${W.layerIds[0]}: Value for "text-size" is >= ${k0}. Reduce your "text-size".`)):ja.kind==="composite"&&(Ka=[yd*Wr.compositeTextSizes[0].evaluate(We,{},ia),yd*Wr.compositeTextSizes[1].evaluate(We,{},ia)],(Ka[0]>cv||Ka[1]>cv)&&f(`${W.layerIds[0]}: Value for "text-size" is >= ${k0}. Reduce your "text-size".`)),W.addSymbols(W.text,ha,Ka,ht,je,We,Ut,D,Et.lineStartIndex,Et.lineLength,zr,ia);for(let Wi of or)Mr[Wi]=W.text.placedSymbolArray.length-1;return 4*ha.length}function ab(W){for(let D in W)return W[D];return null}function oA(W,D,J,pe){let ke=W.compareText;if(D in ke){let je=ke[D];for(let We=je.length-1;We>=0;We--)if(pe.dist(je[We])>4;if(ke!==1)throw new Error(`Got v${ke} data when expected v1.`);let je=ib[15&pe];if(!je)throw new Error("Unrecognized array type.");let[We]=new Uint16Array(D,2,1),[ht]=new Uint32Array(D,4,1);return new X1(ht,We,je,D)}constructor(D,J=64,pe=Float64Array,ke){if(isNaN(D)||D<0)throw new Error(`Unpexpected numItems value: ${D}.`);this.numItems=+D,this.nodeSize=Math.min(Math.max(+J,2),65535),this.ArrayType=pe,this.IndexArrayType=D<65536?Uint16Array:Uint32Array;let je=ib.indexOf(this.ArrayType),We=2*D*this.ArrayType.BYTES_PER_ELEMENT,ht=D*this.IndexArrayType.BYTES_PER_ELEMENT,Et=(8-ht%8)%8;if(je<0)throw new Error(`Unexpected typed array class: ${pe}.`);ke&&ke instanceof ArrayBuffer?(this.data=ke,this.ids=new this.IndexArrayType(this.data,8,D),this.coords=new this.ArrayType(this.data,8+ht+Et,2*D),this._pos=2*D,this._finished=!0):(this.data=new ArrayBuffer(8+We+ht+Et),this.ids=new this.IndexArrayType(this.data,8,D),this.coords=new this.ArrayType(this.data,8+ht+Et,2*D),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+je]),new Uint16Array(this.data,2,1)[0]=J,new Uint32Array(this.data,4,1)[0]=D)}add(D,J){let pe=this._pos>>1;return this.ids[pe]=pe,this.coords[this._pos++]=D,this.coords[this._pos++]=J,pe}finish(){let D=this._pos>>1;if(D!==this.numItems)throw new Error(`Added ${D} items when expected ${this.numItems}.`);return Ig(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(D,J,pe,ke){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:je,coords:We,nodeSize:ht}=this,Et=[0,je.length-1,0],Ut=[];for(;Et.length;){let or=Et.pop()||0,Mr=Et.pop()||0,zr=Et.pop()||0;if(Mr-zr<=ht){for(let ja=zr;ja<=Mr;ja++){let Ka=We[2*ja],Wi=We[2*ja+1];Ka>=D&&Ka<=pe&&Wi>=J&&Wi<=ke&&Ut.push(je[ja])}continue}let Wr=zr+Mr>>1,ia=We[2*Wr],ha=We[2*Wr+1];ia>=D&&ia<=pe&&ha>=J&&ha<=ke&&Ut.push(je[Wr]),(or===0?D<=ia:J<=ha)&&(Et.push(zr),Et.push(Wr-1),Et.push(1-or)),(or===0?pe>=ia:ke>=ha)&&(Et.push(Wr+1),Et.push(Mr),Et.push(1-or))}return Ut}within(D,J,pe){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:ke,coords:je,nodeSize:We}=this,ht=[0,ke.length-1,0],Et=[],Ut=pe*pe;for(;ht.length;){let or=ht.pop()||0,Mr=ht.pop()||0,zr=ht.pop()||0;if(Mr-zr<=We){for(let ja=zr;ja<=Mr;ja++)ob(je[2*ja],je[2*ja+1],D,J)<=Ut&&Et.push(ke[ja]);continue}let Wr=zr+Mr>>1,ia=je[2*Wr],ha=je[2*Wr+1];ob(ia,ha,D,J)<=Ut&&Et.push(ke[Wr]),(or===0?D-pe<=ia:J-pe<=ha)&&(ht.push(zr),ht.push(Wr-1),ht.push(1-or)),(or===0?D+pe>=ia:J+pe>=ha)&&(ht.push(Wr+1),ht.push(Mr),ht.push(1-or))}return Et}}function Ig(W,D,J,pe,ke,je){if(ke-pe<=J)return;let We=pe+ke>>1;nb(W,D,We,pe,ke,je),Ig(W,D,J,pe,We-1,1-je),Ig(W,D,J,We+1,ke,1-je)}function nb(W,D,J,pe,ke,je){for(;ke>pe;){if(ke-pe>600){let Ut=ke-pe+1,or=J-pe+1,Mr=Math.log(Ut),zr=.5*Math.exp(2*Mr/3),Wr=.5*Math.sqrt(Mr*zr*(Ut-zr)/Ut)*(or-Ut/2<0?-1:1);nb(W,D,J,Math.max(pe,Math.floor(J-or*zr/Ut+Wr)),Math.min(ke,Math.floor(J+(Ut-or)*zr/Ut+Wr)),je)}let We=D[2*J+je],ht=pe,Et=ke;for(F0(W,D,pe,J),D[2*ke+je]>We&&F0(W,D,pe,ke);htWe;)Et--}D[2*pe+je]===We?F0(W,D,pe,Et):(Et++,F0(W,D,Et,ke)),Et<=J&&(pe=Et+1),J<=Et&&(ke=Et-1)}}function F0(W,D,J,pe){Z1(W,J,pe),Z1(D,2*J,2*pe),Z1(D,2*J+1,2*pe+1)}function Z1(W,D,J){let pe=W[D];W[D]=W[J],W[J]=pe}function ob(W,D,J,pe){let ke=W-J,je=D-pe;return ke*ke+je*je}var Rg;e.bg=void 0,(Rg=e.bg||(e.bg={})).create="create",Rg.load="load",Rg.fullLoad="fullLoad";let O0=null,Hf=[],Y1=1e3/60,K1="loadTime",Dg="fullLoadTime",sA={mark(W){performance.mark(W)},frame(W){let D=W;O0!=null&&Hf.push(D-O0),O0=D},clearMetrics(){O0=null,Hf=[],performance.clearMeasures(K1),performance.clearMeasures(Dg);for(let W in e.bg)performance.clearMarks(e.bg[W])},getPerformanceMetrics(){performance.measure(K1,e.bg.create,e.bg.load),performance.measure(Dg,e.bg.create,e.bg.fullLoad);let W=performance.getEntriesByName(K1)[0].duration,D=performance.getEntriesByName(Dg)[0].duration,J=Hf.length,pe=1/(Hf.reduce((je,We)=>je+We,0)/J/1e3),ke=Hf.filter(je=>je>Y1).reduce((je,We)=>je+(We-Y1)/Y1,0);return{loadTime:W,fullLoadTime:D,fps:pe,percentDroppedFrames:ke/(J+ke)*100,totalFrames:J}}};e.$=class extends Tr{},e.A=Qa,e.B=Hi,e.C=function(W){if(z==null){let D=W.navigator?W.navigator.userAgent:null;z=!!W.safari||!(!D||!(/\b(iPad|iPhone|iPod)\b/.test(D)||D.match("Safari")&&!D.match("Chrome")))}return z},e.D=ho,e.E=Q,e.F=class{constructor(W,D){this.target=W,this.mapId=D,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new U1(()=>this.process()),this.subscription=function(J,pe,ke,je){return J.addEventListener(pe,ke,!1),{unsubscribe:()=>{J.removeEventListener(pe,ke,!1)}}}(this.target,"message",J=>this.receive(J)),this.globalScope=L(self)?W:window}registerMessageHandler(W,D){this.messageHandlers[W]=D}sendAsync(W,D){return new Promise((J,pe)=>{let ke=Math.round(1e18*Math.random()).toString(36).substring(0,10);this.resolveRejects[ke]={resolve:J,reject:pe},D&&D.signal.addEventListener("abort",()=>{delete this.resolveRejects[ke];let ht={id:ke,type:"",origin:location.origin,targetMapId:W.targetMapId,sourceMapId:this.mapId};this.target.postMessage(ht)},{once:!0});let je=[],We=Object.assign(Object.assign({},W),{id:ke,sourceMapId:this.mapId,origin:location.origin,data:eo(W.data,je)});this.target.postMessage(We,{transfer:je})})}receive(W){let D=W.data,J=D.id;if(!(D.origin!=="file://"&&location.origin!=="file://"&&D.origin!=="resource://android"&&location.origin!=="resource://android"&&D.origin!==location.origin||D.targetMapId&&this.mapId!==D.targetMapId)){if(D.type===""){delete this.tasks[J];let pe=this.abortControllers[J];return delete this.abortControllers[J],void(pe&&pe.abort())}if(L(self)||D.mustQueue)return this.tasks[J]=D,this.taskQueue.push(J),void this.invoker.trigger();this.processTask(J,D)}}process(){if(this.taskQueue.length===0)return;let W=this.taskQueue.shift(),D=this.tasks[W];delete this.tasks[W],this.taskQueue.length>0&&this.invoker.trigger(),D&&this.processTask(W,D)}processTask(W,D){return t(this,void 0,void 0,function*(){if(D.type===""){let ke=this.resolveRejects[W];return delete this.resolveRejects[W],ke?void(D.error?ke.reject(fo(D.error)):ke.resolve(fo(D.data))):void 0}if(!this.messageHandlers[D.type])return void this.completeTask(W,new Error(`Could not find a registered handler for ${D.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));let J=fo(D.data),pe=new AbortController;this.abortControllers[W]=pe;try{let ke=yield this.messageHandlers[D.type](D.sourceMapId,J,pe);this.completeTask(W,null,ke)}catch(ke){this.completeTask(W,ke)}})}completeTask(W,D,J){let pe=[];delete this.abortControllers[W];let ke={id:W,type:"",sourceMapId:this.mapId,origin:location.origin,error:D?eo(D):null,data:eo(J,pe)};this.target.postMessage(ke,{transfer:pe})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},e.G=le,e.H=function(){var W=new Qa(16);return Qa!=Float32Array&&(W[1]=0,W[2]=0,W[3]=0,W[4]=0,W[6]=0,W[7]=0,W[8]=0,W[9]=0,W[11]=0,W[12]=0,W[13]=0,W[14]=0),W[0]=1,W[5]=1,W[10]=1,W[15]=1,W},e.I=wg,e.J=function(W,D,J){var pe,ke,je,We,ht,Et,Ut,or,Mr,zr,Wr,ia,ha=J[0],ja=J[1],Ka=J[2];return D===W?(W[12]=D[0]*ha+D[4]*ja+D[8]*Ka+D[12],W[13]=D[1]*ha+D[5]*ja+D[9]*Ka+D[13],W[14]=D[2]*ha+D[6]*ja+D[10]*Ka+D[14],W[15]=D[3]*ha+D[7]*ja+D[11]*Ka+D[15]):(ke=D[1],je=D[2],We=D[3],ht=D[4],Et=D[5],Ut=D[6],or=D[7],Mr=D[8],zr=D[9],Wr=D[10],ia=D[11],W[0]=pe=D[0],W[1]=ke,W[2]=je,W[3]=We,W[4]=ht,W[5]=Et,W[6]=Ut,W[7]=or,W[8]=Mr,W[9]=zr,W[10]=Wr,W[11]=ia,W[12]=pe*ha+ht*ja+Mr*Ka+D[12],W[13]=ke*ha+Et*ja+zr*Ka+D[13],W[14]=je*ha+Ut*ja+Wr*Ka+D[14],W[15]=We*ha+or*ja+ia*Ka+D[15]),W},e.K=function(W,D,J){var pe=J[0],ke=J[1],je=J[2];return W[0]=D[0]*pe,W[1]=D[1]*pe,W[2]=D[2]*pe,W[3]=D[3]*pe,W[4]=D[4]*ke,W[5]=D[5]*ke,W[6]=D[6]*ke,W[7]=D[7]*ke,W[8]=D[8]*je,W[9]=D[9]*je,W[10]=D[10]*je,W[11]=D[11]*je,W[12]=D[12],W[13]=D[13],W[14]=D[14],W[15]=D[15],W},e.L=Va,e.M=function(W,D){let J={};for(let pe=0;pe{let D=window.document.createElement("video");return D.muted=!0,new Promise(J=>{D.onloadstart=()=>{J(D)};for(let pe of W){let ke=window.document.createElement("source");ee(pe)||(D.crossOrigin="Anonymous"),ke.src=pe,D.appendChild(ke)}})},e.a4=function(){return g++},e.a5=nn,e.a6=cm,e.a7=Ec,e.a8=Hl,e.a9=V1,e.aA=function(W){if(W.type==="custom")return new N1(W);switch(W.type){case"background":return new QT(W);case"circle":return new Ha(W);case"fill":return new Ht(W);case"fill-extrusion":return new kp(W);case"heatmap":return new Dn(W);case"hillshade":return new bl(W);case"line":return new Lv(W);case"raster":return new I0(W);case"symbol":return new Dv(W)}},e.aB=u,e.aC=function(W,D){if(!W)return[{command:"setStyle",args:[D]}];let J=[];try{if(!Ae(W.version,D.version))return[{command:"setStyle",args:[D]}];Ae(W.center,D.center)||J.push({command:"setCenter",args:[D.center]}),Ae(W.zoom,D.zoom)||J.push({command:"setZoom",args:[D.zoom]}),Ae(W.bearing,D.bearing)||J.push({command:"setBearing",args:[D.bearing]}),Ae(W.pitch,D.pitch)||J.push({command:"setPitch",args:[D.pitch]}),Ae(W.sprite,D.sprite)||J.push({command:"setSprite",args:[D.sprite]}),Ae(W.glyphs,D.glyphs)||J.push({command:"setGlyphs",args:[D.glyphs]}),Ae(W.transition,D.transition)||J.push({command:"setTransition",args:[D.transition]}),Ae(W.light,D.light)||J.push({command:"setLight",args:[D.light]}),Ae(W.terrain,D.terrain)||J.push({command:"setTerrain",args:[D.terrain]}),Ae(W.sky,D.sky)||J.push({command:"setSky",args:[D.sky]}),Ae(W.projection,D.projection)||J.push({command:"setProjection",args:[D.projection]});let pe={},ke=[];(function(We,ht,Et,Ut){let or;for(or in ht=ht||{},We=We||{})Object.prototype.hasOwnProperty.call(We,or)&&(Object.prototype.hasOwnProperty.call(ht,or)||Ze(or,Et,Ut));for(or in ht)Object.prototype.hasOwnProperty.call(ht,or)&&(Object.prototype.hasOwnProperty.call(We,or)?Ae(We[or],ht[or])||(We[or].type==="geojson"&&ht[or].type==="geojson"&&nt(We,ht,or)?De(Et,{command:"setGeoJSONSourceData",args:[or,ht[or].data]}):at(or,ht,Et,Ut)):ze(or,ht,Et))})(W.sources,D.sources,ke,pe);let je=[];W.layers&&W.layers.forEach(We=>{"source"in We&&pe[We.source]?J.push({command:"removeLayer",args:[We.id]}):je.push(We)}),J=J.concat(ke),function(We,ht,Et){ht=ht||[];let Ut=(We=We||[]).map(st),or=ht.map(st),Mr=We.reduce(Me,{}),zr=ht.reduce(Me,{}),Wr=Ut.slice(),ia=Object.create(null),ha,ja,Ka,Wi,gi;for(let qi=0,en=0;qi@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(J,pe,ke,je)=>{let We=ke||je;return D[pe]=!We||We.toLowerCase(),""}),D["max-age"]){let J=parseInt(D["max-age"],10);isNaN(J)?delete D["max-age"]:D["max-age"]=J}return D},e.ab=function(W,D){let J=[];for(let pe in W)pe in D||J.push(pe);return J},e.ac=w,e.ad=function(W,D,J){var pe=Math.sin(J),ke=Math.cos(J),je=D[0],We=D[1],ht=D[2],Et=D[3],Ut=D[4],or=D[5],Mr=D[6],zr=D[7];return D!==W&&(W[8]=D[8],W[9]=D[9],W[10]=D[10],W[11]=D[11],W[12]=D[12],W[13]=D[13],W[14]=D[14],W[15]=D[15]),W[0]=je*ke+Ut*pe,W[1]=We*ke+or*pe,W[2]=ht*ke+Mr*pe,W[3]=Et*ke+zr*pe,W[4]=Ut*ke-je*pe,W[5]=or*ke-We*pe,W[6]=Mr*ke-ht*pe,W[7]=zr*ke-Et*pe,W},e.ae=function(W){var D=new Qa(16);return D[0]=W[0],D[1]=W[1],D[2]=W[2],D[3]=W[3],D[4]=W[4],D[5]=W[5],D[6]=W[6],D[7]=W[7],D[8]=W[8],D[9]=W[9],D[10]=W[10],D[11]=W[11],D[12]=W[12],D[13]=W[13],D[14]=W[14],D[15]=W[15],D},e.af=pn,e.ag=function(W,D){let J=0,pe=0;if(W.kind==="constant")pe=W.layoutSize;else if(W.kind!=="source"){let{interpolationType:ke,minZoom:je,maxZoom:We}=W,ht=ke?w(no.interpolationFactor(ke,D,je,We),0,1):0;W.kind==="camera"?pe=On.number(W.minSize,W.maxSize,ht):J=ht}return{uSizeT:J,uSize:pe}},e.ai=function(W,{uSize:D,uSizeT:J},{lowerSize:pe,upperSize:ke}){return W.kind==="source"?pe/yd:W.kind==="composite"?On.number(pe/yd,ke/yd,J):D},e.aj=z1,e.ak=function(W,D,J,pe){let ke=D.y-W.y,je=D.x-W.x,We=pe.y-J.y,ht=pe.x-J.x,Et=We*je-ht*ke;if(Et===0)return null;let Ut=(ht*(W.y-J.y)-We*(W.x-J.x))/Et;return new n(W.x+Ut*je,W.y+Ut*ke)},e.al=Zx,e.am=_c,e.an=di,e.ao=function(W){let D=1/0,J=1/0,pe=-1/0,ke=-1/0;for(let je of W)D=Math.min(D,je.x),J=Math.min(J,je.y),pe=Math.max(pe,je.x),ke=Math.max(ke,je.y);return[D,J,pe,ke]},e.ap=fu,e.ar=D1,e.as=function(W,D){var J=D[0],pe=D[1],ke=D[2],je=D[3],We=D[4],ht=D[5],Et=D[6],Ut=D[7],or=D[8],Mr=D[9],zr=D[10],Wr=D[11],ia=D[12],ha=D[13],ja=D[14],Ka=D[15],Wi=J*ht-pe*We,gi=J*Et-ke*We,qi=J*Ut-je*We,en=pe*Et-ke*ht,qn=pe*Ut-je*ht,Eo=ke*Ut-je*Et,ys=or*ha-Mr*ia,mo=or*ja-zr*ia,zn=or*Ka-Wr*ia,ts=Mr*ja-zr*ha,Uo=Mr*Ka-Wr*ha,zo=zr*Ka-Wr*ja,wn=Wi*zo-gi*Uo+qi*ts+en*zn-qn*mo+Eo*ys;return wn?(W[0]=(ht*zo-Et*Uo+Ut*ts)*(wn=1/wn),W[1]=(ke*Uo-pe*zo-je*ts)*wn,W[2]=(ha*Eo-ja*qn+Ka*en)*wn,W[3]=(zr*qn-Mr*Eo-Wr*en)*wn,W[4]=(Et*zn-We*zo-Ut*mo)*wn,W[5]=(J*zo-ke*zn+je*mo)*wn,W[6]=(ja*qi-ia*Eo-Ka*gi)*wn,W[7]=(or*Eo-zr*qi+Wr*gi)*wn,W[8]=(We*Uo-ht*zn+Ut*ys)*wn,W[9]=(pe*zn-J*Uo-je*ys)*wn,W[10]=(ia*qn-ha*qi+Ka*Wi)*wn,W[11]=(Mr*qi-or*qn-Wr*Wi)*wn,W[12]=(ht*mo-We*ts-Et*ys)*wn,W[13]=(J*ts-pe*mo+ke*ys)*wn,W[14]=(ha*gi-ia*en-ja*Wi)*wn,W[15]=(or*en-Mr*gi+zr*Wi)*wn,W):null},e.at=W1,e.au=Mg,e.av=X1,e.aw=function(){let W={},D=re.$version;for(let J in re.$root){let pe=re.$root[J];if(pe.required){let ke=null;ke=J==="version"?D:pe.type==="array"?[]:{},ke!=null&&(W[J]=ke)}}return W},e.ax=An,e.ay=V,e.az=function(W){W=W.slice();let D=Object.create(null);for(let J=0;J25||pe<0||pe>=1||J<0||J>=1)},e.bc=function(W,D){return W[0]=D[0],W[1]=0,W[2]=0,W[3]=0,W[4]=0,W[5]=D[1],W[6]=0,W[7]=0,W[8]=0,W[9]=0,W[10]=D[2],W[11]=0,W[12]=0,W[13]=0,W[14]=0,W[15]=1,W},e.bd=class extends $t{},e.be=j1,e.bf=sA,e.bh=fe,e.bi=function(W,D){$.REGISTERED_PROTOCOLS[W]=D},e.bj=function(W){delete $.REGISTERED_PROTOCOLS[W]},e.bk=function(W,D){let J={};for(let ke=0;kezo*fu)}let mo=We?"center":J.get("text-justify").evaluate(Ut,{},W.canonical),zn=J.get("symbol-placement")==="point"?J.get("text-max-width").evaluate(Ut,{},W.canonical)*fu:1/0,ts=()=>{W.bucket.allowVerticalPlacement&&yo(qi)&&(ia.vertical=M0(ha,W.glyphMap,W.glyphPositions,W.imagePositions,or,zn,je,Eo,"left",qn,Ka,e.ah.vertical,!0,zr,Mr))};if(!We&&ys){let Uo=new Set;if(mo==="auto")for(let wn=0;wnt(void 0,void 0,void 0,function*(){if(W.byteLength===0)return createImageBitmap(new ImageData(1,1));let D=new Blob([new Uint8Array(W)],{type:"image/png"});try{return createImageBitmap(D)}catch(J){throw new Error(`Could not load image because of ${J.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}}),e.e=M,e.f=W=>new Promise((D,J)=>{let pe=new Image;pe.onload=()=>{D(pe),URL.revokeObjectURL(pe.src),pe.onload=null,window.requestAnimationFrame(()=>{pe.src=N})},pe.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 ke=new Blob([new Uint8Array(W)],{type:"image/png"});pe.src=W.byteLength?URL.createObjectURL(ke):N}),e.g=se,e.h=(W,D)=>Y(M(W,{type:"json"}),D),e.i=L,e.j=j,e.k=ae,e.l=(W,D)=>Y(M(W,{type:"arrayBuffer"}),D),e.m=Y,e.n=function(W){return new P1(W).readFields(mk,[])},e.o=In,e.p=R1,e.q=Ue,e.r=Ci,e.s=ee,e.t=Pi,e.u=li,e.v=re,e.w=f,e.x=function([W,D,J]){return D+=90,D*=Math.PI/180,J*=Math.PI/180,{x:W*Math.cos(D)*Math.sin(J),y:W*Math.sin(D)*Math.sin(J),z:W*Math.cos(J)}},e.y=On,e.z=Rs}),S("worker",["./shared"],function(e){"use strict";class t{constructor(Ne){this.keyCache={},Ne&&this.replace(Ne)}replace(Ne){this._layerConfigs={},this._layers={},this.update(Ne,[])}update(Ne,Ke){for(let Ie of Ne){this._layerConfigs[Ie.id]=Ie;let Ve=this._layers[Ie.id]=e.aA(Ie);Ve._featureFilter=e.a7(Ve.filter),this.keyCache[Ie.id]&&delete this.keyCache[Ie.id]}for(let Ie of Ke)delete this.keyCache[Ie],delete this._layerConfigs[Ie],delete this._layers[Ie];this.familiesBySource={};let Te=e.bk(Object.values(this._layerConfigs),this.keyCache);for(let Ie of Te){let Ve=Ie.map(_t=>this._layers[_t.id]),Ce=Ve[0];if(Ce.visibility==="none")continue;let Ee=Ce.source||"",Pe=this.familiesBySource[Ee];Pe||(Pe=this.familiesBySource[Ee]={});let ft=Ce.sourceLayer||"_geojsonTileLayer",ct=Pe[ft];ct||(ct=Pe[ft]=[]),ct.push(Ve)}}}class r{constructor(Ne){let Ke={},Te=[];for(let Ee in Ne){let Pe=Ne[Ee],ft=Ke[Ee]={};for(let ct in Pe){let _t=Pe[+ct];if(!_t||_t.bitmap.width===0||_t.bitmap.height===0)continue;let Ct={x:0,y:0,w:_t.bitmap.width+2,h:_t.bitmap.height+2};Te.push(Ct),ft[ct]={rect:Ct,metrics:_t.metrics}}}let{w:Ie,h:Ve}=e.p(Te),Ce=new e.o({width:Ie||1,height:Ve||1});for(let Ee in Ne){let Pe=Ne[Ee];for(let ft in Pe){let ct=Pe[+ft];if(!ct||ct.bitmap.width===0||ct.bitmap.height===0)continue;let _t=Ke[Ee][ft].rect;e.o.copy(ct.bitmap,Ce,{x:0,y:0},{x:_t.x+1,y:_t.y+1},ct.bitmap)}}this.image=Ce,this.positions=Ke}}e.bl("GlyphAtlas",r);class o{constructor(Ne){this.tileID=new e.S(Ne.tileID.overscaledZ,Ne.tileID.wrap,Ne.tileID.canonical.z,Ne.tileID.canonical.x,Ne.tileID.canonical.y),this.uid=Ne.uid,this.zoom=Ne.zoom,this.pixelRatio=Ne.pixelRatio,this.tileSize=Ne.tileSize,this.source=Ne.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=Ne.showCollisionBoxes,this.collectResourceTiming=!!Ne.collectResourceTiming,this.returnDependencies=!!Ne.returnDependencies,this.promoteId=Ne.promoteId,this.inFlightDependencies=[]}parse(Ne,Ke,Te,Ie){return e._(this,void 0,void 0,function*(){this.status="parsing",this.data=Ne,this.collisionBoxArray=new e.a5;let Ve=new e.bm(Object.keys(Ne.layers).sort()),Ce=new e.bn(this.tileID,this.promoteId);Ce.bucketLayerIDs=[];let Ee={},Pe={featureIndex:Ce,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:Te},ft=Ke.familiesBySource[this.source];for(let Wa in ft){let Ca=Ne.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=Ve.encode(Wa),wi=[];for(let Kt=0;Kt=Ft.maxzoom||Ft.visibility!=="none"&&(a(Kt,this.zoom,Te),(Ee[Ft.id]=Ft.createBucket({index:Ce.bucketLayerIDs.length,layers:Kt,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:hi,sourceID:this.source})).populate(wi,Pe,this.tileID.canonical),Ce.bucketLayerIDs.push(Kt.map(Yt=>Yt.id)))}}let ct=e.aF(Pe.glyphDependencies,Wa=>Object.keys(Wa).map(Number));this.inFlightDependencies.forEach(Wa=>Wa?.abort()),this.inFlightDependencies=[];let _t=Promise.resolve({});if(Object.keys(ct).length){let Wa=new AbortController;this.inFlightDependencies.push(Wa),_t=Ie.sendAsync({type:"GG",data:{stacks:ct,source:this.source,tileID:this.tileID,type:"glyphs"}},Wa)}let Ct=Object.keys(Pe.iconDependencies),ir=Promise.resolve({});if(Ct.length){let Wa=new AbortController;this.inFlightDependencies.push(Wa),ir=Ie.sendAsync({type:"GI",data:{icons:Ct,source:this.source,tileID:this.tileID,type:"icons"}},Wa)}let rr=Object.keys(Pe.patternDependencies),er=Promise.resolve({});if(rr.length){let Wa=new AbortController;this.inFlightDependencies.push(Wa),er=Ie.sendAsync({type:"GI",data:{icons:rr,source:this.source,tileID:this.tileID,type:"patterns"}},Wa)}let[Lr,fa,Da]=yield Promise.all([_t,ir,er]),Ia=new r(Lr),qa=new e.bo(fa,Da);for(let Wa in Ee){let Ca=Ee[Wa];Ca instanceof e.a6?(a(Ca.layers,this.zoom,Te),e.bp({bucket:Ca,glyphMap:Lr,glyphPositions:Ia.positions,imageMap:fa,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,Te),Ca.addFeatures(Pe,this.tileID.canonical,qa.patternPositions))}return this.status="done",{buckets:Object.values(Ee).filter(Wa=>!Wa.isEmpty()),featureIndex:Ce,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:Ia.image,imageAtlas:qa,glyphMap:this.returnDependencies?Lr:null,iconMap:this.returnDependencies?fa:null,glyphPositions:this.returnDependencies?Ia.positions:null}})}}function a(wt,Ne,Ke){let Te=new e.z(Ne);for(let Ie of wt)Ie.recalculate(Te,Ke)}class n{constructor(Ne,Ke,Te){this.actor=Ne,this.layerIndex=Ke,this.availableImages=Te,this.fetching={},this.loading={},this.loaded={}}loadVectorTile(Ne,Ke){return e._(this,void 0,void 0,function*(){let Te=yield e.l(Ne.request,Ke);try{return{vectorTile:new e.bt.VectorTile(new e.bu(Te.data)),rawData:Te.data,cacheControl:Te.cacheControl,expires:Te.expires}}catch(Ie){let Ve=new Uint8Array(Te.data),Ce=`Unable to parse the tile at ${Ne.request.url}, `;throw Ce+=Ve[0]===31&&Ve[1]===139?"please make sure the data is not gzipped and that you have configured the relevant header in the server":`got error: ${Ie.message}`,new Error(Ce)}})}loadTile(Ne){return e._(this,void 0,void 0,function*(){let Ke=Ne.uid,Te=!!(Ne&&Ne.request&&Ne.request.collectResourceTiming)&&new e.bv(Ne.request),Ie=new o(Ne);this.loading[Ke]=Ie;let Ve=new AbortController;Ie.abort=Ve;try{let Ce=yield this.loadVectorTile(Ne,Ve);if(delete this.loading[Ke],!Ce)return null;let Ee=Ce.rawData,Pe={};Ce.expires&&(Pe.expires=Ce.expires),Ce.cacheControl&&(Pe.cacheControl=Ce.cacheControl);let ft={};if(Te){let _t=Te.finish();_t&&(ft.resourceTiming=JSON.parse(JSON.stringify(_t)))}Ie.vectorTile=Ce.vectorTile;let ct=Ie.parse(Ce.vectorTile,this.layerIndex,this.availableImages,this.actor);this.loaded[Ke]=Ie,this.fetching[Ke]={rawTileData:Ee,cacheControl:Pe,resourceTiming:ft};try{let _t=yield ct;return e.e({rawTileData:Ee.slice(0)},_t,Pe,ft)}finally{delete this.fetching[Ke]}}catch(Ce){throw delete this.loading[Ke],Ie.status="done",this.loaded[Ke]=Ie,Ce}})}reloadTile(Ne){return e._(this,void 0,void 0,function*(){let Ke=Ne.uid;if(!this.loaded||!this.loaded[Ke])throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");let Te=this.loaded[Ke];if(Te.showCollisionBoxes=Ne.showCollisionBoxes,Te.status==="parsing"){let Ie=yield Te.parse(Te.vectorTile,this.layerIndex,this.availableImages,this.actor),Ve;if(this.fetching[Ke]){let{rawTileData:Ce,cacheControl:Ee,resourceTiming:Pe}=this.fetching[Ke];delete this.fetching[Ke],Ve=e.e({rawTileData:Ce.slice(0)},Ie,Ee,Pe)}else Ve=Ie;return Ve}if(Te.status==="done"&&Te.vectorTile)return Te.parse(Te.vectorTile,this.layerIndex,this.availableImages,this.actor)})}abortTile(Ne){return e._(this,void 0,void 0,function*(){let Ke=this.loading,Te=Ne.uid;Ke&&Ke[Te]&&Ke[Te].abort&&(Ke[Te].abort.abort(),delete Ke[Te])})}removeTile(Ne){return e._(this,void 0,void 0,function*(){this.loaded&&this.loaded[Ne.uid]&&delete this.loaded[Ne.uid]})}}class i{constructor(){this.loaded={}}loadTile(Ne){return e._(this,void 0,void 0,function*(){let{uid:Ke,encoding:Te,rawImageData:Ie,redFactor:Ve,greenFactor:Ce,blueFactor:Ee,baseShift:Pe}=Ne,ft=Ie.width+2,ct=Ie.height+2,_t=e.b(Ie)?new e.R({width:ft,height:ct},yield e.bw(Ie,-1,-1,ft,ct)):Ie,Ct=new e.bx(Ke,_t,Te,Ve,Ce,Ee,Pe);return this.loaded=this.loaded||{},this.loaded[Ke]=Ct,Ct})}removeTile(Ne){let Ke=this.loaded,Te=Ne.uid;Ke&&Ke[Te]&&delete Ke[Te]}}function s(wt,Ne){if(wt.length!==0){h(wt[0],Ne);for(var Ke=1;Ke=Math.abs(Ee)?Ke-Pe+Ee:Ee-Pe+Ke,Ke=Pe}Ke+Te>=0!=!!Ne&&wt.reverse()}var c=e.by(function wt(Ne,Ke){var Te,Ie=Ne&&Ne.type;if(Ie==="FeatureCollection")for(Te=0;Te>31}function L(wt,Ne){for(var Ke=wt.loadGeometry(),Te=wt.type,Ie=0,Ve=0,Ce=Ke.length,Ee=0;Eewt},O=Math.fround||(P=new Float32Array(1),wt=>(P[0]=+wt,P[0]));var P;let U=3,B=5,X=6;class ${constructor(Ne){this.options=Object.assign(Object.create(N),Ne),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(Ne){let{log:Ke,minZoom:Te,maxZoom:Ie}=this.options;Ke&&console.time("total time");let Ve=`prepare ${Ne.length} points`;Ke&&console.time(Ve),this.points=Ne;let Ce=[];for(let Pe=0;Pe=Te;Pe--){let ft=+Date.now();Ee=this.trees[Pe]=this._createTree(this._cluster(Ee,Pe)),Ke&&console.log("z%d: %d clusters in %dms",Pe,Ee.numItems,+Date.now()-ft)}return Ke&&console.timeEnd("total time"),this}getClusters(Ne,Ke){let Te=((Ne[0]+180)%360+360)%360-180,Ie=Math.max(-90,Math.min(90,Ne[1])),Ve=Ne[2]===180?180:((Ne[2]+180)%360+360)%360-180,Ce=Math.max(-90,Math.min(90,Ne[3]));if(Ne[2]-Ne[0]>=360)Te=-180,Ve=180;else if(Te>Ve){let _t=this.getClusters([Te,Ie,180,Ce],Ke),Ct=this.getClusters([-180,Ie,Ve,Ce],Ke);return _t.concat(Ct)}let Ee=this.trees[this._limitZoom(Ke)],Pe=Ee.range(fe(Te),V(Ce),fe(Ve),V(Ie)),ft=Ee.data,ct=[];for(let _t of Pe){let Ct=this.stride*_t;ct.push(ft[Ct+B]>1?se(ft,Ct,this.clusterProps):this.points[ft[Ct+U]])}return ct}getChildren(Ne){let Ke=this._getOriginId(Ne),Te=this._getOriginZoom(Ne),Ie="No cluster with the specified id.",Ve=this.trees[Te];if(!Ve)throw new Error(Ie);let Ce=Ve.data;if(Ke*this.stride>=Ce.length)throw new Error(Ie);let Ee=this.options.radius/(this.options.extent*Math.pow(2,Te-1)),Pe=Ve.within(Ce[Ke*this.stride],Ce[Ke*this.stride+1],Ee),ft=[];for(let ct of Pe){let _t=ct*this.stride;Ce[_t+4]===Ne&&ft.push(Ce[_t+B]>1?se(Ce,_t,this.clusterProps):this.points[Ce[_t+U]])}if(ft.length===0)throw new Error(Ie);return ft}getLeaves(Ne,Ke,Te){let Ie=[];return this._appendLeaves(Ie,Ne,Ke=Ke||10,Te=Te||0,0),Ie}getTile(Ne,Ke,Te){let Ie=this.trees[this._limitZoom(Ne)],Ve=Math.pow(2,Ne),{extent:Ce,radius:Ee}=this.options,Pe=Ee/Ce,ft=(Te-Pe)/Ve,ct=(Te+1+Pe)/Ve,_t={features:[]};return this._addTileFeatures(Ie.range((Ke-Pe)/Ve,ft,(Ke+1+Pe)/Ve,ct),Ie.data,Ke,Te,Ve,_t),Ke===0&&this._addTileFeatures(Ie.range(1-Pe/Ve,ft,1,ct),Ie.data,Ve,Te,Ve,_t),Ke===Ve-1&&this._addTileFeatures(Ie.range(0,ft,Pe/Ve,ct),Ie.data,-1,Te,Ve,_t),_t.features.length?_t:null}getClusterExpansionZoom(Ne){let Ke=this._getOriginZoom(Ne)-1;for(;Ke<=this.options.maxZoom;){let Te=this.getChildren(Ne);if(Ke++,Te.length!==1)break;Ne=Te[0].properties.cluster_id}return Ke}_appendLeaves(Ne,Ke,Te,Ie,Ve){let Ce=this.getChildren(Ke);for(let Ee of Ce){let Pe=Ee.properties;if(Pe&&Pe.cluster?Ve+Pe.point_count<=Ie?Ve+=Pe.point_count:Ve=this._appendLeaves(Ne,Pe.cluster_id,Te,Ie,Ve):Ve1,ct,_t,Ct;if(ft)ct=le(Ke,Pe,this.clusterProps),_t=Ke[Pe],Ct=Ke[Pe+1];else{let er=this.points[Ke[Pe+U]];ct=er.properties;let[Lr,fa]=er.geometry.coordinates;_t=fe(Lr),Ct=V(fa)}let ir={type:1,geometry:[[Math.round(this.options.extent*(_t*Ve-Te)),Math.round(this.options.extent*(Ct*Ve-Ie))]],tags:ct},rr;rr=ft||this.options.generateId?Ke[Pe+U]:this.points[Ke[Pe+U]].id,rr!==void 0&&(ir.id=rr),Ce.features.push(ir)}}_limitZoom(Ne){return Math.max(this.options.minZoom,Math.min(Math.floor(+Ne),this.options.maxZoom+1))}_cluster(Ne,Ke){let{radius:Te,extent:Ie,reduce:Ve,minPoints:Ce}=this.options,Ee=Te/(Ie*Math.pow(2,Ke)),Pe=Ne.data,ft=[],ct=this.stride;for(let _t=0;_tKe&&(Lr+=Pe[Da+B])}if(Lr>er&&Lr>=Ce){let fa,Da=Ct*er,Ia=ir*er,qa=-1,Wa=((_t/ct|0)<<5)+(Ke+1)+this.points.length;for(let Ca of rr){let hi=Ca*ct;if(Pe[hi+2]<=Ke)continue;Pe[hi+2]=Ke;let wi=Pe[hi+B];Da+=Pe[hi]*wi,Ia+=Pe[hi+1]*wi,Pe[hi+4]=Wa,Ve&&(fa||(fa=this._map(Pe,_t,!0),qa=this.clusterProps.length,this.clusterProps.push(fa)),Ve(fa,this._map(Pe,hi)))}Pe[_t+4]=Wa,ft.push(Da/Lr,Ia/Lr,1/0,Wa,-1,Lr),Ve&&ft.push(qa)}else{for(let fa=0;fa1)for(let fa of rr){let Da=fa*ct;if(!(Pe[Da+2]<=Ke)){Pe[Da+2]=Ke;for(let Ia=0;Ia>5}_getOriginZoom(Ne){return(Ne-this.points.length)%32}_map(Ne,Ke,Te){if(Ne[Ke+B]>1){let Ce=this.clusterProps[Ne[Ke+X]];return Te?Object.assign({},Ce):Ce}let Ie=this.points[Ne[Ke+U]].properties,Ve=this.options.map(Ie);return Te&&Ve===Ie?Object.assign({},Ve):Ve}}function se(wt,Ne,Ke){return{type:"Feature",id:wt[Ne+U],properties:le(wt,Ne,Ke),geometry:{type:"Point",coordinates:[(Te=wt[Ne],360*(Te-.5)),Y(wt[Ne+1])]}};var Te}function le(wt,Ne,Ke){let Te=wt[Ne+B],Ie=Te>=1e4?`${Math.round(Te/1e3)}k`:Te>=1e3?Math.round(Te/100)/10+"k":Te,Ve=wt[Ne+X],Ce=Ve===-1?{}:Object.assign({},Ke[Ve]);return Object.assign(Ce,{cluster:!0,cluster_id:wt[Ne+U],point_count:Te,point_count_abbreviated:Ie})}function fe(wt){return wt/360+.5}function V(wt){let Ne=Math.sin(wt*Math.PI/180),Ke=.5-.25*Math.log((1+Ne)/(1-Ne))/Math.PI;return Ke<0?0:Ke>1?1:Ke}function Y(wt){let Ne=(180-360*wt)*Math.PI/180;return 360*Math.atan(Math.exp(Ne))/Math.PI-90}function ee(wt,Ne,Ke,Te){let Ie=Te,Ve=Ne+(Ke-Ne>>1),Ce,Ee=Ke-Ne,Pe=wt[Ne],ft=wt[Ne+1],ct=wt[Ke],_t=wt[Ke+1];for(let Ct=Ne+3;CtIe)Ce=Ct,Ie=ir;else if(ir===Ie){let rr=Math.abs(Ct-Ve);rrTe&&(Ce-Ne>3&&ee(wt,Ne,Ce,Te),wt[Ce+2]=Ie,Ke-Ce>3&&ee(wt,Ce,Ke,Te))}function q(wt,Ne,Ke,Te,Ie,Ve){let Ce=Ie-Ke,Ee=Ve-Te;if(Ce!==0||Ee!==0){let Pe=((wt-Ke)*Ce+(Ne-Te)*Ee)/(Ce*Ce+Ee*Ee);Pe>1?(Ke=Ie,Te=Ve):Pe>0&&(Ke+=Ce*Pe,Te+=Ee*Pe)}return Ce=wt-Ke,Ee=Ne-Te,Ce*Ce+Ee*Ee}function oe(wt,Ne,Ke,Te){let Ie={id:wt??null,type:Ne,geometry:Ke,tags:Te,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};if(Ne==="Point"||Ne==="MultiPoint"||Ne==="LineString")ae(Ie,Ke);else if(Ne==="Polygon")ae(Ie,Ke[0]);else if(Ne==="MultiLineString")for(let Ve of Ke)ae(Ie,Ve);else if(Ne==="MultiPolygon")for(let Ve of Ke)ae(Ie,Ve[0]);return Ie}function ae(wt,Ne){for(let Ke=0;Ke0&&(Ce+=Te?(Ie*ct-ft*Ve)/2:Math.sqrt(Math.pow(ft-Ie,2)+Math.pow(ct-Ve,2))),Ie=ft,Ve=ct}let Ee=Ne.length-3;Ne[2]=1,ee(Ne,0,Ee,Ke),Ne[Ee+2]=1,Ne.size=Math.abs(Ce),Ne.start=0,Ne.end=Ne.size}function ce(wt,Ne,Ke,Te){for(let Ie=0;Ie1?1:Ke}function De(wt,Ne,Ke,Te,Ie,Ve,Ce,Ee){if(Te/=Ne,Ve>=(Ke/=Ne)&&Ce=Te)return null;let Pe=[];for(let ft of wt){let ct=ft.geometry,_t=ft.type,Ct=Ie===0?ft.minX:ft.minY,ir=Ie===0?ft.maxX:ft.maxY;if(Ct>=Ke&&ir=Te)continue;let rr=[];if(_t==="Point"||_t==="MultiPoint")ze(ct,rr,Ke,Te,Ie);else if(_t==="LineString")Ze(ct,rr,Ke,Te,Ie,!1,Ee.lineMetrics);else if(_t==="MultiLineString")nt(ct,rr,Ke,Te,Ie,!1);else if(_t==="Polygon")nt(ct,rr,Ke,Te,Ie,!0);else if(_t==="MultiPolygon")for(let er of ct){let Lr=[];nt(er,Lr,Ke,Te,Ie,!0),Lr.length&&rr.push(Lr)}if(rr.length){if(Ee.lineMetrics&&_t==="LineString"){for(let er of rr)Pe.push(oe(ft.id,_t,er,ft.tags));continue}_t!=="LineString"&&_t!=="MultiLineString"||(rr.length===1?(_t="LineString",rr=rr[0]):_t="MultiLineString"),_t!=="Point"&&_t!=="MultiPoint"||(_t=rr.length===3?"Point":"MultiPoint"),Pe.push(oe(ft.id,_t,rr,ft.tags))}}return Pe.length?Pe:null}function ze(wt,Ne,Ke,Te,Ie){for(let Ve=0;Ve=Ke&&Ce<=Te&&rt(Ne,wt[Ve],wt[Ve+1],wt[Ve+2])}}function Ze(wt,Ne,Ke,Te,Ie,Ve,Ce){let Ee=at(wt),Pe=Ie===0?st:Me,ft,ct,_t=wt.start;for(let Lr=0;LrKe&&(ct=Pe(Ee,fa,Da,qa,Wa,Ke),Ce&&(Ee.start=_t+ft*ct)):Ca>Te?hi=Ke&&(ct=Pe(Ee,fa,Da,qa,Wa,Ke),wi=!0),hi>Te&&Ca<=Te&&(ct=Pe(Ee,fa,Da,qa,Wa,Te),wi=!0),!Ve&&wi&&(Ce&&(Ee.end=_t+ft*ct),Ne.push(Ee),Ee=at(wt)),Ce&&(_t+=ft)}let Ct=wt.length-3,ir=wt[Ct],rr=wt[Ct+1],er=Ie===0?ir:rr;er>=Ke&&er<=Te&&rt(Ee,ir,rr,wt[Ct+2]),Ct=Ee.length-3,Ve&&Ct>=3&&(Ee[Ct]!==Ee[0]||Ee[Ct+1]!==Ee[1])&&rt(Ee,Ee[0],Ee[1],Ee[2]),Ee.length&&Ne.push(Ee)}function at(wt){let Ne=[];return Ne.size=wt.size,Ne.start=wt.start,Ne.end=wt.end,Ne}function nt(wt,Ne,Ke,Te,Ie,Ve){for(let Ce of wt)Ze(Ce,Ne,Ke,Te,Ie,Ve,!1)}function rt(wt,Ne,Ke,Te){wt.push(Ne,Ke,Te)}function st(wt,Ne,Ke,Te,Ie,Ve){let Ce=(Ve-Ne)/(Te-Ne);return rt(wt,Ve,Ke+(Ie-Ke)*Ce,1),Ce}function Me(wt,Ne,Ke,Te,Ie,Ve){let Ce=(Ve-Ke)/(Ie-Ke);return rt(wt,Ne+(Te-Ne)*Ce,Ve,1),Ce}function ye(wt,Ne){let Ke=[];for(let Te=0;Te0&&Ne.size<(Ie?Ce:Te))return void(Ke.numPoints+=Ne.length/3);let Ee=[];for(let Pe=0;PeCe)&&(Ke.numSimplified++,Ee.push(Ne[Pe],Ne[Pe+1])),Ke.numPoints++;Ie&&function(Pe,ft){let ct=0;for(let _t=0,Ct=Pe.length,ir=Ct-2;_t0===ft)for(let _t=0,Ct=Pe.length;_t24)throw new Error("maxZoom should be in the 0-24 range");if(Ke.promoteId&&Ke.generateId)throw new Error("promoteId and generateId cannot be used together.");let Ie=function(Ve,Ce){let Ee=[];if(Ve.type==="FeatureCollection")for(let Pe=0;Pe1&&console.time("creation"),ir=this.tiles[Ct]=ot(Ne,Ke,Te,Ie,ft),this.tileCoords.push({z:Ke,x:Te,y:Ie}),ct)){ct>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",Ke,Te,Ie,ir.numFeatures,ir.numPoints,ir.numSimplified),console.timeEnd("creation"));let wi=`z${Ke}`;this.stats[wi]=(this.stats[wi]||0)+1,this.total++}if(ir.source=Ne,Ve==null){if(Ke===ft.indexMaxZoom||ir.numPoints<=ft.indexMaxPoints)continue}else{if(Ke===ft.maxZoom||Ke===Ve)continue;if(Ve!=null){let wi=Ve-Ke;if(Te!==Ce>>wi||Ie!==Ee>>wi)continue}}if(ir.source=null,Ne.length===0)continue;ct>1&&console.time("clipping");let rr=.5*ft.buffer/ft.extent,er=.5-rr,Lr=.5+rr,fa=1+rr,Da=null,Ia=null,qa=null,Wa=null,Ca=De(Ne,_t,Te-rr,Te+Lr,0,ir.minX,ir.maxX,ft),hi=De(Ne,_t,Te+er,Te+fa,0,ir.minX,ir.maxX,ft);Ne=null,Ca&&(Da=De(Ca,_t,Ie-rr,Ie+Lr,1,ir.minY,ir.maxY,ft),Ia=De(Ca,_t,Ie+er,Ie+fa,1,ir.minY,ir.maxY,ft),Ca=null),hi&&(qa=De(hi,_t,Ie-rr,Ie+Lr,1,ir.minY,ir.maxY,ft),Wa=De(hi,_t,Ie+er,Ie+fa,1,ir.minY,ir.maxY,ft),hi=null),ct>1&&console.timeEnd("clipping"),Pe.push(Da||[],Ke+1,2*Te,2*Ie),Pe.push(Ia||[],Ke+1,2*Te,2*Ie+1),Pe.push(qa||[],Ke+1,2*Te+1,2*Ie),Pe.push(Wa||[],Ke+1,2*Te+1,2*Ie+1)}}getTile(Ne,Ke,Te){Ne=+Ne,Ke=+Ke,Te=+Te;let Ie=this.options,{extent:Ve,debug:Ce}=Ie;if(Ne<0||Ne>24)return null;let Ee=1<1&&console.log("drilling down to z%d-%d-%d",Ne,Ke,Te);let ft,ct=Ne,_t=Ke,Ct=Te;for(;!ft&&ct>0;)ct--,_t>>=1,Ct>>=1,ft=this.tiles[Wt(ct,_t,Ct)];return ft&&ft.source?(Ce>1&&(console.log("found parent tile z%d-%d-%d",ct,_t,Ct),console.time("drilling down")),this.splitTile(ft.source,ct,_t,Ct,Ne,Ke,Te),Ce>1&&console.timeEnd("drilling down"),this.tiles[Pe]?Oe(this.tiles[Pe],Ve):null):null}}function Wt(wt,Ne,Ke){return 32*((1<{_t.properties=ir;let rr={};for(let er of Ct)rr[er]=Pe[er].evaluate(ct,_t);return rr},Ce.reduce=(ir,rr)=>{_t.properties=rr;for(let er of Ct)ct.accumulated=ir[er],ir[er]=ft[er].evaluate(ct,_t)},Ce}(Ne)).load((yield this._pendingData).features):(Ie=yield this._pendingData,new qt(Ie,Ne.geojsonVtOptions)),this.loaded={};let Ve={};if(Te){let Ce=Te.finish();Ce&&(Ve.resourceTiming={},Ve.resourceTiming[Ne.source]=JSON.parse(JSON.stringify(Ce)))}return Ve}catch(Ve){if(delete this._pendingRequest,e.bB(Ve))return{abandoned:!0};throw Ve}var Ie})}getData(){return e._(this,void 0,void 0,function*(){return this._pendingData})}reloadTile(Ne){let Ke=this.loaded;return Ke&&Ke[Ne.uid]?super.reloadTile(Ne):this.loadTile(Ne)}loadAndProcessGeoJSON(Ne,Ke){return e._(this,void 0,void 0,function*(){let Te=yield this.loadGeoJSON(Ne,Ke);if(delete this._pendingRequest,typeof Te!="object")throw new Error(`Input data given to '${Ne.source}' is not a valid GeoJSON object.`);if(c(Te,!0),Ne.filter){let Ie=e.bC(Ne.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(Ie.result==="error")throw new Error(Ie.value.map(Ce=>`${Ce.key}: ${Ce.message}`).join(", "));Te={type:"FeatureCollection",features:Te.features.filter(Ce=>Ie.value.evaluate({zoom:0},Ce))}}return Te})}loadGeoJSON(Ne,Ke){return e._(this,void 0,void 0,function*(){let{promoteId:Te}=Ne;if(Ne.request){let Ie=yield e.h(Ne.request,Ke);return this._dataUpdateable=mr(Ie.data,Te)?qr(Ie.data,Te):void 0,Ie.data}if(typeof Ne.data=="string")try{let Ie=JSON.parse(Ne.data);return this._dataUpdateable=mr(Ie,Te)?qr(Ie,Te):void 0,Ie}catch{throw new Error(`Input data given to '${Ne.source}' is not a valid GeoJSON object.`)}if(!Ne.dataDiff)throw new Error(`Input data given to '${Ne.source}' is not a valid GeoJSON object.`);if(!this._dataUpdateable)throw new Error(`Cannot update existing geojson data in ${Ne.source}`);return function(Ie,Ve,Ce){var Ee,Pe,ft,ct;if(Ve.removeAll&&Ie.clear(),Ve.remove)for(let _t of Ve.remove)Ie.delete(_t);if(Ve.add)for(let _t of Ve.add){let Ct=kr(_t,Ce);Ct!=null&&Ie.set(Ct,_t)}if(Ve.update)for(let _t of Ve.update){let Ct=Ie.get(_t.id);if(Ct==null)continue;let ir=!_t.removeAllProperties&&(((Ee=_t.removeProperties)===null||Ee===void 0?void 0:Ee.length)>0||((Pe=_t.addOrUpdateProperties)===null||Pe===void 0?void 0:Pe.length)>0);if((_t.newGeometry||_t.removeAllProperties||ir)&&(Ct=Object.assign({},Ct),Ie.set(_t.id,Ct),ir&&(Ct.properties=Object.assign({},Ct.properties))),_t.newGeometry&&(Ct.geometry=_t.newGeometry),_t.removeAllProperties)Ct.properties={};else if(((ft=_t.removeProperties)===null||ft===void 0?void 0:ft.length)>0)for(let rr of _t.removeProperties)Object.prototype.hasOwnProperty.call(Ct.properties,rr)&&delete Ct.properties[rr];if(((ct=_t.addOrUpdateProperties)===null||ct===void 0?void 0:ct.length)>0)for(let{key:rr,value:er}of _t.addOrUpdateProperties)Ct.properties[rr]=er}}(this._dataUpdateable,Ne.dataDiff,Te),{type:"FeatureCollection",features:Array.from(this._dataUpdateable.values())}})}removeSource(Ne){return e._(this,void 0,void 0,function*(){this._pendingRequest&&this._pendingRequest.abort()})}getClusterExpansionZoom(Ne){return this._geoJSONIndex.getClusterExpansionZoom(Ne.clusterId)}getClusterChildren(Ne){return this._geoJSONIndex.getChildren(Ne.clusterId)}getClusterLeaves(Ne){return this._geoJSONIndex.getLeaves(Ne.clusterId,Ne.limit,Ne.offset)}}class Rr{constructor(Ne){this.self=Ne,this.actor=new e.F(Ne),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.self.registerWorkerSource=(Ke,Te)=>{if(this.externalWorkerSourceTypes[Ke])throw new Error(`Worker source with name "${Ke}" already registered.`);this.externalWorkerSourceTypes[Ke]=Te},this.self.addProtocol=e.bi,this.self.removeProtocol=e.bj,this.self.registerRTLTextPlugin=Ke=>{if(e.bD.isParsed())throw new Error("RTL text plugin already registered.");e.bD.setMethods(Ke)},this.actor.registerMessageHandler("LDT",(Ke,Te)=>this._getDEMWorkerSource(Ke,Te.source).loadTile(Te)),this.actor.registerMessageHandler("RDT",(Ke,Te)=>e._(this,void 0,void 0,function*(){this._getDEMWorkerSource(Ke,Te.source).removeTile(Te)})),this.actor.registerMessageHandler("GCEZ",(Ke,Te)=>e._(this,void 0,void 0,function*(){return this._getWorkerSource(Ke,Te.type,Te.source).getClusterExpansionZoom(Te)})),this.actor.registerMessageHandler("GCC",(Ke,Te)=>e._(this,void 0,void 0,function*(){return this._getWorkerSource(Ke,Te.type,Te.source).getClusterChildren(Te)})),this.actor.registerMessageHandler("GCL",(Ke,Te)=>e._(this,void 0,void 0,function*(){return this._getWorkerSource(Ke,Te.type,Te.source).getClusterLeaves(Te)})),this.actor.registerMessageHandler("LD",(Ke,Te)=>this._getWorkerSource(Ke,Te.type,Te.source).loadData(Te)),this.actor.registerMessageHandler("GD",(Ke,Te)=>this._getWorkerSource(Ke,Te.type,Te.source).getData()),this.actor.registerMessageHandler("LT",(Ke,Te)=>this._getWorkerSource(Ke,Te.type,Te.source).loadTile(Te)),this.actor.registerMessageHandler("RT",(Ke,Te)=>this._getWorkerSource(Ke,Te.type,Te.source).reloadTile(Te)),this.actor.registerMessageHandler("AT",(Ke,Te)=>this._getWorkerSource(Ke,Te.type,Te.source).abortTile(Te)),this.actor.registerMessageHandler("RMT",(Ke,Te)=>this._getWorkerSource(Ke,Te.type,Te.source).removeTile(Te)),this.actor.registerMessageHandler("RS",(Ke,Te)=>e._(this,void 0,void 0,function*(){if(!this.workerSources[Ke]||!this.workerSources[Ke][Te.type]||!this.workerSources[Ke][Te.type][Te.source])return;let Ie=this.workerSources[Ke][Te.type][Te.source];delete this.workerSources[Ke][Te.type][Te.source],Ie.removeSource!==void 0&&Ie.removeSource(Te)})),this.actor.registerMessageHandler("RM",Ke=>e._(this,void 0,void 0,function*(){delete this.layerIndexes[Ke],delete this.availableImages[Ke],delete this.workerSources[Ke],delete this.demWorkerSources[Ke]})),this.actor.registerMessageHandler("SR",(Ke,Te)=>e._(this,void 0,void 0,function*(){this.referrer=Te})),this.actor.registerMessageHandler("SRPS",(Ke,Te)=>this._syncRTLPluginState(Ke,Te)),this.actor.registerMessageHandler("IS",(Ke,Te)=>e._(this,void 0,void 0,function*(){this.self.importScripts(Te)})),this.actor.registerMessageHandler("SI",(Ke,Te)=>this._setImages(Ke,Te)),this.actor.registerMessageHandler("UL",(Ke,Te)=>e._(this,void 0,void 0,function*(){this._getLayerIndex(Ke).update(Te.layers,Te.removedIds)})),this.actor.registerMessageHandler("SL",(Ke,Te)=>e._(this,void 0,void 0,function*(){this._getLayerIndex(Ke).replace(Te)}))}_setImages(Ne,Ke){return e._(this,void 0,void 0,function*(){this.availableImages[Ne]=Ke;for(let Te in this.workerSources[Ne]){let Ie=this.workerSources[Ne][Te];for(let Ve in Ie)Ie[Ve].availableImages=Ke}})}_syncRTLPluginState(Ne,Ke){return e._(this,void 0,void 0,function*(){if(e.bD.isParsed())return e.bD.getState();if(Ke.pluginStatus!=="loading")return e.bD.setState(Ke),Ke;let Te=Ke.pluginURL;if(this.self.importScripts(Te),e.bD.isParsed()){let Ie={pluginStatus:"loaded",pluginURL:Te};return e.bD.setState(Ie),Ie}throw e.bD.setState({pluginStatus:"error",pluginURL:""}),new Error(`RTL Text Plugin failed to import scripts from ${Te}`)})}_getAvailableImages(Ne){let Ke=this.availableImages[Ne];return Ke||(Ke=[]),Ke}_getLayerIndex(Ne){let Ke=this.layerIndexes[Ne];return Ke||(Ke=this.layerIndexes[Ne]=new t),Ke}_getWorkerSource(Ne,Ke,Te){if(this.workerSources[Ne]||(this.workerSources[Ne]={}),this.workerSources[Ne][Ke]||(this.workerSources[Ne][Ke]={}),!this.workerSources[Ne][Ke][Te]){let Ie={sendAsync:(Ve,Ce)=>(Ve.targetMapId=Ne,this.actor.sendAsync(Ve,Ce))};switch(Ke){case"vector":this.workerSources[Ne][Ke][Te]=new n(Ie,this._getLayerIndex(Ne),this._getAvailableImages(Ne));break;case"geojson":this.workerSources[Ne][Ke][Te]=new Sr(Ie,this._getLayerIndex(Ne),this._getAvailableImages(Ne));break;default:this.workerSources[Ne][Ke][Te]=new this.externalWorkerSourceTypes[Ke](Ie,this._getLayerIndex(Ne),this._getAvailableImages(Ne))}}return this.workerSources[Ne][Ke][Te]}_getDEMWorkerSource(Ne,Ke){return this.demWorkerSources[Ne]||(this.demWorkerSources[Ne]={}),this.demWorkerSources[Ne][Ke]||(this.demWorkerSources[Ne][Ke]=new i),this.demWorkerSources[Ne][Ke]}}return e.i(self)&&(self.worker=new Rr(self)),Rr}),S("index",["exports","./shared"],function(e,t){"use strict";var r="4.7.1";let o,a,n={now:typeof performance<"u"&&performance&&performance.now?performance.now.bind(performance):Date.now.bind(Date),frameAsync:Ue=>new Promise((I,ie)=>{let we=requestAnimationFrame(I);Ue.signal.addEventListener("abort",()=>{cancelAnimationFrame(we),ie(t.c())})}),getImageData(Ue,I=0){return this.getImageCanvasContext(Ue).getImageData(-I,-I,Ue.width+2*I,Ue.height+2*I)},getImageCanvasContext(Ue){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=Ue.width,I.height=Ue.height,ie.drawImage(Ue,0,0,Ue.width,Ue.height),ie},resolveURL:Ue=>(o||(o=document.createElement("a")),o.href=Ue,o.href),hardwareConcurrency:typeof navigator<"u"&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return!!matchMedia&&(a==null&&(a=matchMedia("(prefers-reduced-motion: reduce)")),a.matches)}};class i{static testProp(I){if(!i.docStyle)return I[0];for(let ie=0;ie{window.removeEventListener("click",i.suppressClickInternal,!0)},0)}static getScale(I){let ie=I.getBoundingClientRect();return{x:ie.width/I.offsetWidth||1,y:ie.height/I.offsetHeight||1,boundingClientRect:ie}}static getPoint(I,ie,we){let Se=ie.boundingClientRect;return new t.P((we.clientX-Se.left)/ie.x-I.clientLeft,(we.clientY-Se.top)/ie.y-I.clientTop)}static mousePos(I,ie){let we=i.getScale(I);return i.getPoint(I,we,ie)}static touchPos(I,ie){let we=[],Se=i.getScale(I);for(let Be=0;Be{h&&T(h),h=null,p=!0},c.onerror=()=>{m=!0,h=null},c.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA="),function(Ue){let I,ie,we,Se;Ue.resetRequestQueue=()=>{I=[],ie=0,we=0,Se={}},Ue.addThrottleControl=Nt=>{let $t=we++;return Se[$t]=Nt,$t},Ue.removeThrottleControl=Nt=>{delete Se[Nt],dt()},Ue.getImage=(Nt,$t,Tr=!0)=>new Promise((Ar,Kr)=>{s.supported&&(Nt.headers||(Nt.headers={}),Nt.headers.accept="image/webp,*/*"),t.e(Nt,{type:"image"}),I.push({abortController:$t,requestParameters:Nt,supportImageRefresh:Tr,state:"queued",onError:na=>{Kr(na)},onSuccess:na=>{Ar(na)}}),dt()});let Be=Nt=>t._(this,void 0,void 0,function*(){Nt.state="running";let{requestParameters:$t,supportImageRefresh:Tr,onError:Ar,onSuccess:Kr,abortController:na}=Nt,He=Tr===!1&&!t.i(self)&&!t.g($t.url)&&(!$t.headers||Object.keys($t.headers).reduce((vt,Lt)=>vt&&Lt==="accept",!0));ie++;let Je=He?St($t,na):t.m($t,na);try{let vt=yield Je;delete Nt.abortController,Nt.state="completed",vt.data instanceof HTMLImageElement||t.b(vt.data)?Kr(vt):vt.data&&Kr({data:yield(lt=vt.data,typeof createImageBitmap=="function"?t.d(lt):t.f(lt)),cacheControl:vt.cacheControl,expires:vt.expires})}catch(vt){delete Nt.abortController,Ar(vt)}finally{ie--,dt()}var lt}),dt=()=>{let Nt=(()=>{for(let $t of Object.keys(Se))if(Se[$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--:Be(Tr)}},St=(Nt,$t)=>new Promise((Tr,Ar)=>{let Kr=new Image,na=Nt.url,He=Nt.credentials;He&&He==="include"?Kr.crossOrigin="use-credentials":(He&&He==="same-origin"||!t.s(na))&&(Kr.crossOrigin="anonymous"),$t.signal.addEventListener("abort",()=>{Kr.src="",Ar(t.c())}),Kr.fetchPriority="high",Kr.onload=()=>{Kr.onerror=Kr.onload=null,Tr({data:Kr})},Kr.onerror=()=>{Kr.onerror=Kr.onload=null,$t.signal.aborted||Ar(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))},Kr.src=na})}(l||(l={})),l.resetRequestQueue();class _{constructor(I){this._transformRequestFn=I}transformRequest(I,ie){return this._transformRequestFn&&this._transformRequestFn(I,ie)||{url:I}}setTransformRequest(I){this._transformRequestFn=I}}function w(Ue){var I=new t.A(3);return I[0]=Ue[0],I[1]=Ue[1],I[2]=Ue[2],I}var A,M=function(Ue,I,ie){return Ue[0]=I[0]-ie[0],Ue[1]=I[1]-ie[1],Ue[2]=I[2]-ie[2],Ue};A=new t.A(3),t.A!=Float32Array&&(A[0]=0,A[1]=0,A[2]=0);var g=function(Ue){var I=Ue[0],ie=Ue[1];return I*I+ie*ie};function b(Ue){let I=[];if(typeof Ue=="string")I.push({id:"default",url:Ue});else if(Ue&&Ue.length>0){let ie=[];for(let{id:we,url:Se}of Ue){let Be=`${we}${Se}`;ie.indexOf(Be)===-1&&(ie.push(Be),I.push({id:we,url:Se}))}}return I}function d(Ue,I,ie){let we=Ue.split("?");return we[0]+=`${I}${ie}`,we.join("?")}(function(){var Ue=new t.A(2);t.A!=Float32Array&&(Ue[0]=0,Ue[1]=0)})();class u{constructor(I,ie,we,Se){this.context=I,this.format=we,this.texture=I.gl.createTexture(),this.update(ie,Se)}update(I,ie,we){let{width:Se,height:Be}=I,dt=!(this.size&&this.size[0]===Se&&this.size[1]===Be||we),{context:St}=this,{gl:Nt}=St;if(this.useMipmap=!!(ie&&ie.useMipmap),Nt.bindTexture(Nt.TEXTURE_2D,this.texture),St.pixelStoreUnpackFlipY.set(!1),St.pixelStoreUnpack.set(1),St.pixelStoreUnpackPremultiplyAlpha.set(this.format===Nt.RGBA&&(!ie||ie.premultiply!==!1)),dt)this.size=[Se,Be],I instanceof HTMLImageElement||I instanceof HTMLCanvasElement||I instanceof HTMLVideoElement||I instanceof ImageData||t.b(I)?Nt.texImage2D(Nt.TEXTURE_2D,0,this.format,this.format,Nt.UNSIGNED_BYTE,I):Nt.texImage2D(Nt.TEXTURE_2D,0,this.format,Se,Be,0,this.format,Nt.UNSIGNED_BYTE,I.data);else{let{x:$t,y:Tr}=we||{x:0,y:0};I instanceof HTMLImageElement||I instanceof HTMLCanvasElement||I instanceof HTMLVideoElement||I instanceof ImageData||t.b(I)?Nt.texSubImage2D(Nt.TEXTURE_2D,0,$t,Tr,Nt.RGBA,Nt.UNSIGNED_BYTE,I):Nt.texSubImage2D(Nt.TEXTURE_2D,0,$t,Tr,Se,Be,Nt.RGBA,Nt.UNSIGNED_BYTE,I.data)}this.useMipmap&&this.isSizePowerOfTwo()&&Nt.generateMipmap(Nt.TEXTURE_2D)}bind(I,ie,we){let{context:Se}=this,{gl:Be}=Se;Be.bindTexture(Be.TEXTURE_2D,this.texture),we!==Be.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(we=Be.LINEAR),I!==this.filter&&(Be.texParameteri(Be.TEXTURE_2D,Be.TEXTURE_MAG_FILTER,I),Be.texParameteri(Be.TEXTURE_2D,Be.TEXTURE_MIN_FILTER,we||I),this.filter=I),ie!==this.wrap&&(Be.texParameteri(Be.TEXTURE_2D,Be.TEXTURE_WRAP_S,ie),Be.texParameteri(Be.TEXTURE_2D,Be.TEXTURE_WRAP_T,ie),this.wrap=ie)}isSizePowerOfTwo(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0}destroy(){let{gl:I}=this.context;I.deleteTexture(this.texture),this.texture=null}}function y(Ue){let{userImage:I}=Ue;return!!(I&&I.render&&I.render())&&(Ue.data.replace(new Uint8Array(I.data.buffer)),!0)}class f 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:we}of this.requestors)we(this._getImagesForIds(ie));this.requestors=[]}}getImage(I){let ie=this.images[I];if(ie&&!ie.data&&ie.spriteData){let we=ie.spriteData;ie.data=new t.R({width:we.width,height:we.height},we.context.getImageData(we.x,we.y,we.width,we.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 we=!0,Se=ie.data||ie.spriteData;return this._validateStretch(ie.stretchX,Se&&Se.width)||(this.fire(new t.j(new Error(`Image "${I}" has invalid "stretchX" value`))),we=!1),this._validateStretch(ie.stretchY,Se&&Se.height)||(this.fire(new t.j(new Error(`Image "${I}" has invalid "stretchY" value`))),we=!1),this._validateContent(ie.content,ie)||(this.fire(new t.j(new Error(`Image "${I}" has invalid "content" value`))),we=!1),we}_validateStretch(I,ie){if(!I)return!0;let we=0;for(let Se of I){if(Se[0]{let Se=!0;if(!this.isLoaded())for(let Be of I)this.images[Be]||(Se=!1);this.isLoaded()||Se?ie(this._getImagesForIds(I)):this.requestors.push({ids:I,promiseResolve:ie})})}_getImagesForIds(I){let ie={};for(let we of I){let Se=this.getImage(we);Se||(this.fire(new t.k("styleimagemissing",{id:we})),Se=this.getImage(we)),Se?ie[we]={data:Se.data.clone(),pixelRatio:Se.pixelRatio,sdf:Se.sdf,version:Se.version,stretchX:Se.stretchX,stretchY:Se.stretchY,content:Se.content,textFitWidth:Se.textFitWidth,textFitHeight:Se.textFitHeight,hasRenderCallback:!!(Se.userImage&&Se.userImage.render)}:t.w(`Image "${we}" 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],we=this.getImage(I);if(!we)return null;if(ie&&ie.position.version===we.version)return ie.position;if(ie)ie.position.version=we.version;else{let Se={w:we.data.width+2,h:we.data.height+2,x:0,y:0},Be=new t.I(Se,we);this.patterns[I]={bin:Se,position:Be}}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 Be in this.patterns)I.push(this.patterns[Be].bin);let{w:ie,h:we}=t.p(I),Se=this.atlasImage;Se.resize({width:ie||1,height:we||1});for(let Be in this.patterns){let{bin:dt}=this.patterns[Be],St=dt.x+1,Nt=dt.y+1,$t=this.getImage(Be).data,Tr=$t.width,Ar=$t.height;t.R.copy($t,Se,{x:0,y:0},{x:St,y:Nt},{width:Tr,height:Ar}),t.R.copy($t,Se,{x:0,y:Ar-1},{x:St,y:Nt-1},{width:Tr,height:1}),t.R.copy($t,Se,{x:0,y:0},{x:St,y:Nt+Ar},{width:Tr,height:1}),t.R.copy($t,Se,{x:Tr-1,y:0},{x:St-1,y:Nt},{width:1,height:Ar}),t.R.copy($t,Se,{x:0,y:0},{x:St+Tr,y:Nt},{width:1,height:Ar})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(I){for(let ie of I){if(this.callbackDispatchedThisFrame[ie])continue;this.callbackDispatchedThisFrame[ie]=!0;let we=this.getImage(ie);we||t.w(`Image with ID: "${ie}" was not found`),y(we)&&this.updateImage(ie,we)}}}let R=1e20;function L(Ue,I,ie,we,Se,Be,dt,St,Nt){for(let $t=I;$t-1);Nt++,Be[Nt]=St,dt[Nt]=$t,dt[Nt+1]=R}for(let St=0,Nt=0;St65535)throw new Error("glyphs > 65535 not supported");if(we.ranges[Be])return{stack:I,id:ie,glyph:Se};if(!this.url)throw new Error("glyphsUrl is not set");if(!we.requests[Be]){let St=F.loadGlyphRange(I,Be,this.url,this.requestManager);we.requests[Be]=St}let dt=yield we.requests[Be];for(let St in dt)this._doesCharSupportLocalGlyph(+St)||(we.glyphs[+St]=dt[+St]);return we.ranges[Be]=!0,{stack:I,id:ie,glyph:dt[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,we){let Se=this.localIdeographFontFamily;if(!Se||!this._doesCharSupportLocalGlyph(we))return;let Be=I.tinySDF;if(!Be){let St="400";/bold/i.test(ie)?St="900":/medium/i.test(ie)?St="500":/light/i.test(ie)&&(St="200"),Be=I.tinySDF=new F.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:Se,fontWeight:St})}let dt=Be.draw(String.fromCharCode(we));return{id:we,bitmap:new t.o({width:dt.width||60,height:dt.height||60},dt.data),metrics:{width:dt.glyphWidth/2||24,height:dt.glyphHeight/2||24,left:dt.glyphLeft/2+.5||0,top:dt.glyphTop/2-27.5||-8,advance:dt.glyphAdvance/2||24,isDoubleResolution:!0}}}}F.loadGlyphRange=function(Ue,I,ie,we){return t._(this,void 0,void 0,function*(){let Se=256*I,Be=Se+255,dt=we.transformRequest(ie.replace("{fontstack}",Ue).replace("{range}",`${Se}-${Be}`),"Glyphs"),St=yield t.l(dt,new AbortController);if(!St||!St.data)throw new Error(`Could not load glyph range. range: ${I}, ${Se}-${Be}`);let Nt={};for(let $t of t.n(St.data))Nt[$t.id]=$t;return Nt})},F.TinySDF=class{constructor({fontSize:Ue=24,buffer:I=3,radius:ie=8,cutoff:we=.25,fontFamily:Se="sans-serif",fontWeight:Be="normal",fontStyle:dt="normal"}={}){this.buffer=I,this.cutoff=we,this.radius=ie;let St=this.size=Ue+4*I,Nt=this._createCanvas(St),$t=this.ctx=Nt.getContext("2d",{willReadFrequently:!0});$t.font=`${dt} ${Be} ${Ue}px ${Se}`,$t.textBaseline="alphabetic",$t.textAlign="left",$t.fillStyle="black",this.gridOuter=new Float64Array(St*St),this.gridInner=new Float64Array(St*St),this.f=new Float64Array(St),this.z=new Float64Array(St+1),this.v=new Uint16Array(St)}_createCanvas(Ue){let I=document.createElement("canvas");return I.width=I.height=Ue,I}draw(Ue){let{width:I,actualBoundingBoxAscent:ie,actualBoundingBoxDescent:we,actualBoundingBoxLeft:Se,actualBoundingBoxRight:Be}=this.ctx.measureText(Ue),dt=Math.ceil(ie),St=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(Be-Se))),Nt=Math.min(this.size-this.buffer,dt+Math.ceil(we)),$t=St+2*this.buffer,Tr=Nt+2*this.buffer,Ar=Math.max($t*Tr,0),Kr=new Uint8ClampedArray(Ar),na={data:Kr,width:$t,height:Tr,glyphWidth:St,glyphHeight:Nt,glyphTop:dt,glyphLeft:0,glyphAdvance:I};if(St===0||Nt===0)return na;let{ctx:He,buffer:Je,gridInner:lt,gridOuter:vt}=this;He.clearRect(Je,Je,St,Nt),He.fillText(Ue,Je,Je+dt);let Lt=He.getImageData(Je,Je,St,Nt);vt.fill(R,0,Ar),lt.fill(0,0,Ar);for(let At=0;At0?Er*Er:0,lt[yr]=Er<0?Er*Er:0}}L(vt,0,0,$t,Tr,$t,this.f,this.v,this.z),L(lt,Je,Je,St,Nt,$t,this.f,this.v,this.z);for(let At=0;At1&&(Nt=I[++St]);let Tr=Math.abs($t-Nt.left),Ar=Math.abs($t-Nt.right),Kr=Math.min(Tr,Ar),na,He=Be/we*(Se+1);if(Nt.isDash){let Je=Se-Math.abs(He);na=Math.sqrt(Kr*Kr+Je*Je)}else na=Se-Math.sqrt(Kr*Kr+He*He);this.data[dt+$t]=Math.max(0,Math.min(255,na+128))}}}addRegularDash(I){for(let St=I.length-1;St>=0;--St){let Nt=I[St],$t=I[St+1];Nt.zeroLength?I.splice(St,1):$t&&$t.isDash===Nt.isDash&&($t.left=Nt.left,I.splice(St,1))}let ie=I[0],we=I[I.length-1];ie.isDash===we.isDash&&(ie.left=we.left-this.width,we.right=ie.right+this.width);let Se=this.width*this.nextRow,Be=0,dt=I[Be];for(let St=0;St1&&(dt=I[++Be]);let Nt=Math.abs(St-dt.left),$t=Math.abs(St-dt.right),Tr=Math.min(Nt,$t);this.data[Se+St]=Math.max(0,Math.min(255,(dt.isDash?Tr:-Tr)+128))}}addDash(I,ie){let we=ie?7:0,Se=2*we+1;if(this.nextRow+Se>this.height)return t.w("LineAtlas out of space"),null;let Be=0;for(let St=0;St{ie.terminate()}),this.workers=null)}isPreloaded(){return!!this.active[$]}numActive(){return Object.keys(this.active).length}}let le=Math.floor(n.hardwareConcurrency/2),fe,V;function Y(){return fe||(fe=new se),fe}se.workerCount=t.C(globalThis)?Math.max(Math.min(le,3),1):1;class ee{constructor(I,ie){this.workerPool=I,this.actors=[],this.currentActor=0,this.id=ie;let we=this.workerPool.acquire(ie);for(let Se=0;Se{ie.remove()}),this.actors=[],I&&this.workerPool.release(this.id)}registerMessageHandler(I,ie){for(let we of this.actors)we.registerMessageHandler(I,ie)}}function q(){return V||(V=new ee(Y(),t.G),V.registerMessageHandler("GR",(Ue,I,ie)=>t.m(I,ie))),V}function oe(Ue,I){let ie=t.H();return t.J(ie,ie,[1,1,0]),t.K(ie,ie,[.5*Ue.width,.5*Ue.height,1]),t.L(ie,ie,Ue.calculatePosMatrix(I.toUnwrapped()))}function ae(Ue,I,ie,we,Se,Be){let dt=function(Ar,Kr,na){if(Ar)for(let He of Ar){let Je=Kr[He];if(Je&&Je.source===na&&Je.type==="fill-extrusion")return!0}else for(let He in Kr){let Je=Kr[He];if(Je.source===na&&Je.type==="fill-extrusion")return!0}return!1}(Se&&Se.layers,I,Ue.id),St=Be.maxPitchScaleFactor(),Nt=Ue.tilesIn(we,St,dt);Nt.sort(j);let $t=[];for(let Ar of Nt)$t.push({wrappedTileID:Ar.tileID.wrapped().key,queryResults:Ar.tile.queryRenderedFeatures(I,ie,Ue._state,Ar.queryGeometry,Ar.cameraQueryGeometry,Ar.scale,Se,Be,St,oe(Ue.transform,Ar.tileID))});let Tr=function(Ar){let Kr={},na={};for(let He of Ar){let Je=He.queryResults,lt=He.wrappedTileID,vt=na[lt]=na[lt]||{};for(let Lt in Je){let At=Je[Lt],zt=vt[Lt]=vt[Lt]||{},cr=Kr[Lt]=Kr[Lt]||[];for(let yr of At)zt[yr.featureIndex]||(zt[yr.featureIndex]=!0,cr.push(yr))}}return Kr}($t);for(let Ar in Tr)Tr[Ar].forEach(Kr=>{let na=Kr.feature,He=Ue.getFeatureState(na.layer["source-layer"],na.id);na.source=na.layer.source,na.layer["source-layer"]&&(na.sourceLayer=na.layer["source-layer"]),na.state=He});return Tr}function j(Ue,I){let ie=Ue.tileID,we=I.tileID;return ie.overscaledZ-we.overscaledZ||ie.canonical.y-we.canonical.y||ie.wrap-we.wrap||ie.canonical.x-we.canonical.x}function Q(Ue,I,ie){return t._(this,void 0,void 0,function*(){let we=Ue;if(Ue.url?we=(yield t.h(I.transformRequest(Ue.url,"Source"),ie)).data:yield n.frameAsync(ie),!we)return null;let Se=t.M(t.e(we,Ue),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in we&&we.vector_layers&&(Se.vectorLayerIds=we.vector_layers.map(Be=>Be.id)),Se})}class re{constructor(I,ie){I&&(ie?this.setSouthWest(I).setNorthEast(ie):Array.isArray(I)&&(I.length===4?this.setSouthWest([I[0],I[1]]).setNorthEast([I[2],I[3]]):this.setSouthWest(I[0]).setNorthEast(I[1])))}setNorthEast(I){return this._ne=I instanceof t.N?new t.N(I.lng,I.lat):t.N.convert(I),this}setSouthWest(I){return this._sw=I instanceof t.N?new t.N(I.lng,I.lat):t.N.convert(I),this}extend(I){let ie=this._sw,we=this._ne,Se,Be;if(I instanceof t.N)Se=I,Be=I;else{if(!(I instanceof re))return Array.isArray(I)?I.length===4||I.every(Array.isArray)?this.extend(re.convert(I)):this.extend(t.N.convert(I)):I&&("lng"in I||"lon"in I)&&"lat"in I?this.extend(t.N.convert(I)):this;if(Se=I._sw,Be=I._ne,!Se||!Be)return this}return ie||we?(ie.lng=Math.min(Se.lng,ie.lng),ie.lat=Math.min(Se.lat,ie.lat),we.lng=Math.max(Be.lng,we.lng),we.lat=Math.max(Be.lat,we.lat)):(this._sw=new t.N(Se.lng,Se.lat),this._ne=new t.N(Be.lng,Be.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:we}=t.N.convert(I),Se=this._sw.lng<=ie&&ie<=this._ne.lng;return this._sw.lng>this._ne.lng&&(Se=this._sw.lng>=ie&&ie>=this._ne.lng),this._sw.lat<=we&&we<=this._ne.lat&&Se}static convert(I){return I instanceof re?I:I&&new re(I)}static fromLngLat(I,ie=0){let we=360*ie/40075017,Se=we/Math.cos(Math.PI/180*I.lat);return new re(new t.N(I.lng-Se,I.lat-we),new t.N(I.lng+Se,I.lat+we))}adjustAntiMeridian(){let I=new t.N(this._sw.lng,this._sw.lat),ie=new t.N(this._ne.lng,this._ne.lat);return new re(I,I.lng>ie.lng?new t.N(ie.lng+360,ie.lat):ie)}}class ce{constructor(I,ie,we){this.bounds=re.convert(this.validateBounds(I)),this.minzoom=ie||0,this.maxzoom=we||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),we=Math.floor(t.O(this.bounds.getWest())*ie),Se=Math.floor(t.Q(this.bounds.getNorth())*ie),Be=Math.ceil(t.O(this.bounds.getEast())*ie),dt=Math.ceil(t.Q(this.bounds.getSouth())*ie);return I.x>=we&&I.x=Se&&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),we={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};we.request.collectResourceTiming=this._collectResourceTiming;let Se="RT";if(I.actor&&I.state!=="expired"){if(I.state==="loading")return new Promise((Be,dt)=>{I.reloadPromise={resolve:Be,reject:dt}})}else I.actor=this.dispatcher.getActor(),Se="LT";I.abortController=new AbortController;try{let Be=yield I.actor.sendAsync({type:Se,data:we},I.abortController);if(delete I.abortController,I.aborted)return;this._afterTileLoadWorkerResponse(I,Be)}catch(Be){if(delete I.abortController,I.aborted)return;if(Be&&Be.status!==404)throw Be;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 we=I.reloadPromise;I.reloadPromise=null,this.loadTile(I).then(we.resolve).catch(we.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 Ae extends t.E{constructor(I,ie,we,Se){super(),this.id=I,this.dispatcher=we,this.setEventedParent(Se),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=t.e({type:"raster"},ie),t.e(this,t.M(ie,["url","scheme","tileSize"]))}load(){return t._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new t.k("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{let I=yield Q(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,I&&(t.e(this,I),I.bounds&&(this.tileBounds=new ce(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 we=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(we&&we.data){this.map._refreshExpiredTiles&&we.cacheControl&&we.expires&&I.setExpiryData({cacheControl:we.cacheControl,expires:we.expires});let Se=this.map.painter.context,Be=Se.gl,dt=we.data;I.texture=this.map.painter.getTileTexture(dt.width),I.texture?I.texture.update(dt,{useMipmap:!0}):(I.texture=new u(Se,dt,Be.RGBA,{useMipmap:!0}),I.texture.bind(Be.LINEAR,Be.CLAMP_TO_EDGE,Be.LINEAR_MIPMAP_NEAREST)),I.state="loaded"}}catch(we){if(delete I.abortController,I.aborted)I.state="unloaded";else if(we)throw I.state="errored",we}})}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 De extends Ae{constructor(I,ie,we,Se){super(I,ie,we,Se),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),we=this.map._requestManager.transformRequest(ie,"Tile");I.neighboringTiles=this._getNeighboringTiles(I.tileID),I.abortController=new AbortController;try{let Se=yield l.getImage(we,I.abortController,this.map._refreshExpiredTiles);if(delete I.abortController,I.aborted)return void(I.state="unloaded");if(Se&&Se.data){let Be=Se.data;this.map._refreshExpiredTiles&&Se.cacheControl&&Se.expires&&I.setExpiryData({cacheControl:Se.cacheControl,expires:Se.expires});let dt=t.b(Be)&&t.U()?Be:yield this.readImageNow(Be),St={type:this.type,uid:I.uid,source:this.id,rawImageData:dt,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 Nt=yield I.actor.sendAsync({type:"LDT",data:St});I.dem=Nt,I.needsHillshadePrepare=!0,I.needsTerrainPrepare=!0,I.state="loaded"}}}catch(Se){if(delete I.abortController,I.aborted)I.state="unloaded";else if(Se)throw I.state="errored",Se}})}readImageNow(I){return t._(this,void 0,void 0,function*(){if(typeof VideoFrame<"u"&&t.V()){let ie=I.width+2,we=I.height+2;try{return new t.R({width:ie,height:we},yield t.W(I,-1,-1,ie,we))}catch{}}return n.getImageData(I,1)})}_getNeighboringTiles(I){let ie=I.canonical,we=Math.pow(2,ie.z),Se=(ie.x-1+we)%we,Be=ie.x===0?I.wrap-1:I.wrap,dt=(ie.x+1+we)%we,St=ie.x+1===we?I.wrap+1:I.wrap,Nt={};return Nt[new t.S(I.overscaledZ,Be,ie.z,Se,ie.y).key]={backfilled:!1},Nt[new t.S(I.overscaledZ,St,ie.z,dt,ie.y).key]={backfilled:!1},ie.y>0&&(Nt[new t.S(I.overscaledZ,Be,ie.z,Se,ie.y-1).key]={backfilled:!1},Nt[new t.S(I.overscaledZ,I.wrap,ie.z,ie.x,ie.y-1).key]={backfilled:!1},Nt[new t.S(I.overscaledZ,St,ie.z,dt,ie.y-1).key]={backfilled:!1}),ie.y+10&&t.e(Be,{resourceTiming:Se}),this.fire(new t.k("data",Object.assign(Object.assign({},Be),{sourceDataType:"metadata"}))),this.fire(new t.k("data",Object.assign(Object.assign({},Be),{sourceDataType:"content"})))}catch(we){if(this._pendingLoads--,this._removed)return void this.fire(new t.k("dataabort",{dataType:"source"}));this.fire(new t.j(we))}})}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 we={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 Se=yield this.actor.sendAsync({type:ie,data:we},I.abortController);delete I.abortController,I.unloadVectorData(),I.aborted||I.loadVectorData(Se,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 Ze=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,we,Se){super(),this.id=I,this.dispatcher=we,this.coordinates=ie.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(Se),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(Se){let Be=1/0,dt=1/0,St=-1/0,Nt=-1/0;for(let Kr of Se)Be=Math.min(Be,Kr.x),dt=Math.min(dt,Kr.y),St=Math.max(St,Kr.x),Nt=Math.max(Nt,Kr.y);let $t=Math.max(St-Be,Nt-dt),Tr=Math.max(0,Math.floor(-Math.log($t)/Math.LN2)),Ar=Math.pow(2,Tr);return new t.a1(Tr,Math.floor((Be+St)/2*Ar),Math.floor((dt+Nt)/2*Ar))}(ie),this.minzoom=this.maxzoom=this.tileID.z;let we=ie.map(Se=>this.tileID.getTilePoint(Se)._round());return this._boundsArray=new t.$,this._boundsArray.emplaceBack(we[0].x,we[0].y,0,0),this._boundsArray.emplaceBack(we[1].x,we[1].y,t.X,0),this._boundsArray.emplaceBack(we[3].x,we[3].y,0,t.X),this._boundsArray.emplaceBack(we[2].x,we[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,Ze.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 we=!1;for(let Se in this.tiles){let Be=this.tiles[Se];Be.state!=="loaded"&&(Be.state="loaded",Be.texture=this.texture,we=!0)}we&&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,we,Se){super(I,ie,we,Se),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,Ze.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 we=!1;for(let Se in this.tiles){let Be=this.tiles[Se];Be.state!=="loaded"&&(Be.state="loaded",Be.texture=this.texture,we=!0)}we&&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 rt extends at{constructor(I,ie,we,Se){super(I,ie,we,Se),ie.coordinates?Array.isArray(ie.coordinates)&&ie.coordinates.length===4&&!ie.coordinates.some(Be=>!Array.isArray(Be)||Be.length!==2||Be.some(dt=>typeof dt!="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,we=ie.gl;this.boundsBuffer||(this.boundsBuffer=ie.createVertexBuffer(this._boundsArray,Ze.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,we.RGBA,{premultiply:!0});let Se=!1;for(let Be in this.tiles){let dt=this.tiles[Be];dt.state!=="loaded"&&(dt.state="loaded",dt.texture=this.texture,Se=!0)}Se&&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 st={},Me=Ue=>{switch(Ue){case"geojson":return ze;case"image":return at;case"raster":return Ae;case"raster-dem":return De;case"vector":return be;case"video":return nt;case"canvas":return rt}return st[Ue]},ye="RTLPluginLoaded";class he extends t.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=q()}_syncState(I){return this.status=I,this.dispatcher.broadcast("SRPS",{pluginStatus:I,pluginURL:this.url}).catch(ie=>{throw this.status="error",ie})}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null}setRTLTextPlugin(I){return t._(this,arguments,void 0,function*(ie,we=!1){if(this.url)throw new Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=n.resolveURL(ie),!this.url)throw new Error(`requested url ${ie} is invalid`);if(this.status==="unavailable"){if(!we)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(ye))})}lazyLoad(){this.status==="unavailable"?this.status="requested":this.status==="deferred"&&this._requestImport()}}let Oe=null;function tt(){return Oe||(Oe=new he),Oe}class ot{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;ieBe.getLayer($t)).filter(Boolean);if(Nt.length!==0){St.layers=Nt,St.stateDependentLayerIds&&(St.stateDependentLayers=St.stateDependentLayerIds.map($t=>Nt.filter(Tr=>Tr.id===$t)[0]));for(let $t of Nt)dt[$t.id]=St}}return dt}(I.buckets,ie.style),this.hasSymbolBuckets=!1;for(let Se in this.buckets){let Be=this.buckets[Se];if(Be instanceof t.a6){if(this.hasSymbolBuckets=!0,!we)break;Be.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(let Se in this.buckets){let Be=this.buckets[Se];if(Be instanceof t.a6&&Be.hasRTLText){this.hasRTLText=!0,tt().lazyLoad();break}}this.queryPadding=0;for(let Se in this.buckets){let Be=this.buckets[Se];this.queryPadding=Math.max(this.queryPadding,ie.style.getLayer(Se).queryRadius(Be))}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 we in this.buckets){let Se=this.buckets[we];Se.uploadPending()&&Se.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,we,Se,Be,dt,St,Nt,$t,Tr){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:Se,cameraQueryGeometry:Be,scale:dt,tileSize:this.tileSize,pixelPosMatrix:Tr,transform:Nt,params:St,queryPadding:this.queryPadding*$t},I,ie,we):{}}querySourceFeatures(I,ie){let we=this.latestFeatureIndex;if(!we||!we.rawTileData)return;let Se=we.loadVTLayers(),Be=ie&&ie.sourceLayer?ie.sourceLayer:"",dt=Se._geojsonTileLayer||Se[Be];if(!dt)return;let St=t.a7(ie&&ie.filter),{z:Nt,x:$t,y:Tr}=this.tileID.canonical,Ar={z:Nt,x:$t,y:Tr};for(let Kr=0;Krwe)Se=!1;else if(ie)if(this.expirationTime{this.remove(I,Be)},we)),this.data[Se].push(Be),this.order.push(Se),this.order.length>this.max){let dt=this._getAndRemoveByKey(this.order[0]);dt&&this.onRemove(dt)}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 we=I.wrapped().key,Se=ie===void 0?0:this.data[we].indexOf(ie),Be=this.data[we][Se];return this.data[we].splice(Se,1),Be.timeout&&clearTimeout(Be.timeout),this.data[we].length===0&&delete this.data[we],this.onRemove(Be.value),this.order.splice(this.order.indexOf(we),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 we in this.data)for(let Se of this.data[we])I(Se.value)||ie.push(Se);for(let we of ie)this.remove(we.value.tileID,we)}}class Pt{constructor(){this.state={},this.stateChanges={},this.deletedStates={}}updateState(I,ie,we){let Se=String(ie);if(this.stateChanges[I]=this.stateChanges[I]||{},this.stateChanges[I][Se]=this.stateChanges[I][Se]||{},t.e(this.stateChanges[I][Se],we),this.deletedStates[I]===null){this.deletedStates[I]={};for(let Be in this.state[I])Be!==Se&&(this.deletedStates[I][Be]=null)}else if(this.deletedStates[I]&&this.deletedStates[I][Se]===null){this.deletedStates[I][Se]={};for(let Be in this.state[I][Se])we[Be]||(this.deletedStates[I][Se][Be]=null)}else for(let Be in we)this.deletedStates[I]&&this.deletedStates[I][Se]&&this.deletedStates[I][Se][Be]===null&&delete this.deletedStates[I][Se][Be]}removeFeatureState(I,ie,we){if(this.deletedStates[I]===null)return;let Se=String(ie);if(this.deletedStates[I]=this.deletedStates[I]||{},we&&ie!==void 0)this.deletedStates[I][Se]!==null&&(this.deletedStates[I][Se]=this.deletedStates[I][Se]||{},this.deletedStates[I][Se][we]=null);else if(ie!==void 0)if(this.stateChanges[I]&&this.stateChanges[I][Se])for(we in this.deletedStates[I][Se]={},this.stateChanges[I][Se])this.deletedStates[I][Se][we]=null;else this.deletedStates[I][Se]=null;else this.deletedStates[I]=null}getState(I,ie){let we=String(ie),Se=t.e({},(this.state[I]||{})[we],(this.stateChanges[I]||{})[we]);if(this.deletedStates[I]===null)return{};if(this.deletedStates[I]){let Be=this.deletedStates[I][ie];if(Be===null)return{};for(let dt in Be)delete Se[dt]}return Se}initializeTileState(I,ie){I.setFeatureState(this.state,ie)}coalesceChanges(I,ie){let we={};for(let Se in this.stateChanges){this.state[Se]=this.state[Se]||{};let Be={};for(let dt in this.stateChanges[Se])this.state[Se][dt]||(this.state[Se][dt]={}),t.e(this.state[Se][dt],this.stateChanges[Se][dt]),Be[dt]=this.state[Se][dt];we[Se]=Be}for(let Se in this.deletedStates){this.state[Se]=this.state[Se]||{};let Be={};if(this.deletedStates[Se]===null)for(let dt in this.state[Se])Be[dt]={},this.state[Se][dt]={};else for(let dt in this.deletedStates[Se]){if(this.deletedStates[Se][dt]===null)this.state[Se][dt]={};else for(let St of Object.keys(this.deletedStates[Se][dt]))delete this.state[Se][dt][St];Be[dt]=this.state[Se][dt]}we[Se]=we[Se]||{},t.e(we[Se],Be)}if(this.stateChanges={},this.deletedStates={},Object.keys(we).length!==0)for(let Se in I)I[Se].setFeatureState(we,ie)}}class It extends t.E{constructor(I,ie,we){super(),this.id=I,this.dispatcher=we,this.on("data",Se=>this._dataHandler(Se)),this.on("dataloading",()=>{this._sourceErrored=!1}),this.on("error",()=>{this._sourceErrored=this._source.loaded()}),this._source=((Se,Be,dt,St)=>{let Nt=new(Me(Be.type))(Se,Be,dt,St);if(Nt.id!==Se)throw new Error(`Expected Source id to be ${Se} instead of ${Nt.id}`);return Nt})(I,ie,we,this),this._tiles={},this._cache=new Qe(0,Se=>this._unloadTile(Se)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new Pt,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,we){return t._(this,void 0,void 0,function*(){try{yield this._source.loadTile(I),this._tileLoaded(I,ie,we)}catch(Se){I.state="errored",Se.status!==404?this._source.fire(new t.j(Se,{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 we=this._tiles[ie];we.upload(I),we.prepare(this.map.style.imageManager)}}getIds(){return Object.values(this._tiles).map(I=>I.tileID).sort(qt).map(I=>I.key)}getRenderableIds(I){let ie=[];for(let we in this._tiles)this._isIdRenderable(we,I)&&ie.push(this._tiles[we]);return I?ie.sort((we,Se)=>{let Be=we.tileID,dt=Se.tileID,St=new t.P(Be.canonical.x,Be.canonical.y)._rotate(this.transform.angle),Nt=new t.P(dt.canonical.x,dt.canonical.y)._rotate(this.transform.angle);return Be.overscaledZ-dt.overscaledZ||Nt.y-St.y||Nt.x-St.x}).map(we=>we.tileID.key):ie.map(we=>we.tileID).sort(qt).map(we=>we.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 we=this._tiles[I];we&&(we.state!=="loading"&&(we.state=ie),yield this._loadTile(we,I,ie))})}_tileLoaded(I,ie,we){I.timeAdded=n.now(),we==="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 Se=0;Se1||(Math.abs(dt)>1&&(Math.abs(dt+Nt)===1?dt+=Nt:Math.abs(dt-Nt)===1&&(dt-=Nt)),Be.dem&&Se.dem&&(Se.dem.backfillBorder(Be.dem,dt,St),Se.neighboringTiles&&Se.neighboringTiles[$t]&&(Se.neighboringTiles[$t].backfilled=!0)))}}getTile(I){return this.getTileByID(I.key)}getTileByID(I){return this._tiles[I]}_retainLoadedChildren(I,ie,we,Se){for(let Be in this._tiles){let dt=this._tiles[Be];if(Se[Be]||!dt.hasData()||dt.tileID.overscaledZ<=ie||dt.tileID.overscaledZ>we)continue;let St=dt.tileID;for(;dt&&dt.tileID.overscaledZ>ie+1;){let $t=dt.tileID.scaledTo(dt.tileID.overscaledZ-1);dt=this._tiles[$t.key],dt&&dt.hasData()&&(St=$t)}let Nt=St;for(;Nt.overscaledZ>ie;)if(Nt=Nt.scaledTo(Nt.overscaledZ-1),I[Nt.key]){Se[St.key]=St;break}}}findLoadedParent(I,ie){if(I.key in this._loadedParentTiles){let we=this._loadedParentTiles[I.key];return we&&we.tileID.overscaledZ>=ie?we:null}for(let we=I.overscaledZ-1;we>=ie;we--){let Se=I.scaledTo(we),Be=this._getLoadedTile(Se);if(Be)return Be}}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,we=Math.ceil(I.height/this._source.tileSize)+1,Se=Math.floor(ie*we*(this._maxTileCacheZoomLevels===null?t.a.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),Be=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,Se):Se;this._cache.setMaxSize(Be)}handleWrapJump(I){let ie=Math.round((I-(this._prevLng===void 0?I:this._prevLng))/360);if(this._prevLng=I,ie){let we={};for(let Se in this._tiles){let Be=this._tiles[Se];Be.tileID=Be.tileID.unwrapTo(Be.tileID.wrap+ie),we[Be.tileID.key]=Be}this._tiles=we;for(let Se in this._timers)clearTimeout(this._timers[Se]),delete this._timers[Se];for(let Se in this._tiles)this._setTileReloadTimer(Se,this._tiles[Se])}}_updateCoveredAndRetainedTiles(I,ie,we,Se,Be,dt){let St={},Nt={},$t=Object.keys(I),Tr=n.now();for(let Ar of $t){let Kr=I[Ar],na=this._tiles[Ar];if(!na||na.fadeEndTime!==0&&na.fadeEndTime<=Tr)continue;let He=this.findLoadedParent(Kr,ie),Je=this.findLoadedSibling(Kr),lt=He||Je||null;lt&&(this._addTile(lt.tileID),St[lt.tileID.key]=lt.tileID),Nt[Ar]=Kr}this._retainLoadedChildren(Nt,Se,we,I);for(let Ar in St)I[Ar]||(this._coveredTiles[Ar]=!0,I[Ar]=St[Ar]);if(dt){let Ar={},Kr={};for(let na of Be)this._tiles[na.key].hasData()?Ar[na.key]=na:Kr[na.key]=na;for(let na in Kr){let He=Kr[na].children(this._source.maxzoom);this._tiles[He[0].key]&&this._tiles[He[1].key]&&this._tiles[He[2].key]&&this._tiles[He[3].key]&&(Ar[He[0].key]=I[He[0].key]=He[0],Ar[He[1].key]=I[He[1].key]=He[1],Ar[He[2].key]=I[He[2].key]=He[2],Ar[He[3].key]=I[He[3].key]=He[3],delete Kr[na])}for(let na in Kr){let He=Kr[na],Je=this.findLoadedParent(He,this._source.minzoom),lt=this.findLoadedSibling(He),vt=Je||lt||null;if(vt){Ar[vt.tileID.key]=I[vt.tileID.key]=vt.tileID;for(let Lt in Ar)Ar[Lt].isChildOf(vt.tileID)&&delete Ar[Lt]}}for(let na in this._tiles)Ar[na]||(this._coveredTiles[na]=!0)}}update(I,ie){if(!this._sourceLoaded||this._paused)return;let we;this.transform=I,this.terrain=ie,this.updateCacheSize(I),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used||this.usedForTerrain?this._source.tileID?we=I.getVisibleUnwrappedCoordinates(this._source.tileID).map(Tr=>new t.S(Tr.canonical.z,Tr.wrap,Tr.canonical.z,Tr.canonical.x,Tr.canonical.y)):(we=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&&(we=we.filter(Tr=>this._source.hasTile(Tr)))):we=[];let Se=I.coveringZoomLevel(this._source),Be=Math.max(Se-It.maxOverzooming,this._source.minzoom),dt=Math.max(Se+It.maxUnderzooming,this._source.minzoom);if(this.usedForTerrain){let Tr={};for(let Ar of we)if(Ar.canonical.z>this._source.minzoom){let Kr=Ar.scaledTo(Ar.canonical.z-1);Tr[Kr.key]=Kr;let na=Ar.scaledTo(Math.max(this._source.minzoom,Math.min(Ar.canonical.z,5)));Tr[na.key]=na}we=we.concat(Object.values(Tr))}let St=we.length===0&&!this._updated&&this._didEmitContent;this._updated=!0,St&&this.fire(new t.k("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));let Nt=this._updateRetainedTiles(we,Se);Wt(this._source.type)&&this._updateCoveredAndRetainedTiles(Nt,Be,dt,Se,we,ie);for(let Tr in Nt)this._tiles[Tr].clearFadeHold();let $t=t.ab(this._tiles,Nt);for(let Tr of $t){let Ar=this._tiles[Tr];Ar.hasSymbolBuckets&&!Ar.holdingForFade()?Ar.setHoldDuration(this.map._fadeDuration):Ar.hasSymbolBuckets&&!Ar.symbolFadeFinished()||this._removeTile(Tr)}this._updateLoadedParentTileCache(),this._updateLoadedSiblingTileCache()}releaseSymbolFadeTiles(){for(let I in this._tiles)this._tiles[I].holdingForFade()&&this._removeTile(I)}_updateRetainedTiles(I,ie){var we;let Se={},Be={},dt=Math.max(ie-It.maxOverzooming,this._source.minzoom),St=Math.max(ie+It.maxUnderzooming,this._source.minzoom),Nt={};for(let $t of I){let Tr=this._addTile($t);Se[$t.key]=$t,Tr.hasData()||iethis._source.maxzoom){let Kr=$t.children(this._source.maxzoom)[0],na=this.getTile(Kr);if(na&&na.hasData()){Se[Kr.key]=Kr;continue}}else{let Kr=$t.children(this._source.maxzoom);if(Se[Kr[0].key]&&Se[Kr[1].key]&&Se[Kr[2].key]&&Se[Kr[3].key])continue}let Ar=Tr.wasRequested();for(let Kr=$t.overscaledZ-1;Kr>=dt;--Kr){let na=$t.scaledTo(Kr);if(Be[na.key])break;if(Be[na.key]=!0,Tr=this.getTile(na),!Tr&&Ar&&(Tr=this._addTile(na)),Tr){let He=Tr.hasData();if((He||!(!((we=this.map)===null||we===void 0)&&we.cancelPendingTileRequestsWhileZooming)||Ar)&&(Se[na.key]=na),Ar=Tr.wasRequested(),He)break}}}return Se}_updateLoadedParentTileCache(){this._loadedParentTiles={};for(let I in this._tiles){let ie=[],we,Se=this._tiles[I].tileID;for(;Se.overscaledZ>0;){if(Se.key in this._loadedParentTiles){we=this._loadedParentTiles[Se.key];break}ie.push(Se.key);let Be=Se.scaledTo(Se.overscaledZ-1);if(we=this._getLoadedTile(Be),we)break;Se=Be}for(let Be of ie)this._loadedParentTiles[Be]=we}}_updateLoadedSiblingTileCache(){this._loadedSiblingTiles={};for(let I in this._tiles){let ie=this._tiles[I].tileID,we=this._getLoadedTile(ie);this._loadedSiblingTiles[ie.key]=we}}_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 we=ie;return ie||(ie=new ot(I,this._source.tileSize*I.overscaleFactor()),this._loadTile(ie,I.key,ie.state)),ie.uses++,this._tiles[I.key]=ie,we||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 we=ie.getExpiryTimeout();we&&(this._timers[I]=setTimeout(()=>{this._reloadTile(I,"expired"),delete this._timers[I]},we))}_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,we){let Se=[],Be=this.transform;if(!Be)return Se;let dt=we?Be.getCameraQueryGeometry(I):I,St=I.map(He=>Be.pointCoordinate(He,this.terrain)),Nt=dt.map(He=>Be.pointCoordinate(He,this.terrain)),$t=this.getIds(),Tr=1/0,Ar=1/0,Kr=-1/0,na=-1/0;for(let He of Nt)Tr=Math.min(Tr,He.x),Ar=Math.min(Ar,He.y),Kr=Math.max(Kr,He.x),na=Math.max(na,He.y);for(let He=0;He<$t.length;He++){let Je=this._tiles[$t[He]];if(Je.holdingForFade())continue;let lt=Je.tileID,vt=Math.pow(2,Be.zoom-Je.tileID.overscaledZ),Lt=ie*Je.queryPadding*t.X/Je.tileSize/vt,At=[lt.getTilePoint(new t.Z(Tr,Ar)),lt.getTilePoint(new t.Z(Kr,na))];if(At[0].x-Lt=0&&At[1].y+Lt>=0){let zt=St.map(yr=>lt.getTilePoint(yr)),cr=Nt.map(yr=>lt.getTilePoint(yr));Se.push({tile:Je,tileID:lt,queryGeometry:zt,cameraQueryGeometry:cr,scale:vt})}}return Se}getVisibleCoordinates(I){let ie=this.getRenderableIds(I).map(we=>this._tiles[we].tileID);for(let we of ie)we.posMatrix=this.transform.calculatePosMatrix(we.toUnwrapped());return ie}hasTransition(){if(this._source.hasTransition())return!0;if(Wt(this._source.type)){let I=n.now();for(let ie in this._tiles)if(this._tiles[ie].fadeEndTime>=I)return!0}return!1}setFeatureState(I,ie,we){this._state.updateState(I=I||"_geojsonTileLayer",ie,we)}removeFeatureState(I,ie,we){this._state.removeFeatureState(I=I||"_geojsonTileLayer",ie,we)}getFeatureState(I,ie){return this._state.getState(I=I||"_geojsonTileLayer",ie)}setDependencies(I,ie,we){let Se=this._tiles[I];Se&&Se.setDependencies(ie,we)}reloadTilesForDependencies(I,ie){for(let we in this._tiles)this._tiles[we].hasDependency(I,ie)&&this._reloadTile(we,"reloading");this._cache.filter(we=>!we.hasDependency(I,ie))}}function qt(Ue,I){let ie=Math.abs(2*Ue.wrap)-+(Ue.wrap<0),we=Math.abs(2*I.wrap)-+(I.wrap<0);return Ue.overscaledZ-I.overscaledZ||we-ie||I.canonical.y-Ue.canonical.y||I.canonical.x-Ue.canonical.x}function Wt(Ue){return Ue==="raster"||Ue==="image"||Ue==="video"}It.maxOverzooming=10,It.maxUnderzooming=3;class kr{constructor(I,ie){this.reset(I,ie)}reset(I,ie){this.points=I||[],this._distances=[0];for(let we=1;we0?(Se-dt)/St:0;return this.points[Be].mult(1-Nt).add(this.points[ie].mult(Nt))}}function mr(Ue,I){let ie=!0;return Ue==="always"||Ue!=="never"&&I!=="never"||(ie=!1),ie}class qr{constructor(I,ie,we){let Se=this.boxCells=[],Be=this.circleCells=[];this.xCellCount=Math.ceil(I/we),this.yCellCount=Math.ceil(ie/we);for(let dt=0;dtthis.width||Se<0||ie>this.height)return[];let Nt=[];if(I<=0&&ie<=0&&this.width<=we&&this.height<=Se){if(Be)return[{key:null,x1:I,y1:ie,x2:we,y2:Se}];for(let $t=0;$t0}hitTestCircle(I,ie,we,Se,Be){let dt=I-we,St=I+we,Nt=ie-we,$t=ie+we;if(St<0||dt>this.width||$t<0||Nt>this.height)return!1;let Tr=[];return this._forEachCell(dt,Nt,St,$t,this._queryCellCircle,Tr,{hitTest:!0,overlapMode:Se,circle:{x:I,y:ie,radius:we},seenUids:{box:{},circle:{}}},Be),Tr.length>0}_queryCell(I,ie,we,Se,Be,dt,St,Nt){let{seenUids:$t,hitTest:Tr,overlapMode:Ar}=St,Kr=this.boxCells[Be];if(Kr!==null){let He=this.bboxes;for(let Je of Kr)if(!$t.box[Je]){$t.box[Je]=!0;let lt=4*Je,vt=this.boxKeys[Je];if(I<=He[lt+2]&&ie<=He[lt+3]&&we>=He[lt+0]&&Se>=He[lt+1]&&(!Nt||Nt(vt))&&(!Tr||!mr(Ar,vt.overlapMode))&&(dt.push({key:vt,x1:He[lt],y1:He[lt+1],x2:He[lt+2],y2:He[lt+3]}),Tr))return!0}}let na=this.circleCells[Be];if(na!==null){let He=this.circles;for(let Je of na)if(!$t.circle[Je]){$t.circle[Je]=!0;let lt=3*Je,vt=this.circleKeys[Je];if(this._circleAndRectCollide(He[lt],He[lt+1],He[lt+2],I,ie,we,Se)&&(!Nt||Nt(vt))&&(!Tr||!mr(Ar,vt.overlapMode))){let Lt=He[lt],At=He[lt+1],zt=He[lt+2];if(dt.push({key:vt,x1:Lt-zt,y1:At-zt,x2:Lt+zt,y2:At+zt}),Tr)return!0}}}return!1}_queryCellCircle(I,ie,we,Se,Be,dt,St,Nt){let{circle:$t,seenUids:Tr,overlapMode:Ar}=St,Kr=this.boxCells[Be];if(Kr!==null){let He=this.bboxes;for(let Je of Kr)if(!Tr.box[Je]){Tr.box[Je]=!0;let lt=4*Je,vt=this.boxKeys[Je];if(this._circleAndRectCollide($t.x,$t.y,$t.radius,He[lt+0],He[lt+1],He[lt+2],He[lt+3])&&(!Nt||Nt(vt))&&!mr(Ar,vt.overlapMode))return dt.push(!0),!0}}let na=this.circleCells[Be];if(na!==null){let He=this.circles;for(let Je of na)if(!Tr.circle[Je]){Tr.circle[Je]=!0;let lt=3*Je,vt=this.circleKeys[Je];if(this._circlesCollide(He[lt],He[lt+1],He[lt+2],$t.x,$t.y,$t.radius)&&(!Nt||Nt(vt))&&!mr(Ar,vt.overlapMode))return dt.push(!0),!0}}}_forEachCell(I,ie,we,Se,Be,dt,St,Nt){let $t=this._convertToXCellCoord(I),Tr=this._convertToYCellCoord(ie),Ar=this._convertToXCellCoord(we),Kr=this._convertToYCellCoord(Se);for(let na=$t;na<=Ar;na++)for(let He=Tr;He<=Kr;He++)if(Be.call(this,I,ie,we,Se,this.xCellCount*He+na,dt,St,Nt))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,we,Se,Be,dt){let St=Se-I,Nt=Be-ie,$t=we+dt;return $t*$t>St*St+Nt*Nt}_circleAndRectCollide(I,ie,we,Se,Be,dt,St){let Nt=(dt-Se)/2,$t=Math.abs(I-(Se+Nt));if($t>Nt+we)return!1;let Tr=(St-Be)/2,Ar=Math.abs(ie-(Be+Tr));if(Ar>Tr+we)return!1;if($t<=Nt||Ar<=Tr)return!0;let Kr=$t-Nt,na=Ar-Tr;return Kr*Kr+na*na<=we*we}}function Sr(Ue,I,ie,we,Se){let Be=t.H();return I?(t.K(Be,Be,[1/Se,1/Se,1]),ie||t.ad(Be,Be,we.angle)):t.L(Be,we.labelPlaneMatrix,Ue),Be}function Rr(Ue,I,ie,we,Se){if(I){let Be=t.ae(Ue);return t.K(Be,Be,[Se,Se,1]),ie||t.ad(Be,Be,-we.angle),Be}return we.glCoordMatrix}function wt(Ue,I,ie,we){let Se;we?(Se=[Ue,I,we(Ue,I),1],t.af(Se,Se,ie)):(Se=[Ue,I,0,1],er(Se,Se,ie));let Be=Se[3];return{point:new t.P(Se[0]/Be,Se[1]/Be),signedDistanceFromCamera:Be,isOccluded:!1}}function Ne(Ue,I){return .5+Ue/I*.5}function Ke(Ue,I){return Ue.x>=-I[0]&&Ue.x<=I[0]&&Ue.y>=-I[1]&&Ue.y<=I[1]}function Te(Ue,I,ie,we,Se,Be,dt,St,Nt,$t,Tr,Ar,Kr,na,He){let Je=we?Ue.textSizeData:Ue.iconSizeData,lt=t.ag(Je,ie.transform.zoom),vt=[256/ie.width*2+1,256/ie.height*2+1],Lt=we?Ue.text.dynamicLayoutVertexArray:Ue.icon.dynamicLayoutVertexArray;Lt.clear();let At=Ue.lineVertexArray,zt=we?Ue.text.placedSymbolArray:Ue.icon.placedSymbolArray,cr=ie.transform.width/ie.transform.height,yr=!1;for(let Er=0;ErMath.abs(ie.x-I.x)*we?{useVertical:!0}:(Ue===t.ah.vertical?I.yie.x)?{needsFlipping:!0}:null}function Ce(Ue,I,ie,we,Se,Be,dt,St,Nt,$t,Tr){let Ar=ie/24,Kr=I.lineOffsetX*Ar,na=I.lineOffsetY*Ar,He;if(I.numGlyphs>1){let Je=I.glyphStartIndex+I.numGlyphs,lt=I.lineStartIndex,vt=I.lineStartIndex+I.lineLength,Lt=Ie(Ar,St,Kr,na,we,I,Tr,Ue);if(!Lt)return{notEnoughRoom:!0};let At=wt(Lt.first.point.x,Lt.first.point.y,dt,Ue.getElevation).point,zt=wt(Lt.last.point.x,Lt.last.point.y,dt,Ue.getElevation).point;if(Se&&!we){let cr=Ve(I.writingMode,At,zt,$t);if(cr)return cr}He=[Lt.first];for(let cr=I.glyphStartIndex+1;cr0?At.point:function(yr,Er,jr,Qr,pa,Aa){return Ee(yr,Er,jr,1,pa,Aa)}(Ue.tileAnchorPoint,Lt,lt,0,Be,Ue),cr=Ve(I.writingMode,lt,zt,$t);if(cr)return cr}let Je=Ct(Ar*St.getoffsetX(I.glyphStartIndex),Kr,na,we,I.segment,I.lineStartIndex,I.lineStartIndex+I.lineLength,Ue,Tr);if(!Je||Ue.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};He=[Je]}for(let Je of He)t.aj(Nt,Je.point,Je.angle);return{}}function Ee(Ue,I,ie,we,Se,Be){let dt=Ue.add(Ue.sub(I)._unit()),St=Se!==void 0?wt(dt.x,dt.y,Se,Be.getElevation).point:ft(dt.x,dt.y,Be).point,Nt=ie.sub(St);return ie.add(Nt._mult(we/Nt.mag()))}function Pe(Ue,I,ie){let we=I.projectionCache;if(we.projections[Ue])return we.projections[Ue];let Se=new t.P(I.lineVertexArray.getx(Ue),I.lineVertexArray.gety(Ue)),Be=ft(Se.x,Se.y,I);if(Be.signedDistanceFromCamera>0)return we.projections[Ue]=Be.point,we.anyProjectionOccluded=we.anyProjectionOccluded||Be.isOccluded,Be.point;let dt=Ue-ie.direction;return function(St,Nt,$t,Tr,Ar){return Ee(St,Nt,$t,Tr,void 0,Ar)}(ie.distanceFromAnchor===0?I.tileAnchorPoint:new t.P(I.lineVertexArray.getx(dt),I.lineVertexArray.gety(dt)),Se,ie.previousVertex,ie.absOffsetX-ie.distanceFromAnchor+1,I)}function ft(Ue,I,ie){let we=Ue+ie.translation[0],Se=I+ie.translation[1],Be;return!ie.pitchWithMap&&ie.projection.useSpecialProjectionForSymbols?(Be=ie.projection.projectTileCoordinates(we,Se,ie.unwrappedTileID,ie.getElevation),Be.point.x=(.5*Be.point.x+.5)*ie.width,Be.point.y=(.5*-Be.point.y+.5)*ie.height):(Be=wt(we,Se,ie.labelPlaneMatrix,ie.getElevation),Be.isOccluded=!1),Be}function ct(Ue,I,ie){return Ue._unit()._perp()._mult(I*ie)}function _t(Ue,I,ie,we,Se,Be,dt,St,Nt){if(St.projectionCache.offsets[Ue])return St.projectionCache.offsets[Ue];let $t=ie.add(I);if(Ue+Nt.direction=Se)return St.projectionCache.offsets[Ue]=$t,$t;let Tr=Pe(Ue+Nt.direction,St,Nt),Ar=ct(Tr.sub(ie),dt,Nt.direction),Kr=ie.add(Ar),na=Tr.add(Ar);return St.projectionCache.offsets[Ue]=t.ak(Be,$t,Kr,na)||$t,St.projectionCache.offsets[Ue]}function Ct(Ue,I,ie,we,Se,Be,dt,St,Nt){let $t=we?Ue-I:Ue+I,Tr=$t>0?1:-1,Ar=0;we&&(Tr*=-1,Ar=Math.PI),Tr<0&&(Ar+=Math.PI);let Kr,na=Tr>0?Be+Se:Be+Se+1;St.projectionCache.cachedAnchorPoint?Kr=St.projectionCache.cachedAnchorPoint:(Kr=ft(St.tileAnchorPoint.x,St.tileAnchorPoint.y,St).point,St.projectionCache.cachedAnchorPoint=Kr);let He,Je,lt=Kr,vt=Kr,Lt=0,At=0,zt=Math.abs($t),cr=[],yr;for(;Lt+At<=zt;){if(na+=Tr,na=dt)return null;Lt+=At,vt=lt,Je=He;let Qr={absOffsetX:zt,direction:Tr,distanceFromAnchor:Lt,previousVertex:vt};if(lt=Pe(na,St,Qr),ie===0)cr.push(vt),yr=lt.sub(vt);else{let pa,Aa=lt.sub(vt);pa=Aa.mag()===0?ct(Pe(na+Tr,St,Qr).sub(lt),ie,Tr):ct(Aa,ie,Tr),Je||(Je=vt.add(pa)),He=_t(na,pa,lt,Be,dt,Je,ie,St,Qr),cr.push(Je),yr=He.sub(Je)}At=yr.mag()}let Er=yr._mult((zt-Lt)/At)._add(Je||vt),jr=Ar+Math.atan2(lt.y-vt.y,lt.x-vt.x);return cr.push(Er),{point:Er,angle:Nt?jr:0,path:cr}}let ir=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function rr(Ue,I){for(let ie=0;ie=1;Bn--)nn.push(Vi.path[Bn]);for(let Bn=1;Bnwo.signedDistanceFromCamera<=0)?[]:Bn.map(wo=>wo.point)}let Kn=[];if(nn.length>0){let Bn=nn[0].clone(),wo=nn[0].clone();for(let is=1;is=Aa.x&&wo.x<=za.x&&Bn.y>=Aa.y&&wo.y<=za.y?[nn]:wo.xza.x||wo.yza.y?[]:t.al([nn],Aa.x,Aa.y,za.x,za.y)}for(let Bn of Kn){ci.reset(Bn,.25*pa);let wo=0;wo=ci.length<=.5*pa?1:Math.ceil(ci.paddedLength/Sn)+1;for(let is=0;iswt(Se.x,Se.y,we,ie.getElevation))}queryRenderedSymbols(I){if(I.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};let ie=[],we=1/0,Se=1/0,Be=-1/0,dt=-1/0;for(let Tr of I){let Ar=new t.P(Tr.x+Lr,Tr.y+Lr);we=Math.min(we,Ar.x),Se=Math.min(Se,Ar.y),Be=Math.max(Be,Ar.x),dt=Math.max(dt,Ar.y),ie.push(Ar)}let St=this.grid.query(we,Se,Be,dt).concat(this.ignoredGrid.query(we,Se,Be,dt)),Nt={},$t={};for(let Tr of St){let Ar=Tr.key;if(Nt[Ar.bucketInstanceId]===void 0&&(Nt[Ar.bucketInstanceId]={}),Nt[Ar.bucketInstanceId][Ar.featureIndex])continue;let Kr=[new t.P(Tr.x1,Tr.y1),new t.P(Tr.x2,Tr.y1),new t.P(Tr.x2,Tr.y2),new t.P(Tr.x1,Tr.y2)];t.am(ie,Kr)&&(Nt[Ar.bucketInstanceId][Ar.featureIndex]=!0,$t[Ar.bucketInstanceId]===void 0&&($t[Ar.bucketInstanceId]=[]),$t[Ar.bucketInstanceId].push(Ar.featureIndex))}return $t}insertCollisionBox(I,ie,we,Se,Be,dt){(we?this.ignoredGrid:this.grid).insert({bucketInstanceId:Se,featureIndex:Be,collisionGroupID:dt,overlapMode:ie},I[0],I[1],I[2],I[3])}insertCollisionCircles(I,ie,we,Se,Be,dt){let St=we?this.ignoredGrid:this.grid,Nt={bucketInstanceId:Se,featureIndex:Be,collisionGroupID:dt,overlapMode:ie};for(let $t=0;$t=this.screenRightBoundary||Sethis.screenBottomBoundary}isInsideGrid(I,ie,we,Se){return we>=0&&I=0&&iethis.projectAndGetPerspectiveRatio(we,pa.x,pa.y,Se,$t));jr=Qr.some(pa=>!pa.isOccluded),Er=Qr.map(pa=>pa.point)}else jr=!0;return{box:t.ao(Er),allPointsOccluded:!jr}}}function Da(Ue,I,ie){return I*(t.X/(Ue.tileSize*Math.pow(2,ie-Ue.tileID.overscaledZ)))}class Ia{constructor(I,ie,we,Se){this.opacity=I?Math.max(0,Math.min(1,I.opacity+(I.placed?ie:-ie))):Se&&we?1:0,this.placed=we}isHidden(){return this.opacity===0&&!this.placed}}class qa{constructor(I,ie,we,Se,Be){this.text=new Ia(I?I.text:null,ie,we,Be),this.icon=new Ia(I?I.icon:null,ie,Se,Be)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class Wa{constructor(I,ie,we){this.text=I,this.icon=ie,this.skipFade=we}}class Ca{constructor(){this.invProjMatrix=t.H(),this.viewportMatrix=t.H(),this.circles=[]}}class hi{constructor(I,ie,we,Se,Be){this.bucketInstanceId=I,this.featureIndex=ie,this.sourceLayerIndex=we,this.bucketIndex=Se,this.tileID=Be}}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:we=>we.collisionGroupID===ie}}return this.collisionGroups[I]}}function Kt(Ue,I,ie,we,Se){let{horizontalAlign:Be,verticalAlign:dt}=t.au(Ue);return new t.P(-(Be-.5)*I+we[0]*Se,-(dt-.5)*ie+we[1]*Se)}class Ft{constructor(I,ie,we,Se,Be,dt){this.transform=I.clone(),this.terrain=we,this.collisionIndex=new fa(this.transform,ie),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=Se,this.retainedQueryData={},this.collisionGroups=new wi(Be),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=dt,dt&&(dt.prevPlacement=void 0),this.placedOrientations={}}_getTerrainElevationFunc(I){let ie=this.terrain;return ie?(we,Se)=>ie.getElevation(I,we,Se):null}getBucketParts(I,ie,we,Se){let Be=we.getBucket(ie),dt=we.latestFeatureIndex;if(!Be||!dt||ie.id!==Be.layerIds[0])return;let St=we.collisionBoxArray,Nt=Be.layers[0].layout,$t=Be.layers[0].paint,Tr=Math.pow(2,this.transform.zoom-we.tileID.overscaledZ),Ar=we.tileSize/t.X,Kr=we.tileID.toUnwrapped(),na=this.transform.calculatePosMatrix(Kr),He=Nt.get("text-pitch-alignment")==="map",Je=Nt.get("text-rotation-alignment")==="map",lt=Da(we,1,this.transform.zoom),vt=this.collisionIndex.mapProjection.translatePosition(this.transform,we,$t.get("text-translate"),$t.get("text-translate-anchor")),Lt=this.collisionIndex.mapProjection.translatePosition(this.transform,we,$t.get("icon-translate"),$t.get("icon-translate-anchor")),At=Sr(na,He,Je,this.transform,lt),zt=null;if(He){let yr=Rr(na,He,Je,this.transform,lt);zt=t.L([],this.transform.labelPlaneMatrix,yr)}this.retainedQueryData[Be.bucketInstanceId]=new hi(Be.bucketInstanceId,dt,Be.sourceLayerIndex,Be.index,we.tileID);let cr={bucket:Be,layout:Nt,translationText:vt,translationIcon:Lt,posMatrix:na,unwrappedTileID:Kr,textLabelPlaneMatrix:At,labelToScreenMatrix:zt,scale:Tr,textPixelRatio:Ar,holdingForFade:we.holdingForFade(),collisionBoxArray:St,partiallyEvaluatedTextSize:t.ag(Be.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(Be.sourceID)};if(Se)for(let yr of Be.sortKeyRanges){let{sortKey:Er,symbolInstanceStart:jr,symbolInstanceEnd:Qr}=yr;I.push({sortKey:Er,symbolInstanceStart:jr,symbolInstanceEnd:Qr,parameters:cr})}else I.push({symbolInstanceStart:0,symbolInstanceEnd:Be.symbolInstances.length,parameters:cr})}attemptAnchorPlacement(I,ie,we,Se,Be,dt,St,Nt,$t,Tr,Ar,Kr,na,He,Je,lt,vt,Lt,At){let zt=t.aq[I.textAnchor],cr=[I.textOffset0,I.textOffset1],yr=Kt(zt,we,Se,cr,Be),Er=this.collisionIndex.placeCollisionBox(ie,Kr,Nt,$t,Tr,St,dt,lt,Ar.predicate,At,yr);if((!Lt||this.collisionIndex.placeCollisionBox(Lt,Kr,Nt,$t,Tr,St,dt,vt,Ar.predicate,At,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:cr,width:we,height:Se,anchor:zt,textBoxScale:Be,prevAnchor:jr},this.markUsedJustification(He,zt,na,Je),He.allowVerticalPlacement&&(this.markUsedOrientation(He,Je,na),this.placedOrientations[na.crossTileID]=Je),{shift:yr,placedGlyphBoxes:Er}}}placeLayerBucketPart(I,ie,we){let{bucket:Se,layout:Be,translationText:dt,translationIcon:St,posMatrix:Nt,unwrappedTileID:$t,textLabelPlaneMatrix:Tr,labelToScreenMatrix:Ar,textPixelRatio:Kr,holdingForFade:na,collisionBoxArray:He,partiallyEvaluatedTextSize:Je,collisionGroup:lt}=I.parameters,vt=Be.get("text-optional"),Lt=Be.get("icon-optional"),At=t.ar(Be,"text-overlap","text-allow-overlap"),zt=At==="always",cr=t.ar(Be,"icon-overlap","icon-allow-overlap"),yr=cr==="always",Er=Be.get("text-rotation-alignment")==="map",jr=Be.get("text-pitch-alignment")==="map",Qr=Be.get("icon-text-fit")!=="none",pa=Be.get("symbol-z-order")==="viewport-y",Aa=zt&&(yr||!Se.hasIconData()||Lt),za=yr&&(zt||!Se.hasTextData()||vt);!Se.collisionArrays&&He&&Se.deserializeCollisionBoxes(He);let ci=this._getTerrainElevationFunc(this.retainedQueryData[Se.bucketInstanceId].tileID),Vi=(ji,nn,Sn)=>{var Kn,Bn;if(ie[ji.crossTileID])return;if(na)return void(this.placements[ji.crossTileID]=new Wa(!1,!1,!1));let wo=!1,is=!1,Ao=!0,Zo=null,ps={box:null,placeable:!1,offscreen:null},ul={box:null,placeable:!1,offscreen:null},tl=null,Jo=null,$o=null,Il=0,eu=0,Ru=0;nn.textFeatureIndex?Il=nn.textFeatureIndex:ji.useRuntimeCollisionCircles&&(Il=ji.featureIndex),nn.verticalTextFeatureIndex&&(eu=nn.verticalTextFeatureIndex);let vu=nn.textBox;if(vu){let Vl=et=>{let mt=t.ah.horizontal;if(Se.allowVerticalPlacement&&!et&&this.prevPlacement){let bt=this.prevPlacement.placedOrientations[ji.crossTileID];bt&&(this.placedOrientations[ji.crossTileID]=bt,mt=bt,this.markUsedOrientation(Se,mt,ji))}return mt},Gl=(et,mt)=>{if(Se.allowVerticalPlacement&&ji.numVerticalGlyphVertices>0&&nn.verticalTextBox){for(let bt of Se.writingModes)if(bt===t.ah.vertical?(ps=mt(),ul=ps):ps=et(),ps&&ps.placeable)break}else ps=et()},de=ji.textAnchorOffsetStartIndex,Fe=ji.textAnchorOffsetEndIndex;if(Fe===de){let et=(mt,bt)=>{let Mt=this.collisionIndex.placeCollisionBox(mt,At,Kr,Nt,$t,jr,Er,dt,lt.predicate,ci);return Mt&&Mt.placeable&&(this.markUsedOrientation(Se,bt,ji),this.placedOrientations[ji.crossTileID]=bt),Mt};Gl(()=>et(vu,t.ah.horizontal),()=>{let mt=nn.verticalTextBox;return Se.allowVerticalPlacement&&ji.numVerticalGlyphVertices>0&&mt?et(mt,t.ah.vertical):{box:null,offscreen:null}}),Vl(ps&&ps.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],mt=(Mt,ar,Ot)=>{let _r=Mt.x2-Mt.x1,Gr=Mt.y2-Mt.y1,Xr=ji.textBoxScale,xa=Qr&&cr==="never"?ar:null,da=null,Ja=At==="never"?1:2,ti="never";et&&Ja++;for(let Sa=0;Samt(vu,nn.iconBox,t.ah.horizontal),()=>{let Mt=nn.verticalTextBox;return Se.allowVerticalPlacement&&(!ps||!ps.placeable)&&ji.numVerticalGlyphVertices>0&&Mt?mt(Mt,nn.verticalIconBox,t.ah.vertical):{box:null,occluded:!0,offscreen:null}}),ps&&(wo=ps.placeable,Ao=ps.offscreen);let bt=Vl(ps&&ps.placeable);if(!wo&&this.prevPlacement){let Mt=this.prevPlacement.variableOffsets[ji.crossTileID];Mt&&(this.variableOffsets[ji.crossTileID]=Mt,this.markUsedJustification(Se,Mt.anchor,ji,bt))}}}if(tl=ps,wo=tl&&tl.placeable,Ao=tl&&tl.offscreen,ji.useRuntimeCollisionCircles){let Vl=Se.text.placedSymbolArray.get(ji.centerJustifiedTextSymbolIndex),Gl=t.ai(Se.textSizeData,Je,Vl),de=Be.get("text-padding");Jo=this.collisionIndex.placeCollisionCircles(At,Vl,Se.lineVertexArray,Se.glyphOffsetArray,Gl,Nt,$t,Tr,Ar,we,jr,lt.predicate,ji.collisionCircleDiameter,de,dt,ci),Jo.circles.length&&Jo.collisionDetected&&!we&&t.w("Collisions detected, but collision boxes are not shown"),wo=zt||Jo.circles.length>0&&!Jo.collisionDetected,Ao=Ao&&Jo.offscreen}if(nn.iconFeatureIndex&&(Ru=nn.iconFeatureIndex),nn.iconBox){let Vl=Gl=>this.collisionIndex.placeCollisionBox(Gl,cr,Kr,Nt,$t,jr,Er,St,lt.predicate,ci,Qr&&Zo?Zo:void 0);ul&&ul.placeable&&nn.verticalIconBox?($o=Vl(nn.verticalIconBox),is=$o.placeable):($o=Vl(nn.iconBox),is=$o.placeable),Ao=Ao&&$o.offscreen}let Tl=vt||ji.numHorizontalGlyphVertices===0&&ji.numVerticalGlyphVertices===0,cu=Lt||ji.numIconVertices===0;Tl||cu?cu?Tl||(is=is&&wo):wo=is&&wo:is=wo=is&&wo;let uc=is&&$o.placeable;if(wo&&tl.placeable&&this.collisionIndex.insertCollisionBox(tl.box,At,Be.get("text-ignore-placement"),Se.bucketInstanceId,ul&&ul.placeable&&eu?eu:Il,lt.ID),uc&&this.collisionIndex.insertCollisionBox($o.box,cr,Be.get("icon-ignore-placement"),Se.bucketInstanceId,Ru,lt.ID),Jo&&wo&&this.collisionIndex.insertCollisionCircles(Jo.circles,At,Be.get("text-ignore-placement"),Se.bucketInstanceId,Il,lt.ID),we&&this.storeCollisionData(Se.bucketInstanceId,Sn,nn,tl,$o,Jo),ji.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");if(Se.bucketInstanceId===0)throw new Error("bucket.bucketInstanceId can't be 0");this.placements[ji.crossTileID]=new Wa(wo||Aa,is||za,Ao||Se.justReloaded),ie[ji.crossTileID]=!0};if(pa){if(I.symbolInstanceStart!==0)throw new Error("bucket.bucketInstanceId should be 0");let ji=Se.getSortedSymbolIndexes(this.transform.angle);for(let nn=ji.length-1;nn>=0;--nn){let Sn=ji[nn];Vi(Se.symbolInstances.get(Sn),Se.collisionArrays[Sn],Sn)}}else for(let ji=I.symbolInstanceStart;ji=0&&(I.text.placedSymbolArray.get(St).crossTileID=Be>=0&&St!==Be?0:we.crossTileID)}markUsedOrientation(I,ie,we){let Se=ie===t.ah.horizontal||ie===t.ah.horizontalOnly?ie:0,Be=ie===t.ah.vertical?ie:0,dt=[we.leftJustifiedTextSymbolIndex,we.centerJustifiedTextSymbolIndex,we.rightJustifiedTextSymbolIndex];for(let St of dt)I.text.placedSymbolArray.get(St).placedOrientation=Se;we.verticalPlacedTextSymbolIndex&&(I.text.placedSymbolArray.get(we.verticalPlacedTextSymbolIndex).placedOrientation=Be)}commit(I){this.commitTime=I,this.zoomAtLastRecencyCheck=this.transform.zoom;let ie=this.prevPlacement,we=!1;this.prevZoomAdjustment=ie?ie.zoomAdjustment(this.transform.zoom):0;let Se=ie?ie.symbolFadeChange(I):1,Be=ie?ie.opacities:{},dt=ie?ie.variableOffsets:{},St=ie?ie.placedOrientations:{};for(let Nt in this.placements){let $t=this.placements[Nt],Tr=Be[Nt];Tr?(this.opacities[Nt]=new qa(Tr,Se,$t.text,$t.icon),we=we||$t.text!==Tr.text.placed||$t.icon!==Tr.icon.placed):(this.opacities[Nt]=new qa(null,Se,$t.text,$t.icon,$t.skipFade),we=we||$t.text||$t.icon)}for(let Nt in Be){let $t=Be[Nt];if(!this.opacities[Nt]){let Tr=new qa($t,Se,!1,!1);Tr.isHidden()||(this.opacities[Nt]=Tr,we=we||$t.text.placed||$t.icon.placed)}}for(let Nt in dt)this.variableOffsets[Nt]||!this.opacities[Nt]||this.opacities[Nt].isHidden()||(this.variableOffsets[Nt]=dt[Nt]);for(let Nt in St)this.placedOrientations[Nt]||!this.opacities[Nt]||this.opacities[Nt].isHidden()||(this.placedOrientations[Nt]=St[Nt]);if(ie&&ie.lastPlacementChangeTime===void 0)throw new Error("Last placement time for previous placement is not defined");we?this.lastPlacementChangeTime=I:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=ie?ie.lastPlacementChangeTime:I)}updateLayerOpacities(I,ie){let we={};for(let Se of ie){let Be=Se.getBucket(I);Be&&Se.latestFeatureIndex&&I.id===Be.layerIds[0]&&this.updateBucketOpacities(Be,Se.tileID,we,Se.collisionBoxArray)}}updateBucketOpacities(I,ie,we,Se){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 Be=I.layers[0],dt=Be.layout,St=new qa(null,0,!1,!1,!0),Nt=dt.get("text-allow-overlap"),$t=dt.get("icon-allow-overlap"),Tr=Be._unevaluatedLayout.hasValue("text-variable-anchor")||Be._unevaluatedLayout.hasValue("text-variable-anchor-offset"),Ar=dt.get("text-rotation-alignment")==="map",Kr=dt.get("text-pitch-alignment")==="map",na=dt.get("icon-text-fit")!=="none",He=new qa(null,0,Nt&&($t||!I.hasIconData()||dt.get("icon-optional")),$t&&(Nt||!I.hasTextData()||dt.get("text-optional")),!0);!I.collisionArrays&&Se&&(I.hasIconCollisionBoxData()||I.hasTextCollisionBoxData())&&I.deserializeCollisionBoxes(Se);let Je=(vt,Lt,At)=>{for(let zt=0;zt0,jr=this.placedOrientations[Lt.crossTileID],Qr=jr===t.ah.vertical,pa=jr===t.ah.horizontal||jr===t.ah.horizontalOnly;if(At>0||zt>0){let za=Za(yr.text);Je(I.text,At,Qr?ri:za),Je(I.text,zt,pa?ri:za);let ci=yr.text.isHidden();[Lt.rightJustifiedTextSymbolIndex,Lt.centerJustifiedTextSymbolIndex,Lt.leftJustifiedTextSymbolIndex].forEach(nn=>{nn>=0&&(I.text.placedSymbolArray.get(nn).hidden=ci||Qr?1:0)}),Lt.verticalPlacedTextSymbolIndex>=0&&(I.text.placedSymbolArray.get(Lt.verticalPlacedTextSymbolIndex).hidden=ci||pa?1:0);let Vi=this.variableOffsets[Lt.crossTileID];Vi&&this.markUsedJustification(I,Vi.anchor,Lt,jr);let ji=this.placedOrientations[Lt.crossTileID];ji&&(this.markUsedJustification(I,"left",Lt,ji),this.markUsedOrientation(I,ji,Lt))}if(Er){let za=Za(yr.icon),ci=!(na&&Lt.verticalPlacedIconSymbolIndex&&Qr);Lt.placedIconSymbolIndex>=0&&(Je(I.icon,Lt.numIconVertices,ci?za:ri),I.icon.placedSymbolArray.get(Lt.placedIconSymbolIndex).hidden=yr.icon.isHidden()),Lt.verticalPlacedIconSymbolIndex>=0&&(Je(I.icon,Lt.numVerticalIconVertices,ci?ri:za),I.icon.placedSymbolArray.get(Lt.verticalPlacedIconSymbolIndex).hidden=yr.icon.isHidden())}let Aa=lt&<.has(vt)?lt.get(vt):{text:null,icon:null};if(I.hasIconCollisionBoxData()||I.hasTextCollisionBoxData()){let za=I.collisionArrays[vt];if(za){let ci=new t.P(0,0);if(za.textBox||za.verticalTextBox){let Vi=!0;if(Tr){let ji=this.variableOffsets[cr];ji?(ci=Kt(ji.anchor,ji.width,ji.height,ji.textOffset,ji.textBoxScale),Ar&&ci._rotate(Kr?this.transform.angle:-this.transform.angle)):Vi=!1}if(za.textBox||za.verticalTextBox){let ji;za.textBox&&(ji=Qr),za.verticalTextBox&&(ji=pa),Yt(I.textCollisionBox.collisionVertexArray,yr.text.placed,!Vi||ji,Aa.text,ci.x,ci.y)}}if(za.iconBox||za.verticalIconBox){let Vi=!!(!pa&&za.verticalIconBox),ji;za.iconBox&&(ji=Vi),za.verticalIconBox&&(ji=!Vi),Yt(I.iconCollisionBox.collisionVertexArray,yr.icon.placed,ji,Aa.icon,na?ci.x:0,na?ci.y:0)}}}}if(I.sortFeatures(this.transform.angle),this.retainedQueryData[I.bucketInstanceId]&&(this.retainedQueryData[I.bucketInstanceId].featureSortOrder=I.featureSortOrder),I.hasTextData()&&I.text.opacityVertexBuffer&&I.text.opacityVertexBuffer.updateData(I.text.opacityVertexArray),I.hasIconData()&&I.icon.opacityVertexBuffer&&I.icon.opacityVertexBuffer.updateData(I.icon.opacityVertexArray),I.hasIconCollisionBoxData()&&I.iconCollisionBox.collisionVertexBuffer&&I.iconCollisionBox.collisionVertexBuffer.updateData(I.iconCollisionBox.collisionVertexArray),I.hasTextCollisionBoxData()&&I.textCollisionBox.collisionVertexBuffer&&I.textCollisionBox.collisionVertexBuffer.updateData(I.textCollisionBox.collisionVertexArray),I.text.opacityVertexArray.length!==I.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${I.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${I.text.layoutVertexArray.length}) / 4`);if(I.icon.opacityVertexArray.length!==I.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${I.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${I.icon.layoutVertexArray.length}) / 4`);if(I.bucketInstanceId in this.collisionCircleArrays){let vt=this.collisionCircleArrays[I.bucketInstanceId];I.placementInvProjMatrix=vt.invProjMatrix,I.placementViewportMatrix=vt.viewportMatrix,I.collisionCircleArray=vt.circles,delete this.collisionCircleArrays[I.bucketInstanceId]}}symbolFadeChange(I){return this.fadeDuration===0?1:(I-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(I){return Math.max(0,(this.transform.zoom-I)/1.5)}hasTransitions(I){return this.stale||I-this.lastPlacementChangeTimeI}setStale(){this.stale=!0}}function Yt(Ue,I,ie,we,Se,Be){we&&we.length!==0||(we=[0,0,0,0]);let dt=we[0]-Lr,St=we[1]-Lr,Nt=we[2]-Lr,$t=we[3]-Lr;Ue.emplaceBack(I?1:0,ie?1:0,Se||0,Be||0,dt,St),Ue.emplaceBack(I?1:0,ie?1:0,Se||0,Be||0,Nt,St),Ue.emplaceBack(I?1:0,ie?1:0,Se||0,Be||0,Nt,$t),Ue.emplaceBack(I?1:0,ie?1:0,Se||0,Be||0,dt,$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(Ue){if(Ue.opacity===0&&!Ue.placed)return 0;if(Ue.opacity===1&&Ue.placed)return 4294967295;let I=Ue.placed?1:0,ie=Math.floor(127*Ue.opacity);return ie*Jt+I*Fr+ie*ta+I*ra+ie*ca+I*Ba+ie*$a+I}let ri=0;function pi(){return{isOccluded:(Ue,I,ie)=>!1,getPitchedTextCorrection:(Ue,I,ie)=>1,get useSpecialProjectionForSymbols(){return!1},projectTileCoordinates(Ue,I,ie,we){throw new Error("Not implemented.")},translatePosition:(Ue,I,ie,we)=>function(Se,Be,dt,St,Nt=!1){if(!dt[0]&&!dt[1])return[0,0];let $t=Nt?St==="map"?Se.angle:0:St==="viewport"?-Se.angle:0;if($t){let Tr=Math.sin($t),Ar=Math.cos($t);dt=[dt[0]*Ar-dt[1]*Tr,dt[0]*Tr+dt[1]*Ar]}return[Nt?dt[0]:Da(Be,dt[0],Se.zoom),Nt?dt[1]:Da(Be,dt[1],Se.zoom)]}(Ue,I,ie,we),getCircleRadiusCorrection:Ue=>1}}class Ra{constructor(I){this._sortAcrossTiles=I.layout.get("symbol-z-order")!=="viewport-y"&&!I.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(I,ie,we,Se,Be){let dt=this._bucketParts;for(;this._currentTileIndexSt.sortKey-Nt.sortKey));this._currentPartIndex!this._forceFullPlacement&&n.now()-Se>2;for(;this._currentPlacementIndex>=0;){let dt=ie[I[this._currentPlacementIndex]],St=this.placement.collisionIndex.transform.zoom;if(dt.type==="symbol"&&(!dt.minzoom||dt.minzoom<=St)&&(!dt.maxzoom||dt.maxzoom>St)){if(this._inProgressLayer||(this._inProgressLayer=new Ra(dt)),this._inProgressLayer.continuePlacement(we[dt.source],this.placement,this._showCollisionBoxes,dt,Be))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(I){return this.placement.commit(I),this.placement}}let on=512/t.X/2;class hn{constructor(I,ie,we){this.tileID=I,this.bucketInstanceId=we,this._symbolsByKey={};let Se=new Map;for(let Be=0;Be({x:Math.floor(Nt.anchorX*on),y:Math.floor(Nt.anchorY*on)})),crossTileIDs:dt.map(Nt=>Nt.crossTileID)};if(St.positions.length>128){let Nt=new t.av(St.positions.length,16,Uint16Array);for(let{x:$t,y:Tr}of St.positions)Nt.add($t,Tr);Nt.finish(),delete St.positions,St.index=Nt}this._symbolsByKey[Be]=St}}getScaledCoordinates(I,ie){let{x:we,y:Se,z:Be}=this.tileID.canonical,{x:dt,y:St,z:Nt}=ie.canonical,$t=on/Math.pow(2,Nt-Be),Tr=(St*t.X+I.anchorY)*$t,Ar=Se*t.X*on;return{x:Math.floor((dt*t.X+I.anchorX)*$t-we*t.X*on),y:Math.floor(Tr-Ar)}}findMatches(I,ie,we){let Se=this.tileID.canonical.zI)}}class Tt{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 we in this.indexes){let Se=this.indexes[we],Be={};for(let dt in Se){let St=Se[dt];St.tileID=St.tileID.unwrapTo(St.tileID.wrap+ie),Be[St.tileID.key]=St}this.indexes[we]=Be}this.lng=I}addBucket(I,ie,we){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 Be=0;BeI.overscaledZ)for(let St in dt){let Nt=dt[St];Nt.tileID.isChildOf(I)&&Nt.findMatches(ie.symbolInstances,I,Se)}else{let St=dt[I.scaledTo(Number(Be)).key];St&&St.findMatches(ie.symbolInstances,I,Se)}}for(let Be=0;Be{ie[we]=!0});for(let we in this.layerIndexes)ie[we]||delete this.layerIndexes[we]}}let Cr=(Ue,I)=>t.t(Ue,I&&I.filter(ie=>ie.identifier!=="source.canvas")),xr=t.aw();class Ir extends t.E{constructor(I,ie={}){super(),this._rtlPluginLoaded=()=>{for(let we in this.sourceCaches){let Se=this.sourceCaches[we].getSource().type;Se!=="vector"&&Se!=="geojson"||this.sourceCaches[we].reload()}},this.map=I,this.dispatcher=new ee(Y(),I._getMapId()),this.dispatcher.registerMessageHandler("GG",(we,Se)=>this.getGlyphs(we,Se)),this.dispatcher.registerMessageHandler("GI",(we,Se)=>this.getImages(we,Se)),this.imageManager=new f,this.imageManager.setEventedParent(this),this.glyphManager=new F(I._requestManager,ie.localIdeographFontFamily),this.lineAtlas=new X(256,512),this.crossTileSymbolIndex=new Br,this._spritesImagesIds={},this._layers={},this._order=[],this.sourceCaches={},this.zoomHistory=new t.ax,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("SR",t.ay()),tt().on(ye,this._rtlPluginLoaded),this.on("data",we=>{if(we.dataType!=="source"||we.sourceDataType!=="metadata")return;let Se=this.sourceCaches[we.sourceId];if(!Se)return;let Be=Se.getSource();if(Be&&Be.vectorLayerIds)for(let dt in this._layers){let St=this._layers[dt];St.source===Be.id&&this._validateLayer(St)}})}loadURL(I,ie={},we){this.fire(new t.k("dataloading",{dataType:"style"})),ie.validate=typeof ie.validate!="boolean"||ie.validate;let Se=this.map._requestManager.transformRequest(I,"Style");this._loadStyleRequest=new AbortController;let Be=this._loadStyleRequest;t.h(Se,this._loadStyleRequest).then(dt=>{this._loadStyleRequest=null,this._load(dt.data,ie,we)}).catch(dt=>{this._loadStyleRequest=null,dt&&!Be.signal.aborted&&this.fire(new t.j(dt))})}loadJSON(I,ie={},we){this.fire(new t.k("dataloading",{dataType:"style"})),this._frameRequest=new AbortController,n.frameAsync(this._frameRequest).then(()=>{this._frameRequest=null,ie.validate=ie.validate!==!1,this._load(I,ie,we)}).catch(()=>{})}loadEmpty(){this.fire(new t.k("dataloading",{dataType:"style"})),this._load(xr,{validate:!1})}_load(I,ie,we){var Se;let Be=ie.transformStyle?ie.transformStyle(we,I):I;if(!ie.validate||!Cr(this,t.u(Be))){this._loaded=!0,this.stylesheet=Be;for(let dt in Be.sources)this.addSource(dt,Be.sources[dt],{validate:!1});Be.sprite?this._loadSprite(Be.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(Be.glyphs),this._createLayers(),this.light=new P(this.stylesheet.light),this.sky=new B(this.stylesheet.sky),this.map.setTerrain((Se=this.stylesheet.terrain)!==null&&Se!==void 0?Se: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 we=t.aA(ie);we.setEventedParent(this,{layer:{id:ie.id}}),this._layers[ie.id]=we}}_loadSprite(I,ie=!1,we=void 0){let Se;this.imageManager.setLoaded(!1),this._spriteRequest=new AbortController,function(Be,dt,St,Nt){return t._(this,void 0,void 0,function*(){let $t=b(Be),Tr=St>1?"@2x":"",Ar={},Kr={};for(let{id:na,url:He}of $t){let Je=dt.transformRequest(d(He,Tr,".json"),"SpriteJSON");Ar[na]=t.h(Je,Nt);let lt=dt.transformRequest(d(He,Tr,".png"),"SpriteImage");Kr[na]=l.getImage(lt,Nt)}return yield Promise.all([...Object.values(Ar),...Object.values(Kr)]),function(na,He){return t._(this,void 0,void 0,function*(){let Je={};for(let lt in na){Je[lt]={};let vt=n.getImageCanvasContext((yield He[lt]).data),Lt=(yield na[lt]).data;for(let At in Lt){let{width:zt,height:cr,x:yr,y:Er,sdf:jr,pixelRatio:Qr,stretchX:pa,stretchY:Aa,content:za,textFitWidth:ci,textFitHeight:Vi}=Lt[At];Je[lt][At]={data:null,pixelRatio:Qr,sdf:jr,stretchX:pa,stretchY:Aa,content:za,textFitWidth:ci,textFitHeight:Vi,spriteData:{width:zt,height:cr,x:yr,y:Er,context:vt}}}}return Je})}(Ar,Kr)})}(I,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then(Be=>{if(this._spriteRequest=null,Be)for(let dt in Be){this._spritesImagesIds[dt]=[];let St=this._spritesImagesIds[dt]?this._spritesImagesIds[dt].filter(Nt=>!(Nt in Be)):[];for(let Nt of St)this.imageManager.removeImage(Nt),this._changedImages[Nt]=!0;for(let Nt in Be[dt]){let $t=dt==="default"?Nt:`${dt}:${Nt}`;this._spritesImagesIds[dt].push($t),$t in this.imageManager.images?this.imageManager.updateImage($t,Be[dt][Nt],!1):this.imageManager.addImage($t,Be[dt][Nt]),ie&&(this._changedImages[$t]=!0)}}}).catch(Be=>{this._spriteRequest=null,Se=Be,this.fire(new t.j(Se))}).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"})),we&&we(Se)})}_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 we=I.sourceLayer;if(!we)return;let Se=ie.getSource();(Se.type==="geojson"||Se.vectorLayerIds&&Se.vectorLayerIds.indexOf(we)===-1)&&this.fire(new t.j(new Error(`Source layer "${we}" does not exist on source "${Se.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 we=this._serializedAllLayers();if(!I||I.length===0)return Object.values(ie?t.aB(we):we);let Se=[];for(let Be of I)if(we[Be]){let dt=ie?t.aB(we[Be]):we[Be];Se.push(dt)}return Se}_serializedAllLayers(){let I=this._serializedLayers;if(I)return I;I=this._serializedLayers={};let ie=Object.keys(this._layers);for(let we of ie){let Se=this._layers[we];Se.type!=="custom"&&(I[we]=Se.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 Se=Object.keys(this._updatedLayers),Be=Object.keys(this._removedLayers);(Se.length||Be.length)&&this._updateWorkerLayers(Se,Be);for(let dt in this._updatedSources){let St=this._updatedSources[dt];if(St==="reload")this._reloadSource(dt);else{if(St!=="clear")throw new Error(`Invalid action ${St}`);this._clearSource(dt)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(let dt in this._updatedPaintProps)this._layers[dt].updateTransitions(I);this.light.updateTransitions(I),this.sky.updateTransitions(I),this._resetUpdates()}let we={};for(let Se in this.sourceCaches){let Be=this.sourceCaches[Se];we[Se]=Be.used,Be.used=!1}for(let Se of this._order){let Be=this._layers[Se];Be.recalculate(I,this._availableImages),!Be.isHidden(I.zoom)&&Be.source&&(this.sourceCaches[Be.source].used=!0)}for(let Se in we){let Be=this.sourceCaches[Se];!!we[Se]!=!!Be.used&&Be.fire(new t.k("data",{sourceDataType:"visibility",dataType:"source",sourceId:Se}))}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 we;this._checkLoaded();let Se=this.serialize();if(I=ie.transformStyle?ie.transformStyle(Se,I):I,((we=ie.validate)===null||we===void 0||we)&&Cr(this,t.u(I)))return!1;(I=t.aB(I)).layers=t.az(I.layers);let Be=t.aC(Se,I),dt=this._getOperationsToPerform(Be);if(dt.unimplemented.length>0)throw new Error(`Unimplemented: ${dt.unimplemented.join(", ")}.`);if(dt.operations.length===0)return!1;for(let St of dt.operations)St();return this.stylesheet=I,this._serializedLayers=null,!0}_getOperationsToPerform(I){let ie=[],we=[];for(let Se of I)switch(Se.command){case"setCenter":case"setZoom":case"setBearing":case"setPitch":continue;case"addLayer":ie.push(()=>this.addLayer.apply(this,Se.args));break;case"removeLayer":ie.push(()=>this.removeLayer.apply(this,Se.args));break;case"setPaintProperty":ie.push(()=>this.setPaintProperty.apply(this,Se.args));break;case"setLayoutProperty":ie.push(()=>this.setLayoutProperty.apply(this,Se.args));break;case"setFilter":ie.push(()=>this.setFilter.apply(this,Se.args));break;case"addSource":ie.push(()=>this.addSource.apply(this,Se.args));break;case"removeSource":ie.push(()=>this.removeSource.apply(this,Se.args));break;case"setLayerZoomRange":ie.push(()=>this.setLayerZoomRange.apply(this,Se.args));break;case"setLight":ie.push(()=>this.setLight.apply(this,Se.args));break;case"setGeoJSONSourceData":ie.push(()=>this.setGeoJSONSourceData.apply(this,Se.args));break;case"setGlyphs":ie.push(()=>this.setGlyphs.apply(this,Se.args));break;case"setSprite":ie.push(()=>this.setSprite.apply(this,Se.args));break;case"setSky":ie.push(()=>this.setSky.apply(this,Se.args));break;case"setTerrain":ie.push(()=>this.map.setTerrain.apply(this,Se.args));break;case"setTransition":ie.push(()=>{});break;default:we.push(Se.command)}return{operations:ie,unimplemented:we}}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,we={}){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,we))return;this.map&&this.map._collectResourceTiming&&(ie.collectResourceTiming=!0);let Se=this.sourceCaches[I]=new It(I,ie,this.dispatcher);Se.style=this,Se.setEventedParent(this,()=>({isSourceLoaded:Se.loaded(),source:Se.serialize(),sourceId:I})),Se.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 we in this._layers)if(this._layers[we].source===I)return this.fire(new t.j(new Error(`Source "${I}" cannot be removed while layer "${we}" 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 we=this.sourceCaches[I].getSource();if(we.type!=="geojson")throw new Error(`geojsonSource.type is ${we.type}, which is !== 'geojson`);we.setData(ie),this._changed=!0}getSource(I){return this.sourceCaches[I]&&this.sourceCaches[I].getSource()}addLayer(I,ie,we={}){this._checkLoaded();let Se=I.id;if(this.getLayer(Se))return void this.fire(new t.j(new Error(`Layer "${Se}" already exists on this map.`)));let Be;if(I.type==="custom"){if(Cr(this,t.aD(I)))return;Be=t.aA(I)}else{if("source"in I&&typeof I.source=="object"&&(this.addSource(Se,I.source),I=t.aB(I),I=t.e(I,{source:Se})),this._validate(t.u.layer,`layers.${Se}`,I,{arrayIndex:-1},we))return;Be=t.aA(I),this._validateLayer(Be),Be.setEventedParent(this,{layer:{id:Se}})}let dt=ie?this._order.indexOf(ie):this._order.length;if(ie&&dt===-1)this.fire(new t.j(new Error(`Cannot add layer "${Se}" before non-existing layer "${ie}".`)));else{if(this._order.splice(dt,0,Se),this._layerOrderChanged=!0,this._layers[Se]=Be,this._removedLayers[Se]&&Be.source&&Be.type!=="custom"){let St=this._removedLayers[Se];delete this._removedLayers[Se],St.type!==Be.type?this._updatedSources[Be.source]="clear":(this._updatedSources[Be.source]="reload",this.sourceCaches[Be.source].pause())}this._updateLayer(Be),Be.onAdd&&Be.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 we=this._order.indexOf(I);this._order.splice(we,1);let Se=ie?this._order.indexOf(ie):this._order.length;ie&&Se===-1?this.fire(new t.j(new Error(`Cannot move layer "${I}" before non-existing layer "${ie}".`))):(this._order.splice(Se,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 we=this._order.indexOf(I);this._order.splice(we,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,we){this._checkLoaded();let Se=this.getLayer(I);Se?Se.minzoom===ie&&Se.maxzoom===we||(ie!=null&&(Se.minzoom=ie),we!=null&&(Se.maxzoom=we),this._updateLayer(Se)):this.fire(new t.j(new Error(`Cannot set the zoom range of non-existing layer "${I}".`)))}setFilter(I,ie,we={}){this._checkLoaded();let Se=this.getLayer(I);if(Se){if(!t.aE(Se.filter,ie))return ie==null?(Se.filter=void 0,void this._updateLayer(Se)):void(this._validate(t.u.filter,`layers.${Se.id}.filter`,ie,null,we)||(Se.filter=t.aB(ie),this._updateLayer(Se)))}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,we,Se={}){this._checkLoaded();let Be=this.getLayer(I);Be?t.aE(Be.getLayoutProperty(ie),we)||(Be.setLayoutProperty(ie,we,Se),this._updateLayer(Be)):this.fire(new t.j(new Error(`Cannot style non-existing layer "${I}".`)))}getLayoutProperty(I,ie){let we=this.getLayer(I);if(we)return we.getLayoutProperty(ie);this.fire(new t.j(new Error(`Cannot get style of non-existing layer "${I}".`)))}setPaintProperty(I,ie,we,Se={}){this._checkLoaded();let Be=this.getLayer(I);Be?t.aE(Be.getPaintProperty(ie),we)||(Be.setPaintProperty(ie,we,Se)&&this._updateLayer(Be),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 we=I.source,Se=I.sourceLayer,Be=this.sourceCaches[we];if(Be===void 0)return void this.fire(new t.j(new Error(`The source '${we}' does not exist in the map's style.`)));let dt=Be.getSource().type;dt==="geojson"&&Se?this.fire(new t.j(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):dt!=="vector"||Se?(I.id===void 0&&this.fire(new t.j(new Error("The feature id parameter must be provided."))),Be.setFeatureState(Se,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 we=I.source,Se=this.sourceCaches[we];if(Se===void 0)return void this.fire(new t.j(new Error(`The source '${we}' does not exist in the map's style.`)));let Be=Se.getSource().type,dt=Be==="vector"?I.sourceLayer:void 0;Be!=="vector"||dt?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."))):Se.removeFeatureState(dt,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,we=I.sourceLayer,Se=this.sourceCaches[ie];if(Se!==void 0)return Se.getSource().type!=="vector"||we?(I.id===void 0&&this.fire(new t.j(new Error("The feature id parameter must be provided."))),Se.getFeatureState(we,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,Be=>Be.serialize()),ie=this._serializeByIds(this._order,!0),we=this.map.getTerrain()||void 0,Se=this.stylesheet;return t.aG({version:Se.version,name:Se.name,metadata:Se.metadata,light:Se.light,sky:Se.sky,center:Se.center,zoom:Se.zoom,bearing:Se.bearing,pitch:Se.pitch,sprite:Se.sprite,glyphs:Se.glyphs,transition:Se.transition,sources:I,layers:ie,terrain:we},Be=>Be!==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=dt=>this._layers[dt].type==="fill-extrusion",we={},Se=[];for(let dt=this._order.length-1;dt>=0;dt--){let St=this._order[dt];if(ie(St)){we[St]=dt;for(let Nt of I){let $t=Nt[St];if($t)for(let Tr of $t)Se.push(Tr)}}}Se.sort((dt,St)=>St.intersectionZ-dt.intersectionZ);let Be=[];for(let dt=this._order.length-1;dt>=0;dt--){let St=this._order[dt];if(ie(St))for(let Nt=Se.length-1;Nt>=0;Nt--){let $t=Se[Nt].feature;if(we[$t.layer.id]{let jr=vt.featureSortOrder;if(jr){let Qr=jr.indexOf(yr.featureIndex);return jr.indexOf(Er.featureIndex)-Qr}return Er.featureIndex-yr.featureIndex});for(let yr of cr)zt.push(yr)}}for(let vt in He)He[vt].forEach(Lt=>{let At=Lt.feature,zt=$t[St[vt].source].getFeatureState(At.layer["source-layer"],At.id);At.source=At.layer.source,At.layer["source-layer"]&&(At.sourceLayer=At.layer["source-layer"]),At.state=zt});return He}(this._layers,dt,this.sourceCaches,I,ie,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(Be)}querySourceFeatures(I,ie){ie&&ie.filter&&this._validate(t.u.filter,"querySourceFeatures.filter",ie.filter,null,ie);let we=this.sourceCaches[I];return we?function(Se,Be){let dt=Se.getRenderableIds().map($t=>Se.getTileByID($t)),St=[],Nt={};for(let $t=0;$tKr.getTileByID(na)).sort((na,He)=>He.tileID.overscaledZ-na.tileID.overscaledZ||(na.tileID.isLessThan(He.tileID)?-1:1))}let Ar=this.crossTileSymbolIndex.addLayer(Tr,Nt[Tr.source],I.center.lng);dt=dt||Ar}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((Be=Be||this._layerOrderChanged||we===0)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(n.now(),I.zoom))&&(this.pauseablePlacement=new tn(I,this.map.terrain,this._order,Be,ie,we,Se,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,Nt),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(n.now()),St=!0),dt&&this.pauseablePlacement.placement.setStale()),St||dt)for(let $t of this._order){let Tr=this._layers[$t];Tr.type==="symbol"&&this.placement.updateLayerOpacities(Tr,Nt[Tr.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(n.now())}_releaseSymbolFadeTiles(){for(let I in this.sourceCaches)this.sourceCaches[I].releaseSymbolFadeTiles()}getImages(I,ie){return t._(this,void 0,void 0,function*(){let we=yield this.imageManager.getImages(ie.icons);this._updateTilesForChangedImages();let Se=this.sourceCaches[ie.source];return Se&&Se.setDependencies(ie.tileID.key,ie.type,ie.icons),we})}getGlyphs(I,ie){return t._(this,void 0,void 0,function*(){let we=yield this.glyphManager.getGlyphs(ie.stacks),Se=this.sourceCaches[ie.source];return Se&&Se.setDependencies(ie.tileID.key,ie.type,[""]),we})}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,we={},Se){this._checkLoaded();let Be=[{id:I,url:ie}],dt=[...b(this.stylesheet.sprite),...Be];this._validate(t.u.sprite,"sprite",dt,null,we)||(this.stylesheet.sprite=dt,this._loadSprite(Be,!0,Se))}removeSprite(I){this._checkLoaded();let ie=b(this.stylesheet.sprite);if(ie.find(we=>we.id===I)){if(this._spritesImagesIds[I])for(let we of this._spritesImagesIds[I])this.imageManager.removeImage(we),this._changedImages[we]=!0;ie.splice(ie.findIndex(we=>we.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={},we){this._checkLoaded(),I&&this._validate(t.u.sprite,"sprite",I,null,ie)||(this.stylesheet.sprite=I,I?this._loadSprite(I,!0,we):(this._unloadSprite(),we&&we(null)))}}var Ur=t.Y([{name:"a_pos",type:"Int16",components:2}]);let Hr={prelude:xt(`#ifdef GL_ES precision mediump float; #else #if !defined(lowp) #define lowp #endif #if !defined(mediump) #define mediump #endif #if !defined(highp) #define highp #endif #endif `,`#ifdef GL_ES precision highp float; #else #if !defined(lowp) #define lowp #endif #if !defined(mediump) #define mediump #endif #if !defined(highp) #define highp #endif #endif vec2 unpack_float(const float packedValue) {int packedIntValue=int(packedValue);int v0=packedIntValue/256;return vec2(v0,packedIntValue-v0*256);}vec2 unpack_opacity(const float packedOpacity) {int intOpacity=int(packedOpacity)/2;return vec2(float(intOpacity)/127.0,mod(packedOpacity,2.0));}vec4 decode_color(const vec2 encodedColor) {return vec4(unpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0 );}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);return (tile_units_to_pixels*pos+offset)/pattern_size;} #ifdef TERRAIN3D uniform sampler2D u_terrain;uniform float u_terrain_dim;uniform mat4 u_terrain_matrix;uniform vec4 u_terrain_unpack;uniform float u_terrain_exaggeration;uniform highp sampler2D u_depth; #endif const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitShifts=vec4(1.)/bitSh;highp float unpack(highp vec4 color) {return dot(color,bitShifts);}highp float depthOpacity(vec3 frag) { #ifdef TERRAIN3D highp float d=unpack(texture2D(u_depth,frag.xy*0.5+0.5))+0.0001-frag.z;return 1.0-max(0.0,min(1.0,-d*500.0)); #else return 1.0; #endif }float calculate_visibility(vec4 pos) { #ifdef TERRAIN3D vec3 frag=pos.xyz/pos.w;highp float d=depthOpacity(frag);if (d > 0.95) return 1.0;return (d+depthOpacity(frag+vec3(0.0,0.01,0.0)))/2.0; #else return 1.0; #endif }float ele(vec2 pos) { #ifdef TERRAIN3D vec4 rgb=(texture2D(u_terrain,pos)*255.0)*u_terrain_unpack;return rgb.r+rgb.g+rgb.b-u_terrain_unpack.a; #else return 0.0; #endif }float get_elevation(vec2 pos) { #ifdef TERRAIN3D vec2 coord=(u_terrain_matrix*vec4(pos,0.0,1.0)).xy*u_terrain_dim+1.0;vec2 f=fract(coord);vec2 c=(floor(coord)+0.5)/(u_terrain_dim+2.0);float d=1.0/(u_terrain_dim+2.0);float tl=ele(c);float tr=ele(c+vec2(d,0.0));float bl=ele(c+vec2(0.0,d));float br=ele(c+vec2(d,d));float elevation=mix(mix(tl,tr,f.x),mix(bl,br,f.x),f.y);return elevation*u_terrain_exaggeration; #else return 0.0; #endif }`),background:xt(`uniform vec4 u_color;uniform float u_opacity;void main() {gl_FragColor=u_color*u_opacity; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,"attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),backgroundPattern:xt(`uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_mix)*u_opacity; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,"uniform mat4 u_matrix;uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}"),circle:xt(`varying vec3 v_data;varying float v_visibility; #pragma mapbox: define highp vec4 color #pragma mapbox: define mediump float radius #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define highp vec4 stroke_color #pragma mapbox: define mediump float stroke_width #pragma mapbox: define lowp float stroke_opacity void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize mediump float radius #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize highp vec4 stroke_color #pragma mapbox: initialize mediump float stroke_width #pragma mapbox: initialize lowp float stroke_opacity vec2 extrude=v_data.xy;float extrude_length=length(extrude);float antialiased_blur=v_data.z;float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(antialiased_blur,0.0,extrude_length-radius/(radius+stroke_width));gl_FragColor=v_visibility*opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`uniform mat4 u_matrix;uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;attribute vec2 a_pos;varying vec3 v_data;varying float v_visibility; #pragma mapbox: define highp vec4 color #pragma mapbox: define mediump float radius #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define highp vec4 stroke_color #pragma mapbox: define mediump float stroke_width #pragma mapbox: define lowp float stroke_opacity void main(void) { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize mediump float radius #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize highp vec4 stroke_color #pragma mapbox: initialize mediump float stroke_width #pragma mapbox: initialize lowp float stroke_opacity vec2 extrude=vec2(mod(a_pos,2.0)*2.0-1.0);vec2 circle_center=floor(a_pos*0.5);float ele=get_elevation(circle_center);v_visibility=calculate_visibility(u_matrix*vec4(circle_center,ele,1.0));if (u_pitch_with_map) {vec2 corner_position=circle_center;if (u_scale_with_map) {corner_position+=extrude*(radius+stroke_width)*u_extrude_scale;} else {vec4 projected_center=u_matrix*vec4(circle_center,0,1);corner_position+=extrude*(radius+stroke_width)*u_extrude_scale*(projected_center.w/u_camera_to_center_distance);}gl_Position=u_matrix*vec4(corner_position,ele,1);} else {gl_Position=u_matrix*vec4(circle_center,ele,1);if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}float antialiasblur=-max(1.0/u_device_pixel_ratio/(radius+stroke_width),blur);v_data=vec3(extrude.x,extrude.y,antialiasblur);}`),clippingMask:xt("void main() {gl_FragColor=vec4(1.0);}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),heatmap:xt(`uniform highp float u_intensity;varying vec2 v_extrude; #pragma mapbox: define highp float weight #define GAUSS_COEF 0.3989422804014327 void main() { #pragma mapbox: initialize highp float weight float d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);gl_FragColor=vec4(val,1.0,1.0,1.0); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`uniform mat4 u_matrix;uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;attribute vec2 a_pos;varying vec2 v_extrude; #pragma mapbox: define highp float weight #pragma mapbox: define mediump float radius const highp float ZERO=1.0/255.0/16.0; #define GAUSS_COEF 0.3989422804014327 void main(void) { #pragma mapbox: initialize highp float weight #pragma mapbox: initialize mediump float radius vec2 unscaled_extrude=vec2(mod(a_pos,2.0)*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec4 pos=vec4(floor(a_pos*0.5)+extrude,get_elevation(floor(a_pos*0.5)),1);gl_Position=u_matrix*pos;}`),heatmapTexture:xt(`uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;varying vec2 v_pos;void main() {float t=texture2D(u_image,v_pos).r;vec4 color=texture2D(u_color_ramp,vec2(t,0.5));gl_FragColor=color*u_opacity; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(0.0); #endif }`,"uniform mat4 u_matrix;uniform vec2 u_world;attribute vec2 a_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),collisionBox:xt("varying float v_placed;varying float v_notUsed;void main() {float alpha=0.5;gl_FragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}","attribute vec2 a_anchor_pos;attribute vec2 a_placed;attribute vec2 a_box_real;uniform mat4 u_matrix;uniform vec2 u_pixel_extrude_scale;varying float v_placed;varying float v_notUsed;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);}void main() {gl_Position=projectTileWithElevation(a_anchor_pos,get_elevation(a_anchor_pos));gl_Position.xy=((a_box_real+0.5)*u_pixel_extrude_scale*2.0-1.0)*vec2(1.0,-1.0)*gl_Position.w;if (gl_Position.z/gl_Position.w < 1.1) {gl_Position.z=0.5;}v_placed=a_placed.x;v_notUsed=a_placed.y;}"),collisionCircle:xt("varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);gl_FragColor=color*alpha*opacity_t;}","attribute vec2 a_pos;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),debug:xt("uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}","attribute vec2 a_pos;varying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,get_elevation(a_pos),1);}"),fill:xt(`#pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float opacity gl_FragColor=color*opacity; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`attribute vec2 a_pos;uniform mat4 u_matrix; #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float opacity gl_Position=u_matrix*vec4(a_pos,0,1);}`),fillOutline:xt(`varying vec2 v_pos; #pragma mapbox: define highp vec4 outline_color #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize highp vec4 outline_color #pragma mapbox: initialize lowp float opacity float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos; #pragma mapbox: define highp vec4 outline_color #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize highp vec4 outline_color #pragma mapbox: initialize lowp float opacity gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`),fillOutlinePattern:xt(`uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos; #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to void main() { #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_to vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=mix(color1,color2,u_fade)*alpha*opacity; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos; #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to #pragma mapbox: define lowp float pixel_ratio_from #pragma mapbox: define lowp float pixel_ratio_to void main() { #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_to #pragma mapbox: initialize lowp float pixel_ratio_from #pragma mapbox: initialize lowp float pixel_ratio_to vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`),fillPattern:xt(`#ifdef GL_ES precision highp float; #endif uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b; #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to void main() { #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_to vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_fade)*opacity; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b; #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to #pragma mapbox: define lowp float pixel_ratio_from #pragma mapbox: define lowp float pixel_ratio_to void main() { #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_to #pragma mapbox: initialize lowp float pixel_ratio_from #pragma mapbox: initialize lowp float pixel_ratio_to vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}`),fillExtrusion:xt(`varying vec4 v_color;void main() {gl_FragColor=v_color; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;attribute vec2 a_pos;attribute vec4 a_normal_ed; #ifdef TERRAIN3D attribute vec2 a_centroid; #endif varying vec4 v_color; #pragma mapbox: define highp float base #pragma mapbox: define highp float height #pragma mapbox: define highp vec4 color void main() { #pragma mapbox: initialize highp float base #pragma mapbox: initialize highp float height #pragma mapbox: initialize highp vec4 color vec3 normal=a_normal_ed.xyz; #ifdef TERRAIN3D float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0); #else float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0; #endif base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}`),fillExtrusionPattern:xt(`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting; #pragma mapbox: define lowp float base #pragma mapbox: define lowp float height #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to #pragma mapbox: define lowp float pixel_ratio_from #pragma mapbox: define lowp float pixel_ratio_to void main() { #pragma mapbox: initialize lowp float base #pragma mapbox: initialize lowp float height #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_to #pragma mapbox: initialize lowp float pixel_ratio_from #pragma mapbox: initialize lowp float pixel_ratio_to vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed; #ifdef TERRAIN3D attribute vec2 a_centroid; #endif varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting; #pragma mapbox: define lowp float base #pragma mapbox: define lowp float height #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to #pragma mapbox: define lowp float pixel_ratio_from #pragma mapbox: define lowp float pixel_ratio_to void main() { #pragma mapbox: initialize lowp float base #pragma mapbox: initialize lowp float height #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_to #pragma mapbox: initialize lowp float pixel_ratio_from #pragma mapbox: initialize lowp float pixel_ratio_to vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to; #ifdef TERRAIN3D float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0); #else float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0; #endif base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0 ? a_pos : vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}`),hillshadePrepare:xt(`#ifdef GL_ES precision highp float; #endif uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/pow(2.0,exaggeration+(19.2562-u_zoom));gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,"uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}"),hillshade:xt(`uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent; #define PI 3.141592653589793 void main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,"uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}"),line:xt(`uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale; #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);gl_FragColor=color*(alpha*opacity); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,` #define scale 0.015873016 attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar; #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define mediump float gapwidth #pragma mapbox: define lowp float offset #pragma mapbox: define mediump float width void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump float gapwidth #pragma mapbox: initialize lowp float offset #pragma mapbox: initialize mediump float width float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude; #ifdef TERRAIN3D v_gamma_scale=1.0; #else float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; #endif v_width2=vec2(outset,inset);}`),lineGradient:xt(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp vec2 v_uv; #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture2D(u_image,v_uv);gl_FragColor=color*(alpha*opacity); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,` #define scale 0.015873016 attribute vec2 a_pos_normal;attribute vec4 a_data;attribute float a_uv_x;attribute float a_split_index;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp vec2 v_uv; #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define mediump float gapwidth #pragma mapbox: define lowp float offset #pragma mapbox: define mediump float width void main() { #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump float gapwidth #pragma mapbox: initialize lowp float offset #pragma mapbox: initialize mediump float width float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude; #ifdef TERRAIN3D v_gamma_scale=1.0; #else float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; #endif v_width2=vec2(outset,inset);}`),linePattern:xt(`#ifdef GL_ES precision highp float; #endif uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width; #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to #pragma mapbox: define lowp float pixel_ratio_from #pragma mapbox: define lowp float pixel_ratio_to #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_to #pragma mapbox: initialize lowp float pixel_ratio_from #pragma mapbox: initialize lowp float pixel_ratio_to #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,` #define scale 0.015873016 #define LINE_DISTANCE_SCALE 2.0 attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width; #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp float offset #pragma mapbox: define mediump float gapwidth #pragma mapbox: define mediump float width #pragma mapbox: define lowp float floorwidth #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to #pragma mapbox: define lowp float pixel_ratio_from #pragma mapbox: define lowp float pixel_ratio_to void main() { #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize lowp float offset #pragma mapbox: initialize mediump float gapwidth #pragma mapbox: initialize mediump float width #pragma mapbox: initialize lowp float floorwidth #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_to #pragma mapbox: initialize lowp float pixel_ratio_from #pragma mapbox: initialize lowp float pixel_ratio_to float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude; #ifdef TERRAIN3D v_gamma_scale=1.0; #else float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; #endif v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`),lineSDF:xt(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale; #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define mediump float width #pragma mapbox: define lowp float floorwidth void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump float width #pragma mapbox: initialize lowp float floorwidth float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,` #define scale 0.015873016 #define LINE_DISTANCE_SCALE 2.0 attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale; #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define mediump float gapwidth #pragma mapbox: define lowp float offset #pragma mapbox: define mediump float width #pragma mapbox: define lowp float floorwidth void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump float gapwidth #pragma mapbox: initialize lowp float offset #pragma mapbox: initialize mediump float width #pragma mapbox: initialize lowp float floorwidth float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude; #ifdef TERRAIN3D v_gamma_scale=1.0; #else float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; #endif v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}`),raster:xt(`uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,"uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}"),symbolIcon:xt(`uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity; #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize lowp float opacity lowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;varying vec2 v_tex;varying float v_fade_opacity;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);} #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize lowp float opacity vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? camera_to_anchor_distance/u_camera_to_center_distance : u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}gl_Position=finalPos;v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float visibility=calculate_visibility(projectedPoint);v_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));}`),symbolSDF:xt(`#define SDF_PX 8.0 uniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1; #pragma mapbox: define highp vec4 fill_color #pragma mapbox: define highp vec4 halo_color #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp float halo_width #pragma mapbox: define lowp float halo_blur void main() { #pragma mapbox: initialize highp vec4 fill_color #pragma mapbox: initialize highp vec4 halo_color #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize lowp float halo_width #pragma mapbox: initialize lowp float halo_blur float EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float inner_edge=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);inner_edge=inner_edge+gamma*gamma_scale;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(inner_edge-gamma_scaled,inner_edge+gamma_scaled,dist);if (u_is_halo) {lowp float halo_edge=(6.0-halo_width/fontScale)/SDF_PX;alpha=min(smoothstep(halo_edge-gamma_scaled,halo_edge+gamma_scaled,dist),1.0-alpha);}gl_FragColor=color*(alpha*opacity*fade_opacity); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_translation;uniform float u_pitched_scale;varying vec2 v_data0;varying vec3 v_data1;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);} #pragma mapbox: define highp vec4 fill_color #pragma mapbox: define highp vec4 halo_color #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp float halo_width #pragma mapbox: define lowp float halo_blur void main() { #pragma mapbox: initialize highp vec4 fill_color #pragma mapbox: initialize highp vec4 halo_color #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize lowp float halo_width #pragma mapbox: initialize lowp float halo_blur vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? camera_to_anchor_distance/u_camera_to_center_distance : u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}`),symbolTextAndIcon:xt(`#define SDF_PX 8.0 #define SDF 1.0 #define ICON 0.0 uniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;varying vec4 v_data0;varying vec4 v_data1; #pragma mapbox: define highp vec4 fill_color #pragma mapbox: define highp vec4 halo_color #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp float halo_width #pragma mapbox: define lowp float halo_blur void main() { #pragma mapbox: initialize highp vec4 fill_color #pragma mapbox: initialize highp vec4 halo_color #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize lowp float halo_width #pragma mapbox: initialize lowp float halo_blur float fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif return;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;varying vec4 v_data0;varying vec4 v_data1;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);} #pragma mapbox: define highp vec4 fill_color #pragma mapbox: define highp vec4 halo_color #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp float halo_width #pragma mapbox: define lowp float halo_blur void main() { #pragma mapbox: initialize highp vec4 fill_color #pragma mapbox: initialize highp vec4 halo_color #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize lowp float halo_width #pragma mapbox: initialize lowp float halo_blur vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? camera_to_anchor_distance/u_camera_to_center_distance : u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}`),terrain:xt("uniform sampler2D u_texture;uniform vec4 u_fog_color;uniform vec4 u_horizon_color;uniform float u_fog_ground_blend;uniform float u_fog_ground_blend_opacity;uniform float u_horizon_fog_blend;varying vec2 v_texture_pos;varying float v_fog_depth;const float gamma=2.2;vec4 gammaToLinear(vec4 color) {return pow(color,vec4(gamma));}vec4 linearToGamma(vec4 color) {return pow(color,vec4(1.0/gamma));}void main() {vec4 surface_color=texture2D(u_texture,v_texture_pos);if (v_fog_depth > u_fog_ground_blend) {vec4 surface_color_linear=gammaToLinear(surface_color);float blend_color=smoothstep(0.0,1.0,max((v_fog_depth-u_horizon_fog_blend)/(1.0-u_horizon_fog_blend),0.0));vec4 fog_horizon_color_linear=mix(gammaToLinear(u_fog_color),gammaToLinear(u_horizon_color),blend_color);float factor_fog=max(v_fog_depth-u_fog_ground_blend,0.0)/(1.0-u_fog_ground_blend);gl_FragColor=linearToGamma(mix(surface_color_linear,fog_horizon_color_linear,pow(factor_fog,2.0)*u_fog_ground_blend_opacity));} else {gl_FragColor=surface_color;}}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform mat4 u_fog_matrix;uniform float u_ele_delta;varying vec2 v_texture_pos;varying float v_fog_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);vec4 pos=u_fog_matrix*vec4(a_pos3d.xy,ele,1.0);v_fog_depth=pos.z/pos.w*0.5+0.5;}"),terrainDepth:xt("varying float v_depth;const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitMsk=vec4(0.,vec3(1./256.0));highp vec4 pack(highp float value) {highp vec4 comp=fract(value*bitSh);comp-=comp.xxyz*bitMsk;return comp;}void main() {gl_FragColor=pack(v_depth);}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform float u_ele_delta;varying float v_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);v_depth=gl_Position.z/gl_Position.w;}"),terrainCoords:xt("precision mediump float;uniform sampler2D u_texture;uniform float u_terrain_coords_id;varying vec2 v_texture_pos;void main() {vec4 rgba=texture2D(u_texture,v_texture_pos);gl_FragColor=vec4(rgba.r,rgba.g,rgba.b,u_terrain_coords_id);}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform float u_ele_delta;varying vec2 v_texture_pos;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);}"),sky:xt("uniform vec4 u_sky_color;uniform vec4 u_horizon_color;uniform float u_horizon;uniform float u_sky_horizon_blend;void main() {float y=gl_FragCoord.y;if (y > u_horizon) {float blend=y-u_horizon;if (blend < u_sky_horizon_blend) {gl_FragColor=mix(u_sky_color,u_horizon_color,pow(1.0-blend/u_sky_horizon_blend,2.0));} else {gl_FragColor=u_sky_color;}}}","attribute vec2 a_pos;void main() {gl_Position=vec4(a_pos,1.0,1.0);}")};function xt(Ue,I){let ie=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,we=I.match(/attribute ([\w]+) ([\w]+)/g),Se=Ue.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),Be=I.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),dt=Be?Be.concat(Se):Se,St={};return{fragmentSource:Ue=Ue.replace(ie,(Nt,$t,Tr,Ar,Kr)=>(St[Kr]=!0,$t==="define"?` #ifndef HAS_UNIFORM_u_${Kr} varying ${Tr} ${Ar} ${Kr}; #else uniform ${Tr} ${Ar} u_${Kr}; #endif `:` #ifdef HAS_UNIFORM_u_${Kr} ${Tr} ${Ar} ${Kr} = u_${Kr}; #endif `)),vertexSource:I=I.replace(ie,(Nt,$t,Tr,Ar,Kr)=>{let na=Ar==="float"?"vec2":"vec4",He=Kr.match(/color/)?"color":na;return St[Kr]?$t==="define"?` #ifndef HAS_UNIFORM_u_${Kr} uniform lowp float u_${Kr}_t; attribute ${Tr} ${na} a_${Kr}; varying ${Tr} ${Ar} ${Kr}; #else uniform ${Tr} ${Ar} u_${Kr}; #endif `:He==="vec4"?` #ifndef HAS_UNIFORM_u_${Kr} ${Kr} = a_${Kr}; #else ${Tr} ${Ar} ${Kr} = u_${Kr}; #endif `:` #ifndef HAS_UNIFORM_u_${Kr} ${Kr} = unpack_mix_${He}(a_${Kr}, u_${Kr}_t); #else ${Tr} ${Ar} ${Kr} = u_${Kr}; #endif `:$t==="define"?` #ifndef HAS_UNIFORM_u_${Kr} uniform lowp float u_${Kr}_t; attribute ${Tr} ${na} a_${Kr}; #else uniform ${Tr} ${Ar} u_${Kr}; #endif `:He==="vec4"?` #ifndef HAS_UNIFORM_u_${Kr} ${Tr} ${Ar} ${Kr} = a_${Kr}; #else ${Tr} ${Ar} ${Kr} = u_${Kr}; #endif `:` #ifndef HAS_UNIFORM_u_${Kr} ${Tr} ${Ar} ${Kr} = unpack_mix_${He}(a_${Kr}, u_${Kr}_t); #else ${Tr} ${Ar} ${Kr} = u_${Kr}; #endif `}),staticAttributes:we,staticUniforms:dt}}class Xt{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(I,ie,we,Se,Be,dt,St,Nt,$t){this.context=I;let Tr=this.boundPaintVertexBuffers.length!==Se.length;for(let Ar=0;!Tr&&Ar({u_matrix:Ue,u_texture:0,u_ele_delta:I,u_fog_matrix:ie,u_fog_color:we?we.properties.get("fog-color"):t.aM.white,u_fog_ground_blend:we?we.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:we?we.calculateFogBlendOpacity(Se):0,u_horizon_color:we?we.properties.get("horizon-color"):t.aM.white,u_horizon_fog_blend:we?we.properties.get("horizon-fog-blend"):1});function Or(Ue){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,cr),this.binderUniforms=we?we.getUniforms(I,cr):[]}draw(I,ie,we,Se,Be,dt,St,Nt,$t,Tr,Ar,Kr,na,He,Je,lt,vt,Lt){let At=I.gl;if(this.failedToCreate)return;if(I.program.set(this.program),I.setDepthMode(we),I.setStencilMode(Se),I.setColorMode(Be),I.setCullFace(dt),Nt){I.activeTexture.set(At.TEXTURE2),At.bindTexture(At.TEXTURE_2D,Nt.depthTexture),I.activeTexture.set(At.TEXTURE3),At.bindTexture(At.TEXTURE_2D,Nt.texture);for(let cr in this.terrainUniforms)this.terrainUniforms[cr].set(Nt[cr])}for(let cr in this.fixedUniforms)this.fixedUniforms[cr].set(St[cr]);Je&&Je.setUniforms(I,this.binderUniforms,na,{zoom:He});let zt=0;switch(ie){case At.LINES:zt=2;break;case At.TRIANGLES:zt=3;break;case At.LINE_STRIP:zt=1}for(let cr of Kr.get()){let yr=cr.vaos||(cr.vaos={});(yr[$t]||(yr[$t]=new Xt)).bind(I,this,Tr,Je?Je.getPaintVertexBuffers():[],Ar,cr.vertexOffset,lt,vt,Lt),At.drawElements(ie,cr.primitiveLength*zt,At.UNSIGNED_SHORT,cr.primitiveOffset*zt*2)}}}function Pa(Ue,I,ie){let we=1/Da(ie,1,I.transform.tileZoom),Se=Math.pow(2,ie.tileID.overscaledZ),Be=ie.tileSize*Math.pow(2,I.transform.tileZoom)/Se,dt=Be*(ie.tileID.canonical.x+ie.tileID.wrap*Se),St=Be*ie.tileID.canonical.y;return{u_image:0,u_texsize:ie.imageAtlasTexture.size,u_scale:[we,Ue.fromScale,Ue.toScale],u_fade:Ue.t,u_pixel_coord_upper:[dt>>16,St>>16],u_pixel_coord_lower:[65535&dt,65535&St]}}let ya=(Ue,I,ie,we)=>{let Se=I.style.light,Be=Se.properties.get("position"),dt=[Be.x,Be.y,Be.z],St=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}();Se.properties.get("anchor")==="viewport"&&function($t,Tr){var Ar=Math.sin(Tr),Kr=Math.cos(Tr);$t[0]=Kr,$t[1]=Ar,$t[2]=0,$t[3]=-Ar,$t[4]=Kr,$t[5]=0,$t[6]=0,$t[7]=0,$t[8]=1}(St,-I.transform.angle),function($t,Tr,Ar){var Kr=Tr[0],na=Tr[1],He=Tr[2];$t[0]=Kr*Ar[0]+na*Ar[3]+He*Ar[6],$t[1]=Kr*Ar[1]+na*Ar[4]+He*Ar[7],$t[2]=Kr*Ar[2]+na*Ar[5]+He*Ar[8]}(dt,dt,St);let Nt=Se.properties.get("color");return{u_matrix:Ue,u_lightpos:dt,u_lightintensity:Se.properties.get("intensity"),u_lightcolor:[Nt.r,Nt.g,Nt.b],u_vertical_gradient:+ie,u_opacity:we}},la=(Ue,I,ie,we,Se,Be,dt)=>t.e(ya(Ue,I,ie,we),Pa(Be,I,dt),{u_height_factor:-Math.pow(2,Se.overscaledZ)/dt.tileSize/8}),Ta=Ue=>({u_matrix:Ue}),Ai=(Ue,I,ie,we)=>t.e(Ta(Ue),Pa(ie,I,we)),ki=(Ue,I)=>({u_matrix:Ue,u_world:I}),Ki=(Ue,I,ie,we,Se)=>t.e(Ai(Ue,I,ie,we),{u_world:Se}),_n=(Ue,I,ie,we)=>{let Se=Ue.transform,Be,dt;if(we.paint.get("circle-pitch-alignment")==="map"){let St=Da(ie,1,Se.zoom);Be=!0,dt=[St,St]}else Be=!1,dt=Se.pixelsToGLUnits;return{u_camera_to_center_distance:Se.cameraToCenterDistance,u_scale_with_map:+(we.paint.get("circle-pitch-scale")==="map"),u_matrix:Ue.translatePosMatrix(I.posMatrix,ie,we.paint.get("circle-translate"),we.paint.get("circle-translate-anchor")),u_pitch_with_map:+Be,u_device_pixel_ratio:Ue.pixelRatio,u_extrude_scale:dt}},Rn=(Ue,I,ie)=>({u_matrix:Ue,u_inv_matrix:I,u_camera_to_center_distance:ie.cameraToCenterDistance,u_viewport_size:[ie.width,ie.height]}),En=(Ue,I,ie=1)=>({u_matrix:Ue,u_color:I,u_overlay:0,u_overlay_scale:ie}),On=Ue=>({u_matrix:Ue}),no=(Ue,I,ie,we)=>({u_matrix:Ue,u_extrude_scale:Da(I,1,ie),u_intensity:we}),cn=(Ue,I,ie,we)=>{let Se=t.H();t.aP(Se,0,Ue.width,Ue.height,0,0,1);let Be=Ue.context.gl;return{u_matrix:Se,u_world:[Be.drawingBufferWidth,Be.drawingBufferHeight],u_image:ie,u_color_ramp:we,u_opacity:I.paint.get("heatmap-opacity")}};function lo(Ue,I){let ie=Math.pow(2,I.canonical.z),we=I.canonical.y;return[new t.Z(0,we/ie).toLngLat().lat,new t.Z(0,(we+1)/ie).toLngLat().lat]}let Wo=(Ue,I,ie,we)=>{let Se=Ue.transform;return{u_matrix:as(Ue,I,ie,we),u_ratio:1/Da(I,1,Se.zoom),u_device_pixel_ratio:Ue.pixelRatio,u_units_to_pixels:[1/Se.pixelsToGLUnits[0],1/Se.pixelsToGLUnits[1]]}},hs=(Ue,I,ie,we,Se)=>t.e(Wo(Ue,I,ie,Se),{u_image:0,u_image_height:we}),Oo=(Ue,I,ie,we,Se)=>{let Be=Ue.transform,dt=No(I,Be);return{u_matrix:as(Ue,I,ie,Se),u_texsize:I.imageAtlasTexture.size,u_ratio:1/Da(I,1,Be.zoom),u_device_pixel_ratio:Ue.pixelRatio,u_image:0,u_scale:[dt,we.fromScale,we.toScale],u_fade:we.t,u_units_to_pixels:[1/Be.pixelsToGLUnits[0],1/Be.pixelsToGLUnits[1]]}},Wn=(Ue,I,ie,we,Se,Be)=>{let dt=Ue.lineAtlas,St=No(I,Ue.transform),Nt=ie.layout.get("line-cap")==="round",$t=dt.getDash(we.from,Nt),Tr=dt.getDash(we.to,Nt),Ar=$t.width*Se.fromScale,Kr=Tr.width*Se.toScale;return t.e(Wo(Ue,I,ie,Be),{u_patternscale_a:[St/Ar,-$t.height/2],u_patternscale_b:[St/Kr,-Tr.height/2],u_sdfgamma:dt.width/(256*Math.min(Ar,Kr)*Ue.pixelRatio)/2,u_image:0,u_tex_y_a:$t.y,u_tex_y_b:Tr.y,u_mix:Se.t})};function No(Ue,I){return 1/Da(Ue,1,I.tileZoom)}function as(Ue,I,ie,we){return Ue.translatePosMatrix(we?we.posMatrix:I.tileID.posMatrix,I,ie.paint.get("line-translate"),ie.paint.get("line-translate-anchor"))}let Ns=(Ue,I,ie,we,Se)=>{return{u_matrix:Ue,u_tl_parent:I,u_scale_parent:ie,u_buffer_scale:1,u_fade_t:we.mix,u_opacity:we.opacity*Se.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:Se.paint.get("raster-brightness-min"),u_brightness_high:Se.paint.get("raster-brightness-max"),u_saturation_factor:(dt=Se.paint.get("raster-saturation"),dt>0?1-1/(1.001-dt):-dt),u_contrast_factor:(Be=Se.paint.get("raster-contrast"),Be>0?1/(1-Be):1+Be),u_spin_weights:ss(Se.paint.get("raster-hue-rotate"))};var Be,dt};function ss(Ue){Ue*=Math.PI/180;let I=Math.sin(Ue),ie=Math.cos(Ue);return[(2*ie+1)/3,(-Math.sqrt(3)*I-ie+1)/3,(Math.sqrt(3)*I-ie+1)/3]}let uo=(Ue,I,ie,we,Se,Be,dt,St,Nt,$t,Tr,Ar,Kr,na)=>{let He=dt.transform;return{u_is_size_zoom_constant:+(Ue==="constant"||Ue==="source"),u_is_size_feature_constant:+(Ue==="constant"||Ue==="camera"),u_size_t:I?I.uSizeT:0,u_size:I?I.uSize:0,u_camera_to_center_distance:He.cameraToCenterDistance,u_pitch:He.pitch/360*2*Math.PI,u_rotate_symbol:+ie,u_aspect_ratio:He.width/He.height,u_fade_change:dt.options.fadeDuration?dt.symbolFadeChange:1,u_matrix:St,u_label_plane_matrix:Nt,u_coord_matrix:$t,u_is_text:+Ar,u_pitch_with_map:+we,u_is_along_line:Se,u_is_variable_anchor:Be,u_texsize:Kr,u_texture:0,u_translation:Tr,u_pitched_scale:na}},jn=(Ue,I,ie,we,Se,Be,dt,St,Nt,$t,Tr,Ar,Kr,na,He)=>{let Je=dt.transform;return t.e(uo(Ue,I,ie,we,Se,Be,dt,St,Nt,$t,Tr,Ar,Kr,He),{u_gamma_scale:we?Math.cos(Je._pitch)*Je.cameraToCenterDistance:1,u_device_pixel_ratio:dt.pixelRatio,u_is_halo:+na})},Xn=(Ue,I,ie,we,Se,Be,dt,St,Nt,$t,Tr,Ar,Kr,na)=>t.e(jn(Ue,I,ie,we,Se,Be,dt,St,Nt,$t,Tr,!0,Ar,!0,na),{u_texsize_icon:Kr,u_texture_icon:1}),ls=(Ue,I,ie)=>({u_matrix:Ue,u_opacity:I,u_color:ie}),Cs=(Ue,I,ie,we,Se,Be)=>t.e(function(dt,St,Nt,$t){let Tr=Nt.imageManager.getPattern(dt.from.toString()),Ar=Nt.imageManager.getPattern(dt.to.toString()),{width:Kr,height:na}=Nt.imageManager.getPixelSize(),He=Math.pow(2,$t.tileID.overscaledZ),Je=$t.tileSize*Math.pow(2,Nt.transform.tileZoom)/He,lt=Je*($t.tileID.canonical.x+$t.tileID.wrap*He),vt=Je*$t.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:Tr.tl,u_pattern_br_a:Tr.br,u_pattern_tl_b:Ar.tl,u_pattern_br_b:Ar.br,u_texsize:[Kr,na],u_mix:St.t,u_pattern_size_a:Tr.displaySize,u_pattern_size_b:Ar.displaySize,u_scale_a:St.fromScale,u_scale_b:St.toScale,u_tile_units_to_pixels:1/Da($t,1,Nt.transform.tileZoom),u_pixel_coord_upper:[lt>>16,vt>>16],u_pixel_coord_lower:[65535<,65535&vt]}}(we,Be,ie,Se),{u_matrix:Ue,u_opacity:I}),Ks={fillExtrusion:(Ue,I)=>({u_matrix:new t.aJ(Ue,I.u_matrix),u_lightpos:new t.aN(Ue,I.u_lightpos),u_lightintensity:new t.aI(Ue,I.u_lightintensity),u_lightcolor:new t.aN(Ue,I.u_lightcolor),u_vertical_gradient:new t.aI(Ue,I.u_vertical_gradient),u_opacity:new t.aI(Ue,I.u_opacity)}),fillExtrusionPattern:(Ue,I)=>({u_matrix:new t.aJ(Ue,I.u_matrix),u_lightpos:new t.aN(Ue,I.u_lightpos),u_lightintensity:new t.aI(Ue,I.u_lightintensity),u_lightcolor:new t.aN(Ue,I.u_lightcolor),u_vertical_gradient:new t.aI(Ue,I.u_vertical_gradient),u_height_factor:new t.aI(Ue,I.u_height_factor),u_image:new t.aH(Ue,I.u_image),u_texsize:new t.aO(Ue,I.u_texsize),u_pixel_coord_upper:new t.aO(Ue,I.u_pixel_coord_upper),u_pixel_coord_lower:new t.aO(Ue,I.u_pixel_coord_lower),u_scale:new t.aN(Ue,I.u_scale),u_fade:new t.aI(Ue,I.u_fade),u_opacity:new t.aI(Ue,I.u_opacity)}),fill:(Ue,I)=>({u_matrix:new t.aJ(Ue,I.u_matrix)}),fillPattern:(Ue,I)=>({u_matrix:new t.aJ(Ue,I.u_matrix),u_image:new t.aH(Ue,I.u_image),u_texsize:new t.aO(Ue,I.u_texsize),u_pixel_coord_upper:new t.aO(Ue,I.u_pixel_coord_upper),u_pixel_coord_lower:new t.aO(Ue,I.u_pixel_coord_lower),u_scale:new t.aN(Ue,I.u_scale),u_fade:new t.aI(Ue,I.u_fade)}),fillOutline:(Ue,I)=>({u_matrix:new t.aJ(Ue,I.u_matrix),u_world:new t.aO(Ue,I.u_world)}),fillOutlinePattern:(Ue,I)=>({u_matrix:new t.aJ(Ue,I.u_matrix),u_world:new t.aO(Ue,I.u_world),u_image:new t.aH(Ue,I.u_image),u_texsize:new t.aO(Ue,I.u_texsize),u_pixel_coord_upper:new t.aO(Ue,I.u_pixel_coord_upper),u_pixel_coord_lower:new t.aO(Ue,I.u_pixel_coord_lower),u_scale:new t.aN(Ue,I.u_scale),u_fade:new t.aI(Ue,I.u_fade)}),circle:(Ue,I)=>({u_camera_to_center_distance:new t.aI(Ue,I.u_camera_to_center_distance),u_scale_with_map:new t.aH(Ue,I.u_scale_with_map),u_pitch_with_map:new t.aH(Ue,I.u_pitch_with_map),u_extrude_scale:new t.aO(Ue,I.u_extrude_scale),u_device_pixel_ratio:new t.aI(Ue,I.u_device_pixel_ratio),u_matrix:new t.aJ(Ue,I.u_matrix)}),collisionBox:(Ue,I)=>({u_matrix:new t.aJ(Ue,I.u_matrix),u_pixel_extrude_scale:new t.aO(Ue,I.u_pixel_extrude_scale)}),collisionCircle:(Ue,I)=>({u_matrix:new t.aJ(Ue,I.u_matrix),u_inv_matrix:new t.aJ(Ue,I.u_inv_matrix),u_camera_to_center_distance:new t.aI(Ue,I.u_camera_to_center_distance),u_viewport_size:new t.aO(Ue,I.u_viewport_size)}),debug:(Ue,I)=>({u_color:new t.aL(Ue,I.u_color),u_matrix:new t.aJ(Ue,I.u_matrix),u_overlay:new t.aH(Ue,I.u_overlay),u_overlay_scale:new t.aI(Ue,I.u_overlay_scale)}),clippingMask:(Ue,I)=>({u_matrix:new t.aJ(Ue,I.u_matrix)}),heatmap:(Ue,I)=>({u_extrude_scale:new t.aI(Ue,I.u_extrude_scale),u_intensity:new t.aI(Ue,I.u_intensity),u_matrix:new t.aJ(Ue,I.u_matrix)}),heatmapTexture:(Ue,I)=>({u_matrix:new t.aJ(Ue,I.u_matrix),u_world:new t.aO(Ue,I.u_world),u_image:new t.aH(Ue,I.u_image),u_color_ramp:new t.aH(Ue,I.u_color_ramp),u_opacity:new t.aI(Ue,I.u_opacity)}),hillshade:(Ue,I)=>({u_matrix:new t.aJ(Ue,I.u_matrix),u_image:new t.aH(Ue,I.u_image),u_latrange:new t.aO(Ue,I.u_latrange),u_light:new t.aO(Ue,I.u_light),u_shadow:new t.aL(Ue,I.u_shadow),u_highlight:new t.aL(Ue,I.u_highlight),u_accent:new t.aL(Ue,I.u_accent)}),hillshadePrepare:(Ue,I)=>({u_matrix:new t.aJ(Ue,I.u_matrix),u_image:new t.aH(Ue,I.u_image),u_dimension:new t.aO(Ue,I.u_dimension),u_zoom:new t.aI(Ue,I.u_zoom),u_unpack:new t.aK(Ue,I.u_unpack)}),line:(Ue,I)=>({u_matrix:new t.aJ(Ue,I.u_matrix),u_ratio:new t.aI(Ue,I.u_ratio),u_device_pixel_ratio:new t.aI(Ue,I.u_device_pixel_ratio),u_units_to_pixels:new t.aO(Ue,I.u_units_to_pixels)}),lineGradient:(Ue,I)=>({u_matrix:new t.aJ(Ue,I.u_matrix),u_ratio:new t.aI(Ue,I.u_ratio),u_device_pixel_ratio:new t.aI(Ue,I.u_device_pixel_ratio),u_units_to_pixels:new t.aO(Ue,I.u_units_to_pixels),u_image:new t.aH(Ue,I.u_image),u_image_height:new t.aI(Ue,I.u_image_height)}),linePattern:(Ue,I)=>({u_matrix:new t.aJ(Ue,I.u_matrix),u_texsize:new t.aO(Ue,I.u_texsize),u_ratio:new t.aI(Ue,I.u_ratio),u_device_pixel_ratio:new t.aI(Ue,I.u_device_pixel_ratio),u_image:new t.aH(Ue,I.u_image),u_units_to_pixels:new t.aO(Ue,I.u_units_to_pixels),u_scale:new t.aN(Ue,I.u_scale),u_fade:new t.aI(Ue,I.u_fade)}),lineSDF:(Ue,I)=>({u_matrix:new t.aJ(Ue,I.u_matrix),u_ratio:new t.aI(Ue,I.u_ratio),u_device_pixel_ratio:new t.aI(Ue,I.u_device_pixel_ratio),u_units_to_pixels:new t.aO(Ue,I.u_units_to_pixels),u_patternscale_a:new t.aO(Ue,I.u_patternscale_a),u_patternscale_b:new t.aO(Ue,I.u_patternscale_b),u_sdfgamma:new t.aI(Ue,I.u_sdfgamma),u_image:new t.aH(Ue,I.u_image),u_tex_y_a:new t.aI(Ue,I.u_tex_y_a),u_tex_y_b:new t.aI(Ue,I.u_tex_y_b),u_mix:new t.aI(Ue,I.u_mix)}),raster:(Ue,I)=>({u_matrix:new t.aJ(Ue,I.u_matrix),u_tl_parent:new t.aO(Ue,I.u_tl_parent),u_scale_parent:new t.aI(Ue,I.u_scale_parent),u_buffer_scale:new t.aI(Ue,I.u_buffer_scale),u_fade_t:new t.aI(Ue,I.u_fade_t),u_opacity:new t.aI(Ue,I.u_opacity),u_image0:new t.aH(Ue,I.u_image0),u_image1:new t.aH(Ue,I.u_image1),u_brightness_low:new t.aI(Ue,I.u_brightness_low),u_brightness_high:new t.aI(Ue,I.u_brightness_high),u_saturation_factor:new t.aI(Ue,I.u_saturation_factor),u_contrast_factor:new t.aI(Ue,I.u_contrast_factor),u_spin_weights:new t.aN(Ue,I.u_spin_weights)}),symbolIcon:(Ue,I)=>({u_is_size_zoom_constant:new t.aH(Ue,I.u_is_size_zoom_constant),u_is_size_feature_constant:new t.aH(Ue,I.u_is_size_feature_constant),u_size_t:new t.aI(Ue,I.u_size_t),u_size:new t.aI(Ue,I.u_size),u_camera_to_center_distance:new t.aI(Ue,I.u_camera_to_center_distance),u_pitch:new t.aI(Ue,I.u_pitch),u_rotate_symbol:new t.aH(Ue,I.u_rotate_symbol),u_aspect_ratio:new t.aI(Ue,I.u_aspect_ratio),u_fade_change:new t.aI(Ue,I.u_fade_change),u_matrix:new t.aJ(Ue,I.u_matrix),u_label_plane_matrix:new t.aJ(Ue,I.u_label_plane_matrix),u_coord_matrix:new t.aJ(Ue,I.u_coord_matrix),u_is_text:new t.aH(Ue,I.u_is_text),u_pitch_with_map:new t.aH(Ue,I.u_pitch_with_map),u_is_along_line:new t.aH(Ue,I.u_is_along_line),u_is_variable_anchor:new t.aH(Ue,I.u_is_variable_anchor),u_texsize:new t.aO(Ue,I.u_texsize),u_texture:new t.aH(Ue,I.u_texture),u_translation:new t.aO(Ue,I.u_translation),u_pitched_scale:new t.aI(Ue,I.u_pitched_scale)}),symbolSDF:(Ue,I)=>({u_is_size_zoom_constant:new t.aH(Ue,I.u_is_size_zoom_constant),u_is_size_feature_constant:new t.aH(Ue,I.u_is_size_feature_constant),u_size_t:new t.aI(Ue,I.u_size_t),u_size:new t.aI(Ue,I.u_size),u_camera_to_center_distance:new t.aI(Ue,I.u_camera_to_center_distance),u_pitch:new t.aI(Ue,I.u_pitch),u_rotate_symbol:new t.aH(Ue,I.u_rotate_symbol),u_aspect_ratio:new t.aI(Ue,I.u_aspect_ratio),u_fade_change:new t.aI(Ue,I.u_fade_change),u_matrix:new t.aJ(Ue,I.u_matrix),u_label_plane_matrix:new t.aJ(Ue,I.u_label_plane_matrix),u_coord_matrix:new t.aJ(Ue,I.u_coord_matrix),u_is_text:new t.aH(Ue,I.u_is_text),u_pitch_with_map:new t.aH(Ue,I.u_pitch_with_map),u_is_along_line:new t.aH(Ue,I.u_is_along_line),u_is_variable_anchor:new t.aH(Ue,I.u_is_variable_anchor),u_texsize:new t.aO(Ue,I.u_texsize),u_texture:new t.aH(Ue,I.u_texture),u_gamma_scale:new t.aI(Ue,I.u_gamma_scale),u_device_pixel_ratio:new t.aI(Ue,I.u_device_pixel_ratio),u_is_halo:new t.aH(Ue,I.u_is_halo),u_translation:new t.aO(Ue,I.u_translation),u_pitched_scale:new t.aI(Ue,I.u_pitched_scale)}),symbolTextAndIcon:(Ue,I)=>({u_is_size_zoom_constant:new t.aH(Ue,I.u_is_size_zoom_constant),u_is_size_feature_constant:new t.aH(Ue,I.u_is_size_feature_constant),u_size_t:new t.aI(Ue,I.u_size_t),u_size:new t.aI(Ue,I.u_size),u_camera_to_center_distance:new t.aI(Ue,I.u_camera_to_center_distance),u_pitch:new t.aI(Ue,I.u_pitch),u_rotate_symbol:new t.aH(Ue,I.u_rotate_symbol),u_aspect_ratio:new t.aI(Ue,I.u_aspect_ratio),u_fade_change:new t.aI(Ue,I.u_fade_change),u_matrix:new t.aJ(Ue,I.u_matrix),u_label_plane_matrix:new t.aJ(Ue,I.u_label_plane_matrix),u_coord_matrix:new t.aJ(Ue,I.u_coord_matrix),u_is_text:new t.aH(Ue,I.u_is_text),u_pitch_with_map:new t.aH(Ue,I.u_pitch_with_map),u_is_along_line:new t.aH(Ue,I.u_is_along_line),u_is_variable_anchor:new t.aH(Ue,I.u_is_variable_anchor),u_texsize:new t.aO(Ue,I.u_texsize),u_texsize_icon:new t.aO(Ue,I.u_texsize_icon),u_texture:new t.aH(Ue,I.u_texture),u_texture_icon:new t.aH(Ue,I.u_texture_icon),u_gamma_scale:new t.aI(Ue,I.u_gamma_scale),u_device_pixel_ratio:new t.aI(Ue,I.u_device_pixel_ratio),u_is_halo:new t.aH(Ue,I.u_is_halo),u_translation:new t.aO(Ue,I.u_translation),u_pitched_scale:new t.aI(Ue,I.u_pitched_scale)}),background:(Ue,I)=>({u_matrix:new t.aJ(Ue,I.u_matrix),u_opacity:new t.aI(Ue,I.u_opacity),u_color:new t.aL(Ue,I.u_color)}),backgroundPattern:(Ue,I)=>({u_matrix:new t.aJ(Ue,I.u_matrix),u_opacity:new t.aI(Ue,I.u_opacity),u_image:new t.aH(Ue,I.u_image),u_pattern_tl_a:new t.aO(Ue,I.u_pattern_tl_a),u_pattern_br_a:new t.aO(Ue,I.u_pattern_br_a),u_pattern_tl_b:new t.aO(Ue,I.u_pattern_tl_b),u_pattern_br_b:new t.aO(Ue,I.u_pattern_br_b),u_texsize:new t.aO(Ue,I.u_texsize),u_mix:new t.aI(Ue,I.u_mix),u_pattern_size_a:new t.aO(Ue,I.u_pattern_size_a),u_pattern_size_b:new t.aO(Ue,I.u_pattern_size_b),u_scale_a:new t.aI(Ue,I.u_scale_a),u_scale_b:new t.aI(Ue,I.u_scale_b),u_pixel_coord_upper:new t.aO(Ue,I.u_pixel_coord_upper),u_pixel_coord_lower:new t.aO(Ue,I.u_pixel_coord_lower),u_tile_units_to_pixels:new t.aI(Ue,I.u_tile_units_to_pixels)}),terrain:(Ue,I)=>({u_matrix:new t.aJ(Ue,I.u_matrix),u_texture:new t.aH(Ue,I.u_texture),u_ele_delta:new t.aI(Ue,I.u_ele_delta),u_fog_matrix:new t.aJ(Ue,I.u_fog_matrix),u_fog_color:new t.aL(Ue,I.u_fog_color),u_fog_ground_blend:new t.aI(Ue,I.u_fog_ground_blend),u_fog_ground_blend_opacity:new t.aI(Ue,I.u_fog_ground_blend_opacity),u_horizon_color:new t.aL(Ue,I.u_horizon_color),u_horizon_fog_blend:new t.aI(Ue,I.u_horizon_fog_blend)}),terrainDepth:(Ue,I)=>({u_matrix:new t.aJ(Ue,I.u_matrix),u_ele_delta:new t.aI(Ue,I.u_ele_delta)}),terrainCoords:(Ue,I)=>({u_matrix:new t.aJ(Ue,I.u_matrix),u_texture:new t.aH(Ue,I.u_texture),u_terrain_coords_id:new t.aI(Ue,I.u_terrain_coords_id),u_ele_delta:new t.aI(Ue,I.u_ele_delta)}),sky:(Ue,I)=>({u_sky_color:new t.aL(Ue,I.u_sky_color),u_horizon_color:new t.aL(Ue,I.u_horizon_color),u_horizon:new t.aI(Ue,I.u_horizon),u_sky_horizon_blend:new t.aI(Ue,I.u_sky_horizon_blend)})};class Xo{constructor(I,ie,we){this.context=I;let Se=I.gl;this.buffer=Se.createBuffer(),this.dynamicDraw=!!we,this.context.unbindVAO(),I.bindElementBuffer.set(this.buffer),Se.bufferData(Se.ELEMENT_ARRAY_BUFFER,ie.arrayBuffer,this.dynamicDraw?Se.DYNAMIC_DRAW:Se.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 Ln{constructor(I,ie,we,Se){this.length=ie.length,this.attributes=we,this.itemSize=ie.bytesPerElement,this.dynamicDraw=Se,this.context=I;let Be=I.gl;this.buffer=Be.createBuffer(),I.bindVertexBuffer.set(this.buffer),Be.bufferData(Be.ARRAY_BUFFER,ie.arrayBuffer,this.dynamicDraw?Be.DYNAMIC_DRAW:Be.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 we=0;we0){let yr=t.H();t.aQ(yr,At.placementInvProjMatrix,Ue.transform.glCoordMatrix),t.aQ(yr,yr,At.placementViewportMatrix),Nt.push({circleArray:cr,circleOffset:Tr,transform:Lt.posMatrix,invTransform:yr,coord:Lt}),$t+=cr.length/4,Tr=$t}zt&&St.draw(Be,dt.LINES,ns.disabled,Es.disabled,Ue.colorModeForRenderPass(),to.disabled,{u_matrix:Lt.posMatrix,u_pixel_extrude_scale:[1/(Ar=Ue.transform).width,1/Ar.height]},Ue.style.map.terrain&&Ue.style.map.terrain.getTerrainData(Lt),ie.id,zt.layoutVertexBuffer,zt.indexBuffer,zt.segments,null,Ue.transform.zoom,null,null,zt.collisionVertexBuffer)}var Ar;if(!Se||!Nt.length)return;let Kr=Ue.useProgram("collisionCircle"),na=new t.aR;na.resize(4*$t),na._trim();let He=0;for(let vt of Nt)for(let Lt=0;Lt=0&&(vt[At.associatedIconIndex]={shiftedAnchor:Sn,angle:Kn})}else rr(At.numGlyphs,Je)}if($t){lt.clear();let Lt=Ue.icon.placedSymbolArray;for(let At=0;AtUe.style.map.terrain.getElevation(Aa,Ot,_r):null,ar=ie.layout.get("text-rotation-alignment")==="map";Te(ci,Aa.posMatrix,Ue,Se,eu,vu,vt,$t,ar,Je,Aa.toUnwrapped(),He.width,He.height,Tl,Mt)}let Vl=Aa.posMatrix,Gl=Se&&jr||uc,de=Lt||Gl?jl:eu,Fe=Ru,et=nn&&ie.paint.get(Se?"text-halo-width":"icon-halo-width").constantOr(1)!==0,mt;mt=nn?ci.iconsInText?Xn(Sn.kind,wo,At,vt,Lt,Gl,Ue,Vl,de,Fe,Tl,Ao,tl,pa):jn(Sn.kind,wo,At,vt,Lt,Gl,Ue,Vl,de,Fe,Tl,Se,Ao,!0,pa):uo(Sn.kind,wo,At,vt,Lt,Gl,Ue,Vl,de,Fe,Tl,Se,Ao,pa);let bt={program:Bn,buffers:Vi,uniformValues:mt,atlasTexture:Zo,atlasTextureIcon:Jo,atlasInterpolation:ps,atlasInterpolationIcon:ul,isSDF:nn,hasHalo:et};if(cr&&ci.canOverlap){yr=!0;let Mt=Vi.segments.get();for(let ar of Mt)Qr.push({segments:new t.a0([ar]),sortKey:ar.sortKey,state:bt,terrainData:is})}else Qr.push({segments:Vi.segments,sortKey:0,state:bt,terrainData:is})}yr&&Qr.sort((Aa,za)=>Aa.sortKey-za.sortKey);for(let Aa of Qr){let za=Aa.state;if(Kr.activeTexture.set(na.TEXTURE0),za.atlasTexture.bind(za.atlasInterpolation,na.CLAMP_TO_EDGE),za.atlasTextureIcon&&(Kr.activeTexture.set(na.TEXTURE1),za.atlasTextureIcon&&za.atlasTextureIcon.bind(za.atlasInterpolationIcon,na.CLAMP_TO_EDGE)),za.isSDF){let ci=za.uniformValues;za.hasHalo&&(ci.u_is_halo=1,Of(za.buffers,Aa.segments,ie,Ue,za.program,Er,Tr,Ar,ci,Aa.terrainData)),ci.u_is_halo=0}Of(za.buffers,Aa.segments,ie,Ue,za.program,Er,Tr,Ar,za.uniformValues,Aa.terrainData)}}function Of(Ue,I,ie,we,Se,Be,dt,St,Nt,$t){let Tr=we.context;Se.draw(Tr,Tr.gl.TRIANGLES,Be,dt,St,to.disabled,Nt,$t,ie.id,Ue.layoutVertexBuffer,Ue.indexBuffer,I,ie.paint,we.transform.zoom,Ue.programConfigurations.get(ie.id),Ue.dynamicLayoutVertexBuffer,Ue.opacityVertexBuffer)}function of(Ue,I,ie,we){let Se=Ue.context,Be=Se.gl,dt=Es.disabled,St=new fl([Be.ONE,Be.ONE],t.aM.transparent,[!0,!0,!0,!0]),Nt=I.getBucket(ie);if(!Nt)return;let $t=we.key,Tr=ie.heatmapFbos.get($t);Tr||(Tr=Bf(Se,I.tileSize,I.tileSize),ie.heatmapFbos.set($t,Tr)),Se.bindFramebuffer.set(Tr.framebuffer),Se.viewport.set([0,0,I.tileSize,I.tileSize]),Se.clear({color:t.aM.transparent});let Ar=Nt.programConfigurations.get(ie.id),Kr=Ue.useProgram("heatmap",Ar),na=Ue.style.map.terrain.getTerrainData(we);Kr.draw(Se,Be.TRIANGLES,ns.disabled,dt,St,to.disabled,no(we.posMatrix,I,Ue.transform.zoom,ie.paint.get("heatmap-intensity")),na,ie.id,Nt.layoutVertexBuffer,Nt.indexBuffer,Nt.segments,ie.paint,Ue.transform.zoom,Ar)}function jc(Ue,I,ie){let we=Ue.context,Se=we.gl;we.setColorMode(Ue.colorModeForRenderPass());let Be=Nf(we,I),dt=ie.key,St=I.heatmapFbos.get(dt);St&&(we.activeTexture.set(Se.TEXTURE0),Se.bindTexture(Se.TEXTURE_2D,St.colorAttachment.get()),we.activeTexture.set(Se.TEXTURE1),Be.bind(Se.LINEAR,Se.CLAMP_TO_EDGE),Ue.useProgram("heatmapTexture").draw(we,Se.TRIANGLES,ns.disabled,Es.disabled,Ue.colorModeForRenderPass(),to.disabled,cn(Ue,I,0,1),null,I.id,Ue.rasterBoundsBuffer,Ue.quadTriangleIndexBuffer,Ue.rasterBoundsSegments,I.paint,Ue.transform.zoom),St.destroy(),I.heatmapFbos.delete(dt))}function Bf(Ue,I,ie){var we,Se;let Be=Ue.gl,dt=Be.createTexture();Be.bindTexture(Be.TEXTURE_2D,dt),Be.texParameteri(Be.TEXTURE_2D,Be.TEXTURE_WRAP_S,Be.CLAMP_TO_EDGE),Be.texParameteri(Be.TEXTURE_2D,Be.TEXTURE_WRAP_T,Be.CLAMP_TO_EDGE),Be.texParameteri(Be.TEXTURE_2D,Be.TEXTURE_MIN_FILTER,Be.LINEAR),Be.texParameteri(Be.TEXTURE_2D,Be.TEXTURE_MAG_FILTER,Be.LINEAR);let St=(we=Ue.HALF_FLOAT)!==null&&we!==void 0?we:Be.UNSIGNED_BYTE,Nt=(Se=Ue.RGBA16F)!==null&&Se!==void 0?Se:Be.RGBA;Be.texImage2D(Be.TEXTURE_2D,0,Nt,I,ie,0,Be.RGBA,St,null);let $t=Ue.createFramebuffer(I,ie,!1,!1);return $t.colorAttachment.set(dt),$t}function Nf(Ue,I){return I.colorRampTexture||(I.colorRampTexture=new u(Ue,I.colorRamp,Ue.gl.RGBA)),I.colorRampTexture}function Gu(Ue,I,ie,we,Se){if(!ie||!we||!we.imageAtlas)return;let Be=we.imageAtlas.patternPositions,dt=Be[ie.to.toString()],St=Be[ie.from.toString()];if(!dt&&St&&(dt=St),!St&&dt&&(St=dt),!dt||!St){let Nt=Se.getPaintProperty(I);dt=Be[Nt],St=Be[Nt]}dt&&St&&Ue.setConstantPatternPositions(dt,St)}function Ef(Ue,I,ie,we,Se,Be,dt){let St=Ue.context.gl,Nt="fill-pattern",$t=ie.paint.get(Nt),Tr=$t&&$t.constantOr(1),Ar=ie.getCrossfadeParameters(),Kr,na,He,Je,lt;dt?(na=Tr&&!ie.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",Kr=St.LINES):(na=Tr?"fillPattern":"fill",Kr=St.TRIANGLES);let vt=$t.constantOr(null);for(let Lt of we){let At=I.getTile(Lt);if(Tr&&!At.patternsLoaded())continue;let zt=At.getBucket(ie);if(!zt)continue;let cr=zt.programConfigurations.get(ie.id),yr=Ue.useProgram(na,cr),Er=Ue.style.map.terrain&&Ue.style.map.terrain.getTerrainData(Lt);Tr&&(Ue.context.activeTexture.set(St.TEXTURE0),At.imageAtlasTexture.bind(St.LINEAR,St.CLAMP_TO_EDGE),cr.updatePaintBuffers(Ar)),Gu(cr,Nt,vt,At,ie);let jr=Er?Lt:null,Qr=Ue.translatePosMatrix(jr?jr.posMatrix:Lt.posMatrix,At,ie.paint.get("fill-translate"),ie.paint.get("fill-translate-anchor"));if(dt){Je=zt.indexBuffer2,lt=zt.segments2;let pa=[St.drawingBufferWidth,St.drawingBufferHeight];He=na==="fillOutlinePattern"&&Tr?Ki(Qr,Ue,Ar,At,pa):ki(Qr,pa)}else Je=zt.indexBuffer,lt=zt.segments,He=Tr?Ai(Qr,Ue,Ar,At):Ta(Qr);yr.draw(Ue.context,Kr,Se,Ue.stencilModeForClipping(Lt),Be,to.disabled,He,Er,ie.id,zt.layoutVertexBuffer,Je,lt,ie.paint,Ue.transform.zoom,cr)}}function oc(Ue,I,ie,we,Se,Be,dt){let St=Ue.context,Nt=St.gl,$t="fill-extrusion-pattern",Tr=ie.paint.get($t),Ar=Tr.constantOr(1),Kr=ie.getCrossfadeParameters(),na=ie.paint.get("fill-extrusion-opacity"),He=Tr.constantOr(null);for(let Je of we){let lt=I.getTile(Je),vt=lt.getBucket(ie);if(!vt)continue;let Lt=Ue.style.map.terrain&&Ue.style.map.terrain.getTerrainData(Je),At=vt.programConfigurations.get(ie.id),zt=Ue.useProgram(Ar?"fillExtrusionPattern":"fillExtrusion",At);Ar&&(Ue.context.activeTexture.set(Nt.TEXTURE0),lt.imageAtlasTexture.bind(Nt.LINEAR,Nt.CLAMP_TO_EDGE),At.updatePaintBuffers(Kr)),Gu(At,$t,He,lt,ie);let cr=Ue.translatePosMatrix(Je.posMatrix,lt,ie.paint.get("fill-extrusion-translate"),ie.paint.get("fill-extrusion-translate-anchor")),yr=ie.paint.get("fill-extrusion-vertical-gradient"),Er=Ar?la(cr,Ue,yr,na,Je,Kr,lt):ya(cr,Ue,yr,na);zt.draw(St,St.gl.TRIANGLES,Se,Be,dt,to.backCCW,Er,Lt,ie.id,vt.layoutVertexBuffer,vt.indexBuffer,vt.segments,ie.paint,Ue.transform.zoom,At,Ue.style.map.terrain&&vt.centroidVertexBuffer)}}function Xc(Ue,I,ie,we,Se,Be,dt){let St=Ue.context,Nt=St.gl,$t=ie.fbo;if(!$t)return;let Tr=Ue.useProgram("hillshade"),Ar=Ue.style.map.terrain&&Ue.style.map.terrain.getTerrainData(I);St.activeTexture.set(Nt.TEXTURE0),Nt.bindTexture(Nt.TEXTURE_2D,$t.colorAttachment.get()),Tr.draw(St,Nt.TRIANGLES,Se,Be,dt,to.disabled,((Kr,na,He,Je)=>{let lt=He.paint.get("hillshade-shadow-color"),vt=He.paint.get("hillshade-highlight-color"),Lt=He.paint.get("hillshade-accent-color"),At=He.paint.get("hillshade-illumination-direction")*(Math.PI/180);He.paint.get("hillshade-illumination-anchor")==="viewport"&&(At-=Kr.transform.angle);let zt=!Kr.options.moving;return{u_matrix:Je?Je.posMatrix:Kr.transform.calculatePosMatrix(na.tileID.toUnwrapped(),zt),u_image:0,u_latrange:lo(0,na.tileID),u_light:[He.paint.get("hillshade-exaggeration"),At],u_shadow:lt,u_highlight:vt,u_accent:Lt}})(Ue,ie,we,Ar?I:null),Ar,we.id,Ue.rasterBoundsBuffer,Ue.quadTriangleIndexBuffer,Ue.rasterBoundsSegments)}function Ql(Ue,I,ie,we,Se,Be){let dt=Ue.context,St=dt.gl,Nt=I.dem;if(Nt&&Nt.data){let $t=Nt.dim,Tr=Nt.stride,Ar=Nt.getPixels();if(dt.activeTexture.set(St.TEXTURE1),dt.pixelStoreUnpackPremultiplyAlpha.set(!1),I.demTexture=I.demTexture||Ue.getTileTexture(Tr),I.demTexture){let na=I.demTexture;na.update(Ar,{premultiply:!1}),na.bind(St.NEAREST,St.CLAMP_TO_EDGE)}else I.demTexture=new u(dt,Ar,St.RGBA,{premultiply:!1}),I.demTexture.bind(St.NEAREST,St.CLAMP_TO_EDGE);dt.activeTexture.set(St.TEXTURE0);let Kr=I.fbo;if(!Kr){let na=new u(dt,{width:$t,height:$t,data:null},St.RGBA);na.bind(St.LINEAR,St.CLAMP_TO_EDGE),Kr=I.fbo=dt.createFramebuffer($t,$t,!0,!1),Kr.colorAttachment.set(na.texture)}dt.bindFramebuffer.set(Kr.framebuffer),dt.viewport.set([0,0,$t,$t]),Ue.useProgram("hillshadePrepare").draw(dt,St.TRIANGLES,we,Se,Be,to.disabled,((na,He)=>{let Je=He.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:[Je,Je],u_zoom:na.overscaledZ,u_unpack:He.getUnpackVector()}})(I.tileID,Nt),null,ie.id,Ue.rasterBoundsBuffer,Ue.quadTriangleIndexBuffer,Ue.rasterBoundsSegments),I.needsHillshadePrepare=!1}}function qc(Ue,I,ie,we,Se,Be){let dt=we.paint.get("raster-fade-duration");if(!Be&&dt>0){let St=n.now(),Nt=(St-Ue.timeAdded)/dt,$t=I?(St-I.timeAdded)/dt:-1,Tr=ie.getSource(),Ar=Se.coveringZoomLevel({tileSize:Tr.tileSize,roundZoom:Tr.roundZoom}),Kr=!I||Math.abs(I.tileID.overscaledZ-Ar)>Math.abs(Ue.tileID.overscaledZ-Ar),na=Kr&&Ue.refreshedUponExpiration?1:t.ac(Kr?Nt:1-$t,0,1);return Ue.refreshedUponExpiration&&Nt>=1&&(Ue.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 Zc(Ue,I,ie,we){Cu(Ue,0,I+ie/2,Ue.transform.width,ie,we)}function $f(Ue,I,ie,we){Cu(Ue,I-ie/2,0,ie,Ue.transform.height,we)}function Cu(Ue,I,ie,we,Se,Be){let dt=Ue.context,St=dt.gl;St.enable(St.SCISSOR_TEST),St.scissor(I*Ue.pixelRatio,ie*Ue.pixelRatio,we*Ue.pixelRatio,Se*Ue.pixelRatio),dt.clear({color:Be}),St.disable(St.SCISSOR_TEST)}function jf(Ue,I,ie){let we=Ue.context,Se=we.gl,Be=ie.posMatrix,dt=Ue.useProgram("debug"),St=ns.disabled,Nt=Es.disabled,$t=Ue.colorModeForRenderPass(),Tr="$debug",Ar=Ue.style.map.terrain&&Ue.style.map.terrain.getTerrainData(ie);we.activeTexture.set(Se.TEXTURE0);let Kr=I.getTileByID(ie.key).latestRawTileData,na=Math.floor((Kr&&Kr.byteLength||0)/1024),He=I.getTile(ie).tileSize,Je=512/Math.min(He,512)*(ie.overscaledZ/Ue.transform.zoom)*.5,lt=ie.canonical.toString();ie.overscaledZ!==ie.canonical.z&&(lt+=` => ${ie.overscaledZ}`),function(vt,Lt){vt.initDebugOverlayCanvas();let At=vt.debugOverlayCanvas,zt=vt.context.gl,cr=vt.debugOverlayCanvas.getContext("2d");cr.clearRect(0,0,At.width,At.height),cr.shadowColor="white",cr.shadowBlur=2,cr.lineWidth=1.5,cr.strokeStyle="white",cr.textBaseline="top",cr.font="bold 36px Open Sans, sans-serif",cr.fillText(Lt,5,5),cr.strokeText(Lt,5,5),vt.debugOverlayTexture.update(At),vt.debugOverlayTexture.bind(zt.LINEAR,zt.CLAMP_TO_EDGE)}(Ue,`${lt} ${na}kB`),dt.draw(we,Se.TRIANGLES,St,Nt,fl.alphaBlended,to.disabled,En(Be,t.aM.transparent,Je),null,Tr,Ue.debugBuffer,Ue.quadTriangleIndexBuffer,Ue.debugSegments),dt.draw(we,Se.LINE_STRIP,St,Nt,$t,to.disabled,En(Be,t.aM.red),Ar,Tr,Ue.debugBuffer,Ue.tileBorderIndexBuffer,Ue.debugSegments)}function yl(Ue,I,ie){let we=Ue.context,Se=we.gl,Be=Ue.colorModeForRenderPass(),dt=new ns(Se.LEQUAL,ns.ReadWrite,Ue.depthRangeFor3D),St=Ue.useProgram("terrain"),Nt=I.getTerrainMesh();we.bindFramebuffer.set(null),we.viewport.set([0,0,Ue.width,Ue.height]);for(let $t of ie){let Tr=Ue.renderToTexture.getTexture($t),Ar=I.getTerrainData($t.tileID);we.activeTexture.set(Se.TEXTURE0),Se.bindTexture(Se.TEXTURE_2D,Tr.texture);let Kr=Ue.transform.calculatePosMatrix($t.tileID.toUnwrapped()),na=I.getMeshFrameDelta(Ue.transform.zoom),He=Ue.transform.calculateFogMatrix($t.tileID.toUnwrapped()),Je=vr(Kr,na,He,Ue.style.sky,Ue.transform.pitch);St.draw(we,Se.TRIANGLES,dt,Es.disabled,Be,to.backCCW,Je,Ar,"terrain",Nt.vertexBuffer,Nt.indexBuffer,Nt.segments)}}class Lu{constructor(I,ie,we){this.vertexBuffer=I,this.indexBuffer=ie,this.segments=we}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=It.maxUnderzooming+It.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Br}resize(I,ie,we){if(this.width=Math.floor(I*we),this.height=Math.floor(ie*we),this.pixelRatio=we,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(let Se of this.style._order)this.style._layers[Se].resize()}setup(){let I=this.context,ie=new t.aX;ie.emplaceBack(0,0),ie.emplaceBack(t.X,0),ie.emplaceBack(0,t.X),ie.emplaceBack(t.X,t.X),this.tileExtentBuffer=I.createVertexBuffer(ie,Ur.members),this.tileExtentSegments=t.a0.simpleSegment(0,0,4,2);let we=new t.aX;we.emplaceBack(0,0),we.emplaceBack(t.X,0),we.emplaceBack(0,t.X),we.emplaceBack(t.X,t.X),this.debugBuffer=I.createVertexBuffer(we,Ur.members),this.debugSegments=t.a0.simpleSegment(0,0,4,5);let Se=new t.$;Se.emplaceBack(0,0,0,0),Se.emplaceBack(t.X,0,t.X,0),Se.emplaceBack(0,t.X,0,t.X),Se.emplaceBack(t.X,t.X,t.X,t.X),this.rasterBoundsBuffer=I.createVertexBuffer(Se,Ze.members),this.rasterBoundsSegments=t.a0.simpleSegment(0,0,4,2);let Be=new t.aX;Be.emplaceBack(0,0),Be.emplaceBack(1,0),Be.emplaceBack(0,1),Be.emplaceBack(1,1),this.viewportBuffer=I.createVertexBuffer(Be,Ur.members),this.viewportSegments=t.a0.simpleSegment(0,0,4,2);let dt=new t.aZ;dt.emplaceBack(0),dt.emplaceBack(1),dt.emplaceBack(3),dt.emplaceBack(2),dt.emplaceBack(0),this.tileBorderIndexBuffer=I.createIndexBuffer(dt);let St=new t.aY;St.emplaceBack(0,1,2),St.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=I.createIndexBuffer(St);let Nt=this.context.gl;this.stencilClearMode=new Es({func:Nt.ALWAYS,mask:0},0,255,Nt.ZERO,Nt.ZERO,Nt.ZERO)}clearStencil(){let I=this.context,ie=I.gl;this.nextStencilID=1,this.currentStencilSource=void 0;let we=t.H();t.aP(we,0,this.width,this.height,0,0,1),t.K(we,we,[ie.drawingBufferWidth,ie.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(I,ie.TRIANGLES,ns.disabled,this.stencilClearMode,fl.disabled,to.disabled,On(we),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 we=this.context,Se=we.gl;this.nextStencilID+ie.length>256&&this.clearStencil(),we.setColorMode(fl.disabled),we.setDepthMode(ns.disabled);let Be=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(let dt of ie){let St=this._tileClippingMaskIDs[dt.key]=this.nextStencilID++,Nt=this.style.map.terrain&&this.style.map.terrain.getTerrainData(dt);Be.draw(we,Se.TRIANGLES,ns.disabled,new Es({func:Se.ALWAYS,mask:0},St,255,Se.KEEP,Se.KEEP,Se.REPLACE),fl.disabled,to.disabled,On(dt.posMatrix),Nt,"$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 Es({func:ie.NOTEQUAL,mask:255},I,255,ie.KEEP,ie.KEEP,ie.REPLACE)}stencilModeForClipping(I){let ie=this.context.gl;return new Es({func:ie.EQUAL,mask:255},this._tileClippingMaskIDs[I.key],0,ie.KEEP,ie.KEEP,ie.REPLACE)}stencilConfigForOverlap(I){let ie=this.context.gl,we=I.sort((dt,St)=>St.overscaledZ-dt.overscaledZ),Se=we[we.length-1].overscaledZ,Be=we[0].overscaledZ-Se+1;if(Be>1){this.currentStencilSource=void 0,this.nextStencilID+Be>256&&this.clearStencil();let dt={};for(let St=0;St({u_sky_color:vt.properties.get("sky-color"),u_horizon_color:vt.properties.get("horizon-color"),u_horizon:(Lt.height/2+Lt.getHorizon())*At,u_sky_horizon_blend:vt.properties.get("sky-horizon-blend")*Lt.height/2*At}))($t,Nt.style.map.transform,Nt.pixelRatio),na=new ns(Ar.LEQUAL,ns.ReadWrite,[0,1]),He=Es.disabled,Je=Nt.colorModeForRenderPass(),lt=Nt.useProgram("sky");if(!$t.mesh){let vt=new t.aX;vt.emplaceBack(-1,-1),vt.emplaceBack(1,-1),vt.emplaceBack(1,1),vt.emplaceBack(-1,1);let Lt=new t.aY;Lt.emplaceBack(0,1,2),Lt.emplaceBack(0,2,3),$t.mesh=new Lu(Tr.createVertexBuffer(vt,Ur.members),Tr.createIndexBuffer(Lt),t.a0.simpleSegment(0,0,vt.length,Lt.length))}lt.draw(Tr,Ar.TRIANGLES,na,He,Je,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=we.length-1;this.currentLayer>=0;this.currentLayer--){let Nt=this.style._layers[we[this.currentLayer]],$t=Se[Nt.source],Tr=Be[Nt.source];this._renderTileClippingMasks(Nt,Tr),this.renderLayer(this,$t,Nt,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"),He=Kr.filter(lt=>lt.getSource().type!=="vector"),Je=lt=>{(!Ar||Ar.getSource().maxzoomJe(lt)),Ar||He.forEach(lt=>Je(lt)),Ar}(this.style,this.transform.zoom);Nt&&function($t,Tr,Ar){for(let Kr=0;Kr0),Se&&(t.b0(ie,we),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,function(Be,dt){let St=Be.context,Nt=St.gl,$t=fl.unblended,Tr=new ns(Nt.LEQUAL,ns.ReadWrite,[0,1]),Ar=dt.getTerrainMesh(),Kr=dt.sourceCache.getRenderableTiles(),na=Be.useProgram("terrainDepth");St.bindFramebuffer.set(dt.getFramebuffer("depth").framebuffer),St.viewport.set([0,0,Be.width/devicePixelRatio,Be.height/devicePixelRatio]),St.clear({color:t.aM.transparent,depth:1});for(let He of Kr){let Je=dt.getTerrainData(He.tileID),lt={u_matrix:Be.transform.calculatePosMatrix(He.tileID.toUnwrapped()),u_ele_delta:dt.getMeshFrameDelta(Be.transform.zoom)};na.draw(St,Nt.TRIANGLES,Tr,Es.disabled,$t,to.backCCW,lt,Je,"terrain",Ar.vertexBuffer,Ar.indexBuffer,Ar.segments)}St.bindFramebuffer.set(null),St.viewport.set([0,0,Be.width,Be.height])}(this,this.style.map.terrain),function(Be,dt){let St=Be.context,Nt=St.gl,$t=fl.unblended,Tr=new ns(Nt.LEQUAL,ns.ReadWrite,[0,1]),Ar=dt.getTerrainMesh(),Kr=dt.getCoordsTexture(),na=dt.sourceCache.getRenderableTiles(),He=Be.useProgram("terrainCoords");St.bindFramebuffer.set(dt.getFramebuffer("coords").framebuffer),St.viewport.set([0,0,Be.width/devicePixelRatio,Be.height/devicePixelRatio]),St.clear({color:t.aM.transparent,depth:1}),dt.coordsIndex=[];for(let Je of na){let lt=dt.getTerrainData(Je.tileID);St.activeTexture.set(Nt.TEXTURE0),Nt.bindTexture(Nt.TEXTURE_2D,Kr.texture);let vt={u_matrix:Be.transform.calculatePosMatrix(Je.tileID.toUnwrapped()),u_terrain_coords_id:(255-dt.coordsIndex.length)/255,u_texture:0,u_ele_delta:dt.getMeshFrameDelta(Be.transform.zoom)};He.draw(St,Nt.TRIANGLES,Tr,Es.disabled,$t,to.backCCW,vt,lt,"terrain",Ar.vertexBuffer,Ar.indexBuffer,Ar.segments),dt.coordsIndex.push(Je.tileID.key)}St.bindFramebuffer.set(null),St.viewport.set([0,0,Be.width,Be.height])}(this,this.style.map.terrain))}renderLayer(I,ie,we,Se){if(!we.isHidden(this.transform.zoom)&&(we.type==="background"||we.type==="custom"||(Se||[]).length))switch(this.id=we.id,we.type){case"symbol":(function(Be,dt,St,Nt,$t){if(Be.renderPass!=="translucent")return;let Tr=Es.disabled,Ar=Be.colorModeForRenderPass();(St._unevaluatedLayout.hasValue("text-variable-anchor")||St._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(Kr,na,He,Je,lt,vt,Lt,At,zt){let cr=na.transform,yr=pi(),Er=lt==="map",jr=vt==="map";for(let Qr of Kr){let pa=Je.getTile(Qr),Aa=pa.getBucket(He);if(!Aa||!Aa.text||!Aa.text.segments.get().length)continue;let za=t.ag(Aa.textSizeData,cr.zoom),ci=Da(pa,1,na.transform.zoom),Vi=Sr(Qr.posMatrix,jr,Er,na.transform,ci),ji=He.layout.get("icon-text-fit")!=="none"&&Aa.hasIconData();if(za){let nn=Math.pow(2,cr.zoom-pa.tileID.overscaledZ),Sn=na.style.map.terrain?(Bn,wo)=>na.style.map.terrain.getElevation(Qr,Bn,wo):null,Kn=yr.translatePosition(cr,pa,Lt,At);nf(Aa,Er,jr,zt,cr,Vi,Qr.posMatrix,nn,za,ji,yr,Kn,Qr.toUnwrapped(),Sn)}}}(Nt,Be,St,dt,St.layout.get("text-rotation-alignment"),St.layout.get("text-pitch-alignment"),St.paint.get("text-translate"),St.paint.get("text-translate-anchor"),$t),St.paint.get("icon-opacity").constantOr(1)!==0&&Jf(Be,dt,St,Nt,!1,St.paint.get("icon-translate"),St.paint.get("icon-translate-anchor"),St.layout.get("icon-rotation-alignment"),St.layout.get("icon-pitch-alignment"),St.layout.get("icon-keep-upright"),Tr,Ar),St.paint.get("text-opacity").constantOr(1)!==0&&Jf(Be,dt,St,Nt,!0,St.paint.get("text-translate"),St.paint.get("text-translate-anchor"),St.layout.get("text-rotation-alignment"),St.layout.get("text-pitch-alignment"),St.layout.get("text-keep-upright"),Tr,Ar),dt.map.showCollisionBoxes&&(Vu(Be,dt,St,Nt,!0),Vu(Be,dt,St,Nt,!1))})(I,ie,we,Se,this.style.placement.variableOffsets);break;case"circle":(function(Be,dt,St,Nt){if(Be.renderPass!=="translucent")return;let $t=St.paint.get("circle-opacity"),Tr=St.paint.get("circle-stroke-width"),Ar=St.paint.get("circle-stroke-opacity"),Kr=!St.layout.get("circle-sort-key").isConstant();if($t.constantOr(1)===0&&(Tr.constantOr(1)===0||Ar.constantOr(1)===0))return;let na=Be.context,He=na.gl,Je=Be.depthModeForSublayer(0,ns.ReadOnly),lt=Es.disabled,vt=Be.colorModeForRenderPass(),Lt=[];for(let At=0;AtAt.sortKey-zt.sortKey);for(let At of Lt){let{programConfiguration:zt,program:cr,layoutVertexBuffer:yr,indexBuffer:Er,uniformValues:jr,terrainData:Qr}=At.state;cr.draw(na,He.TRIANGLES,Je,lt,vt,to.disabled,jr,Qr,St.id,yr,Er,At.segments,St.paint,Be.transform.zoom,zt)}})(I,ie,we,Se);break;case"heatmap":(function(Be,dt,St,Nt){if(St.paint.get("heatmap-opacity")===0)return;let $t=Be.context;if(Be.style.map.terrain){for(let Tr of Nt){let Ar=dt.getTile(Tr);dt.hasRenderableParent(Tr)||(Be.renderPass==="offscreen"?of(Be,Ar,St,Tr):Be.renderPass==="translucent"&&jc(Be,St,Tr))}$t.viewport.set([0,0,Be.width,Be.height])}else Be.renderPass==="offscreen"?function(Tr,Ar,Kr,na){let He=Tr.context,Je=He.gl,lt=Es.disabled,vt=new fl([Je.ONE,Je.ONE],t.aM.transparent,[!0,!0,!0,!0]);(function(Lt,At,zt){let cr=Lt.gl;Lt.activeTexture.set(cr.TEXTURE1),Lt.viewport.set([0,0,At.width/4,At.height/4]);let yr=zt.heatmapFbos.get(t.aU);yr?(cr.bindTexture(cr.TEXTURE_2D,yr.colorAttachment.get()),Lt.bindFramebuffer.set(yr.framebuffer)):(yr=Bf(Lt,At.width/4,At.height/4),zt.heatmapFbos.set(t.aU,yr))})(He,Tr,Kr),He.clear({color:t.aM.transparent});for(let Lt=0;Lt20&&Tr.texParameterf(Tr.TEXTURE_2D,$t.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,$t.extTextureFilterAnisotropicMax);let Aa=Be.style.map.terrain&&Be.style.map.terrain.getTerrainData(Lt),za=Aa?Lt:null,ci=za?za.posMatrix:Be.transform.calculatePosMatrix(Lt.toUnwrapped(),vt),Vi=Ns(ci,Qr||[0,0],jr||1,Er,St);Ar instanceof at?Kr.draw($t,Tr.TRIANGLES,At,Es.disabled,na,to.disabled,Vi,Aa,St.id,Ar.boundsBuffer,Be.quadTriangleIndexBuffer,Ar.boundsSegments):Kr.draw($t,Tr.TRIANGLES,At,He[Lt.overscaledZ],na,to.disabled,Vi,Aa,St.id,Be.rasterBoundsBuffer,Be.quadTriangleIndexBuffer,Be.rasterBoundsSegments)}})(I,ie,we,Se);break;case"background":(function(Be,dt,St,Nt){let $t=St.paint.get("background-color"),Tr=St.paint.get("background-opacity");if(Tr===0)return;let Ar=Be.context,Kr=Ar.gl,na=Be.transform,He=na.tileSize,Je=St.paint.get("background-pattern");if(Be.isPatternMissing(Je))return;let lt=!Je&&$t.a===1&&Tr===1&&Be.opaquePassEnabledForLayer()?"opaque":"translucent";if(Be.renderPass!==lt)return;let vt=Es.disabled,Lt=Be.depthModeForSublayer(0,lt==="opaque"?ns.ReadWrite:ns.ReadOnly),At=Be.colorModeForRenderPass(),zt=Be.useProgram(Je?"backgroundPattern":"background"),cr=Nt||na.coveringTiles({tileSize:He,terrain:Be.style.map.terrain});Je&&(Ar.activeTexture.set(Kr.TEXTURE0),Be.imageManager.bind(Be.context));let yr=St.getCrossfadeParameters();for(let Er of cr){let jr=Nt?Er.posMatrix:Be.transform.calculatePosMatrix(Er.toUnwrapped()),Qr=Je?Cs(jr,Tr,Be,Je,{tileID:Er,tileSize:He},yr):ls(jr,Tr,$t),pa=Be.style.map.terrain&&Be.style.map.terrain.getTerrainData(Er);zt.draw(Ar,Kr.TRIANGLES,Lt,vt,At,to.disabled,Qr,pa,St.id,Be.tileExtentBuffer,Be.quadTriangleIndexBuffer,Be.tileExtentSegments)}})(I,0,we,Se);break;case"custom":(function(Be,dt,St){let Nt=Be.context,$t=St.implementation;if(Be.renderPass==="offscreen"){let Tr=$t.prerender;Tr&&(Be.setCustomLayerDefaults(),Nt.setColorMode(Be.colorModeForRenderPass()),Tr.call($t,Nt.gl,Be.transform.customLayerMatrix()),Nt.setDirty(),Be.setBaseState())}else if(Be.renderPass==="translucent"){Be.setCustomLayerDefaults(),Nt.setColorMode(Be.colorModeForRenderPass()),Nt.setStencilMode(Es.disabled);let Tr=$t.renderingMode==="3d"?new ns(Be.context.gl.LEQUAL,ns.ReadWrite,Be.depthRangeFor3D):Be.depthModeForSublayer(0,ns.ReadOnly);Nt.setDepthMode(Tr),$t.render(Nt.gl,Be.transform.customLayerMatrix(),{farZ:Be.transform.farZ,nearZ:Be.transform.nearZ,fov:Be.transform._fov,modelViewProjectionMatrix:Be.transform.modelViewProjectionMatrix,projectionMatrix:Be.transform.projectionMatrix}),Nt.setDirty(),Be.setBaseState(),Nt.bindFramebuffer.set(null)}})(I,0,we)}}translatePosMatrix(I,ie,we,Se,Be){if(!we[0]&&!we[1])return I;let dt=Be?Se==="map"?this.transform.angle:0:Se==="viewport"?-this.transform.angle:0;if(dt){let $t=Math.sin(dt),Tr=Math.cos(dt);we=[we[0]*Tr-we[1]*$t,we[0]*$t+we[1]*Tr]}let St=[Be?we[0]:Da(ie,we[0],this.transform.zoom),Be?we[1]:Da(ie,we[1],this.transform.zoom),0],Nt=new Float32Array(16);return t.J(Nt,I,St),Nt}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()),we=this.imageManager.getPattern(I.to.toString());return!ie||!we}useProgram(I,ie){this.cache=this.cache||{};let we=I+(ie?ie.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"")+(this.style.map.terrain?"/terrain":"");return this.cache[we]||(this.cache[we]=new ba(this.context,Hr[I],ie,Ks[I],this._showOverdrawInspector,this.style.map.terrain)),this.cache[we]}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,we){let Se=Math.pow(2,we),Be=[[-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(St=>{let Nt=1/(St=t.af([],St,I))[3]/ie*Se;return t.b1(St,St,[Nt,Nt,1/St[3],Nt])}),dt=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(St=>{let Nt=function(Kr,na){var He=na[0],Je=na[1],lt=na[2],vt=He*He+Je*Je+lt*lt;return vt>0&&(vt=1/Math.sqrt(vt)),Kr[0]=na[0]*vt,Kr[1]=na[1]*vt,Kr[2]=na[2]*vt,Kr}([],function(Kr,na,He){var Je=na[0],lt=na[1],vt=na[2],Lt=He[0],At=He[1],zt=He[2];return Kr[0]=lt*zt-vt*At,Kr[1]=vt*Lt-Je*zt,Kr[2]=Je*At-lt*Lt,Kr}([],M([],Be[St[0]],Be[St[1]]),M([],Be[St[2]],Be[St[1]]))),$t=-((Tr=Nt)[0]*(Ar=Be[St[1]])[0]+Tr[1]*Ar[1]+Tr[2]*Ar[2]);var Tr,Ar;return Nt.concat($t)});return new ol(Be,dt)}}class vc{constructor(I,ie){this.min=I,this.max=ie,this.center=function(we,Se,Be){return we[0]=.5*Se[0],we[1]=.5*Se[1],we[2]=.5*Se[2],we}([],function(we,Se,Be){return we[0]=Se[0]+Be[0],we[1]=Se[1]+Be[1],we[2]=Se[2]+Be[2],we}([],this.min,this.max))}quadrant(I){let ie=[I%2==0,I<2],we=w(this.min),Se=w(this.max);for(let Be=0;Be=0&&dt++;if(dt===0)return 0;dt!==ie.length&&(we=!1)}if(we)return 2;for(let Se=0;Se<3;Se++){let Be=Number.MAX_VALUE,dt=-Number.MAX_VALUE;for(let St=0;Stthis.max[Se]-this.min[Se])return 0}return 1}}class yu{constructor(I=0,ie=0,we=0,Se=0){if(isNaN(I)||I<0||isNaN(ie)||ie<0||isNaN(we)||we<0||isNaN(Se)||Se<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=we,this.right=Se}interpolate(I,ie,we){return ie.top!=null&&I.top!=null&&(this.top=t.y.number(I.top,ie.top,we)),ie.bottom!=null&&I.bottom!=null&&(this.bottom=t.y.number(I.bottom,ie.bottom,we)),ie.left!=null&&I.left!=null&&(this.left=t.y.number(I.left,ie.left,we)),ie.right!=null&&I.right!=null&&(this.right=t.y.number(I.right,ie.right,we)),this}getCenter(I,ie){let we=t.ac((this.left+I-this.right)/2,0,I),Se=t.ac((this.top+ie-this.bottom)/2,0,ie);return new t.P(we,Se)}equals(I){return this.top===I.top&&this.bottom===I.bottom&&this.left===I.left&&this.right===I.right}clone(){return new yu(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}let Tu=85.051129;class El{constructor(I,ie,we,Se,Be){this.tileSize=512,this._renderWorldCopies=Be===void 0||!!Be,this._minZoom=I||0,this._maxZoom=ie||22,this._minPitch=we??0,this._maxPitch=Se??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new t.N(0,0),this._elevation=0,this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new yu,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={},this.minElevationForCurrentTile=0}clone(){let I=new El(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return I.apply(this),I}apply(I){this.tileSize=I.tileSize,this.latRange=I.latRange,this.lngRange=I.lngRange,this.width=I.width,this.height=I.height,this._center=I._center,this._elevation=I._elevation,this.minElevationForCurrentTile=I.minElevationForCurrentTile,this.zoom=I.zoom,this.angle=I.angle,this._fov=I._fov,this._pitch=I._pitch,this._unmodified=I._unmodified,this._edgeInsets=I._edgeInsets.clone(),this._calcMatrices()}get minZoom(){return this._minZoom}set minZoom(I){this._minZoom!==I&&(this._minZoom=I,this.zoom=Math.max(this.zoom,I))}get maxZoom(){return this._maxZoom}set maxZoom(I){this._maxZoom!==I&&(this._maxZoom=I,this.zoom=Math.min(this.zoom,I))}get minPitch(){return this._minPitch}set minPitch(I){this._minPitch!==I&&(this._minPitch=I,this.pitch=Math.max(this.pitch,I))}get maxPitch(){return this._maxPitch}set maxPitch(I){this._maxPitch!==I&&(this._maxPitch=I,this.pitch=Math.min(this.pitch,I))}get renderWorldCopies(){return this._renderWorldCopies}set renderWorldCopies(I){I===void 0?I=!0:I===null&&(I=!1),this._renderWorldCopies=I}get worldSize(){return this.tileSize*this.scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new t.P(this.width,this.height)}get bearing(){return-this.angle/Math.PI*180}set bearing(I){let ie=-t.b3(I,-180,180)*Math.PI/180;this.angle!==ie&&(this._unmodified=!1,this.angle=ie,this._calcMatrices(),this.rotationMatrix=function(){var we=new t.A(4);return t.A!=Float32Array&&(we[1]=0,we[2]=0),we[0]=1,we[3]=1,we}(),function(we,Se,Be){var dt=Se[0],St=Se[1],Nt=Se[2],$t=Se[3],Tr=Math.sin(Be),Ar=Math.cos(Be);we[0]=dt*Ar+Nt*Tr,we[1]=St*Ar+$t*Tr,we[2]=dt*-Tr+Nt*Ar,we[3]=St*-Tr+$t*Ar}(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(I){let ie=t.ac(I,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==ie&&(this._unmodified=!1,this._pitch=ie,this._calcMatrices())}get fov(){return this._fov/Math.PI*180}set fov(I){I=Math.max(.01,Math.min(60,I)),this._fov!==I&&(this._unmodified=!1,this._fov=I/180*Math.PI,this._calcMatrices())}get zoom(){return this._zoom}set zoom(I){let ie=Math.min(Math.max(I,this.minZoom),this.maxZoom);this._zoom!==ie&&(this._unmodified=!1,this._zoom=ie,this.tileZoom=Math.max(0,Math.floor(ie)),this.scale=this.zoomScale(ie),this._constrain(),this._calcMatrices())}get center(){return this._center}set center(I){I.lat===this._center.lat&&I.lng===this._center.lng||(this._unmodified=!1,this._center=I,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}set elevation(I){I!==this._elevation&&(this._elevation=I,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}set padding(I){this._edgeInsets.equals(I)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,I,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this.width,this.height)}isPaddingEqual(I){return this._edgeInsets.equals(I)}interpolatePadding(I,ie,we){this._unmodified=!1,this._edgeInsets.interpolate(I,ie,we),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 we=this.pointCoordinate(new t.P(0,0)),Se=this.pointCoordinate(new t.P(this.width,0)),Be=this.pointCoordinate(new t.P(this.width,this.height)),dt=this.pointCoordinate(new t.P(0,this.height)),St=Math.floor(Math.min(we.x,Se.x,Be.x,dt.x)),Nt=Math.floor(Math.max(we.x,Se.x,Be.x,dt.x)),$t=1;for(let Tr=St-$t;Tr<=Nt+$t;Tr++)Tr!==0&&ie.push(new t.b4(Tr,I))}return ie}coveringTiles(I){var ie,we;let Se=this.coveringZoomLevel(I),Be=Se;if(I.minzoom!==void 0&&SeI.maxzoom&&(Se=I.maxzoom);let dt=this.pointCoordinate(this.getCameraPoint()),St=t.Z.fromLngLat(this.center),Nt=Math.pow(2,Se),$t=[Nt*dt.x,Nt*dt.y,0],Tr=[Nt*St.x,Nt*St.y,0],Ar=ol.fromInvProjectionMatrix(this.invModelViewProjectionMatrix,this.worldSize,Se),Kr=I.minzoom||0;!I.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&(Kr=Se);let na=I.terrain?2/Math.min(this.tileSize,I.tileSize)*this.tileSize:3,He=At=>({aabb:new vc([At*Nt,0,0],[(At+1)*Nt,Nt,0]),zoom:0,x:0,y:0,wrap:At,fullyVisible:!1}),Je=[],lt=[],vt=Se,Lt=I.reparseOverscaled?Be:Se;if(this._renderWorldCopies)for(let At=1;At<=3;At++)Je.push(He(-At)),Je.push(He(At));for(Je.push(He(0));Je.length>0;){let At=Je.pop(),zt=At.x,cr=At.y,yr=At.fullyVisible;if(!yr){let Aa=At.aabb.intersects(Ar);if(Aa===0)continue;yr=Aa===2}let Er=I.terrain?$t:Tr,jr=At.aabb.distanceX(Er),Qr=At.aabb.distanceY(Er),pa=Math.max(Math.abs(jr),Math.abs(Qr));if(At.zoom===vt||pa>na+(1<=Kr){let Aa=vt-At.zoom,za=$t[0]-.5-(zt<>1),Vi=At.zoom+1,ji=At.aabb.quadrant(Aa);if(I.terrain){let nn=new t.S(Vi,At.wrap,Vi,za,ci),Sn=I.terrain.getMinMaxElevation(nn),Kn=(ie=Sn.minElevation)!==null&&ie!==void 0?ie:this.elevation,Bn=(we=Sn.maxElevation)!==null&&we!==void 0?we:this.elevation;ji=new vc([ji.min[0],ji.min[1],Kn],[ji.max[0],ji.max[1],Bn])}Je.push({aabb:ji,zoom:Vi,x:za,y:ci,wrap:At.wrap,fullyVisible:yr})}}return lt.sort((At,zt)=>At.distanceSq-zt.distanceSq).map(At=>At.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,we=Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter,Se=this.pointLocation(this.centerPoint,I),Be=I.getElevationForLngLatZoom(Se,this.tileZoom);if(!(this.elevation-Be))return;let dt=we+ie-Be,St=Math.cos(this._pitch)*this.cameraToCenterDistance/dt/t.b5(1,Se.lat),Nt=this.scaleZoom(St/this.tileSize);this._elevation=Be,this._center=Se,this.zoom=Nt}setLocationAtPoint(I,ie){let we=this.pointCoordinate(ie),Se=this.pointCoordinate(this.centerPoint),Be=this.locationCoordinate(I),dt=new t.Z(Be.x-(we.x-Se.x),Be.y-(we.y-Se.y));this.center=this.coordinateLocation(dt),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 we=[I.x,I.y,0,1],Se=[I.x,I.y,1,1];t.af(we,we,this.pixelMatrixInverse),t.af(Se,Se,this.pixelMatrixInverse);let Be=we[3],dt=Se[3],St=we[1]/Be,Nt=Se[1]/dt,$t=we[2]/Be,Tr=Se[2]/dt,Ar=$t===Tr?0:(0-$t)/(Tr-$t);return new t.Z(t.y.number(we[0]/Be,Se[0]/dt,Ar)/this.worldSize,t.y.number(St,Nt,Ar)/this.worldSize)}coordinatePoint(I,ie=0,we=this.pixelMatrix){let Se=[I.x*this.worldSize,I.y*this.worldSize,ie,1];return t.af(Se,Se,we),new t.P(Se[0]/Se[3],Se[1]/Se[3])}getBounds(){let I=Math.max(0,this.height/2-this.getHorizon());return new re().extend(this.pointLocation(new t.P(0,I))).extend(this.pointLocation(new t.P(this.width,I))).extend(this.pointLocation(new t.P(this.width,this.height))).extend(this.pointLocation(new t.P(0,this.height)))}getMaxBounds(){return this.latRange&&this.latRange.length===2&&this.lngRange&&this.lngRange.length===2?new re([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null}getHorizon(){return Math.tan(Math.PI/2-this._pitch)*this.cameraToCenterDistance*.85}setMaxBounds(I){I?(this.lngRange=[I.getWest(),I.getEast()],this.latRange=[I.getSouth(),I.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-85.051129,Tu])}calculateTileMatrix(I){let ie=I.canonical,we=this.worldSize/this.zoomScale(ie.z),Se=ie.x+Math.pow(2,ie.z)*I.wrap,Be=t.an(new Float64Array(16));return t.J(Be,Be,[Se*we,ie.y*we,0]),t.K(Be,Be,[we/t.X,we/t.X,1]),Be}calculatePosMatrix(I,ie=!1){let we=I.key,Se=ie?this._alignedPosMatrixCache:this._posMatrixCache;if(Se[we])return Se[we];let Be=this.calculateTileMatrix(I);return t.L(Be,ie?this.alignedModelViewProjectionMatrix:this.modelViewProjectionMatrix,Be),Se[we]=new Float32Array(Be),Se[we]}calculateFogMatrix(I){let ie=I.key,we=this._fogMatrixCache;if(we[ie])return we[ie];let Se=this.calculateTileMatrix(I);return t.L(Se,this.fogMatrix,Se),we[ie]=new Float32Array(Se),we[ie]}customLayerMatrix(){return this.mercatorMatrix.slice()}getConstrained(I,ie){ie=t.ac(+ie,this.minZoom,this.maxZoom);let we={center:new t.N(I.lng,I.lat),zoom:ie},Se=this.lngRange;if(!this._renderWorldCopies&&Se===null){let At=179.9999999999;Se=[-At,At]}let Be=this.tileSize*this.zoomScale(we.zoom),dt=0,St=Be,Nt=0,$t=Be,Tr=0,Ar=0,{x:Kr,y:na}=this.size;if(this.latRange){let At=this.latRange;dt=t.Q(At[1])*Be,St=t.Q(At[0])*Be,St-dtSt&&(vt=St-At)}if(Se){let At=(Nt+$t)/2,zt=He;this._renderWorldCopies&&(zt=t.b3(He,At-Be/2,At+Be/2));let cr=Kr/2;zt-cr$t&&(lt=$t-cr)}if(lt!==void 0||vt!==void 0){let At=new t.P(lt??He,vt??Je);we.center=this.unproject.call({worldSize:Be},At).wrap()}return we}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;let I=this._unmodified,{center:ie,zoom:we}=this.getConstrained(this.center,this.zoom);this.center=ie,this.zoom=we,this._unmodified=I,this._constraining=!1}_calcMatrices(){if(!this.height)return;let I=this.centerOffset,ie=this.point.x,we=this.point.y;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height,this._pixelPerMeter=t.b5(1,this.center.lat)*this.worldSize;let Se=t.an(new Float64Array(16));t.K(Se,Se,[this.width/2,-this.height/2,1]),t.J(Se,Se,[1,-1,0]),this.labelPlaneMatrix=Se,Se=t.an(new Float64Array(16)),t.K(Se,Se,[1,-1,1]),t.J(Se,Se,[-1,-1,0]),t.K(Se,Se,[2/this.width,2/this.height,1]),this.glCoordMatrix=Se;let Be=this.cameraToCenterDistance+this._elevation*this._pixelPerMeter/Math.cos(this._pitch),dt=Math.min(this.elevation,this.minElevationForCurrentTile),St=Be-dt*this._pixelPerMeter/Math.cos(this._pitch),Nt=dt<0?St:Be,$t=Math.PI/2+this._pitch,Tr=this._fov*(.5+I.y/this.height),Ar=Math.sin(Tr)*Nt/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)),He=Math.sin(na)*Nt/Math.sin(t.ac(Math.PI-$t-na,.01,Math.PI-.01)),Je=Math.min(Ar,He);this.farZ=1.01*(Math.cos(Math.PI/2-this._pitch)*Je+Nt),this.nearZ=this.height/50,Se=new Float64Array(16),t.b6(Se,this._fov,this.width/this.height,this.nearZ,this.farZ),Se[8]=2*-I.x/this.width,Se[9]=2*I.y/this.height,this.projectionMatrix=t.ae(Se),t.K(Se,Se,[1,-1,1]),t.J(Se,Se,[0,0,-this.cameraToCenterDistance]),t.b7(Se,Se,this._pitch),t.ad(Se,Se,this.angle),t.J(Se,Se,[-ie,-we,0]),this.mercatorMatrix=t.K([],Se,[this.worldSize,this.worldSize,this.worldSize]),t.K(Se,Se,[1,1,this._pixelPerMeter]),this.pixelMatrix=t.L(new Float64Array(16),this.labelPlaneMatrix,Se),t.J(Se,Se,[0,0,-this.elevation]),this.modelViewProjectionMatrix=Se,this.invModelViewProjectionMatrix=t.as([],Se),this.fogMatrix=new Float64Array(16),t.b6(this.fogMatrix,this._fov,this.width/this.height,Be,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,-we,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,Se);let lt=this.width%2/2,vt=this.height%2/2,Lt=Math.cos(this.angle),At=Math.sin(this.angle),zt=ie-Math.round(ie)+Lt*lt+At*vt,cr=we-Math.round(we)+Lt*vt+At*lt,yr=new Float64Array(Se);if(t.J(yr,yr,[zt>.5?zt-1:zt,cr>.5?cr-1:cr,0]),this.alignedModelViewProjectionMatrix=yr,Se=t.as(new Float64Array(16),this.pixelMatrix),!Se)throw new Error("failed to invert matrix");this.pixelMatrixInverse=Se,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 we=ie.x,Se=ie.y,Be=ie.x,dt=ie.y;for(let St of I)we=Math.min(we,St.x),Se=Math.min(Se,St.y),Be=Math.max(Be,St.x),dt=Math.max(dt,St.y);return[new t.P(we,Se),new t.P(Be,Se),new t.P(Be,dt),new t.P(we,dt),new t.P(we,Se)]}}lngLatToCameraDepth(I,ie){let we=this.locationCoordinate(I),Se=[we.x*this.worldSize,we.y*this.worldSize,ie,1];return t.af(Se,Se,this.modelViewProjectionMatrix),Se[2]/Se[3]}}function qf(Ue,I){let ie,we=!1,Se=null,Be=null,dt=()=>{Se=null,we&&(Ue.apply(Be,ie),Se=setTimeout(dt,I),we=!1)};return(...St)=>(we=!0,Be=this,ie=St,Se||dt(),Se)}class Qf{constructor(I){this._getCurrentHash=()=>{let ie=window.location.hash.replace("#","");if(this._hashName){let we;return ie.split("&").map(Se=>Se.split("=")).forEach(Se=>{Se[0]===this._hashName&&(we=Se)}),(we&&we[1]||"").split("/")}return ie.split("/")},this._onHashChange=()=>{let ie=this._getCurrentHash();if(ie.length>=3&&!ie.some(we=>isNaN(we))){let we=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:we,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 we=ie.join("/"),Se=we;Se.split("&").length>0&&(Se=Se.split("&")[0]),this._hashName&&(Se=`${this._hashName}=${we}`);let Be=window.location.hash.replace(Se,"");Be.startsWith("#&")?Be=Be.slice(0,1)+Be.slice(2):Be==="#"&&(Be="");let dt=window.location.href.replace(/(#.+)?$/,Be);dt=dt.replace("&&","&"),window.history.replaceState(window.history.state,null,dt)},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(),we=Math.round(100*this._map.getZoom())/100,Se=Math.ceil((we*Math.LN2+Math.log(512/360/.5))/Math.LN10),Be=Math.pow(10,Se),dt=Math.round(ie.lng*Be)/Be,St=Math.round(ie.lat*Be)/Be,Nt=this._map.getBearing(),$t=this._map.getPitch(),Tr="";if(Tr+=I?`/${dt}/${St}/${we}`:`${we}/${St}/${dt}`,(Nt||$t)&&(Tr+="/"+Math.round(10*Nt)/10),$t&&(Tr+=`/${Math.round($t)}`),this._hashName){let Ar=this._hashName,Kr=!1,na=window.location.hash.slice(1).split("&").map(He=>{let Je=He.split("=")[0];return Je===Ar?(Kr=!0,`${Je}=${Tr}`):He}).filter(He=>He);return Kr||na.push(`${Ar}=${Tr}`),`#${na.join("&")}`}return`#${Tr}`}}let Bu={linearity:.3,easing:t.b8(0,0,.3,1)},Ec=t.e({deceleration:2500,maxSpeed:1400},Bu),mc=t.e({deceleration:20,maxSpeed:1400},Bu),Lh=t.e({deceleration:1e3,maxSpeed:360},Bu),sf=t.e({deceleration:1e3,maxSpeed:90},Bu);class vf{constructor(I){this._map=I,this.clear()}clear(){this._inertiaBuffer=[]}record(I){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:n.now(),settings:I})}_drainInertiaBuffer(){let I=this._inertiaBuffer,ie=n.now();for(;I.length>0&&ie-I[0].time>160;)I.shift()}_onMoveEnd(I){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;let ie={zoom:0,bearing:0,pitch:0,pan:new t.P(0,0),pinchAround:void 0,around:void 0};for(let{settings:Be}of this._inertiaBuffer)ie.zoom+=Be.zoomDelta||0,ie.bearing+=Be.bearingDelta||0,ie.pitch+=Be.pitchDelta||0,Be.panDelta&&ie.pan._add(Be.panDelta),Be.around&&(ie.around=Be.around),Be.pinchAround&&(ie.pinchAround=Be.pinchAround);let we=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,Se={};if(ie.pan.mag()){let Be=lf(ie.pan.mag(),we,t.e({},Ec,I||{}));Se.offset=ie.pan.mult(Be.amount/ie.pan.mag()),Se.center=this._map.transform.center,Nu(Se,Be)}if(ie.zoom){let Be=lf(ie.zoom,we,mc);Se.zoom=this._map.transform.zoom+Be.amount,Nu(Se,Be)}if(ie.bearing){let Be=lf(ie.bearing,we,Lh);Se.bearing=this._map.transform.bearing+t.ac(Be.amount,-179,179),Nu(Se,Be)}if(ie.pitch){let Be=lf(ie.pitch,we,sf);Se.pitch=this._map.transform.pitch+Be.amount,Nu(Se,Be)}if(Se.zoom||Se.bearing){let Be=ie.pinchAround===void 0?ie.around:ie.pinchAround;Se.around=Be?this._map.unproject(Be):this._map.getCenter()}return this.clear(),t.e(Se,{noMoveStart:!0})}}function Nu(Ue,I){(!Ue.duration||Ue.durationie.unproject(Nt)),St=Be.reduce((Nt,$t,Tr,Ar)=>Nt.add($t.div(Ar.length)),new t.P(0,0));super(I,{points:Be,point:St,lngLats:dt,lngLat:ie.unproject(St),originalEvent:we}),this._defaultPrevented=!1}}class hh extends t.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(I,ie,we){super(I,{originalEvent:we}),this._defaultPrevented=!1}}class mf{constructor(I,ie){this._map=I,this._clickTolerance=ie.clickTolerance}reset(){delete this._mousedownPos}wheel(I){return this._firePreventable(new hh(I.type,this._map,I))}mousedown(I,ie){return this._mousedownPos=ie,this._firePreventable(new au(I.type,this._map,I))}mouseup(I){this._map.fire(new au(I.type,this._map,I))}click(I,ie){this._mousedownPos&&this._mousedownPos.dist(ie)>=this._clickTolerance||this._map.fire(new au(I.type,this._map,I))}dblclick(I){return this._firePreventable(new au(I.type,this._map,I))}mouseover(I){this._map.fire(new au(I.type,this._map,I))}mouseout(I){this._map.fire(new au(I.type,this._map,I))}touchstart(I){return this._firePreventable(new Yc(I.type,this._map,I))}touchmove(I){this._map.fire(new Yc(I.type,this._map,I))}touchend(I){this._map.fire(new Yc(I.type,this._map,I))}touchcancel(I){this._map.fire(new Yc(I.type,this._map,I))}_firePreventable(I){if(this._map.fire(I),I.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class sl{constructor(I){this._map=I}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(I){this._map.fire(new au(I.type,this._map,I))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new au("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(I){this._delayContextMenu?this._contextMenuEvent=I:this._ignoreContextMenu||this._map.fire(new au(I.type,this._map,I)),this._map.listens("contextmenu")&&I.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class _u{constructor(I){this._map=I}get transform(){return this._map._requestedCameraState||this._map.transform}get center(){return{lng:this.transform.center.lng,lat:this.transform.center.lat}}get zoom(){return this.transform.zoom}get pitch(){return this.transform.pitch}get bearing(){return this.transform.bearing}unproject(I){return this.transform.pointLocation(t.P.convert(I),this._map.terrain)}}class Pu{constructor(I,ie){this._map=I,this._tr=new _u(I),this._el=I.getCanvasContainer(),this._container=I.getContainer(),this._clickTolerance=ie.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(I,ie){this.isEnabled()&&I.shiftKey&&I.button===0&&(i.disableDrag(),this._startPos=this._lastPos=ie,this._active=!0)}mousemoveWindow(I,ie){if(!this._active)return;let we=ie;if(this._lastPos.equals(we)||!this._box&&we.dist(this._startPos)Be.fitScreenCoordinates(we,Se,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",I)}keydown(I){this._active&&I.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",I))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(i.remove(this._box),this._box=null),i.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(I,ie){return this._map.fire(new t.k(I,{originalEvent:ie}))}}function Cf(Ue,I){if(Ue.length!==I.length)throw new Error(`The number of touches and points are not equal - touches ${Ue.length}, points ${I.length}`);let ie={};for(let we=0;wethis.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=I.timeStamp),we.length===this.numTouches&&(this.centroid=function(Se){let Be=new t.P(0,0);for(let dt of Se)Be._add(dt);return Be.div(Se.length)}(ie),this.touches=Cf(we,ie)))}touchmove(I,ie,we){if(this.aborted||!this.centroid)return;let Se=Cf(we,ie);for(let Be in this.touches){let dt=Se[Be];(!dt||dt.dist(this.touches[Be])>30)&&(this.aborted=!0)}}touchend(I,ie,we){if((!this.centroid||I.timeStamp-this.startTime>500)&&(this.aborted=!0),we.length===0){let Se=!this.aborted&&this.centroid;if(this.reset(),Se)return Se}}}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,we){this.singleTap.touchstart(I,ie,we)}touchmove(I,ie,we){this.singleTap.touchmove(I,ie,we)}touchend(I,ie,we){let Se=this.singleTap.touchend(I,ie,we);if(Se){let Be=I.timeStamp-this.lastTime<500,dt=!this.lastTap||this.lastTap.dist(Se)<30;if(Be&&dt||this.reset(),this.count++,this.lastTime=I.timeStamp,this.lastTap=Se,this.count===this.numTaps)return this.reset(),Se}}}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,we){this._zoomIn.touchstart(I,ie,we),this._zoomOut.touchstart(I,ie,we)}touchmove(I,ie,we){this._zoomIn.touchmove(I,ie,we),this._zoomOut.touchmove(I,ie,we)}touchend(I,ie,we){let Se=this._zoomIn.touchend(I,ie,we),Be=this._zoomOut.touchend(I,ie,we),dt=this._tr;return Se?(this._active=!0,I.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:St=>St.easeTo({duration:300,zoom:dt.zoom+1,around:dt.unproject(Se)},{originalEvent:I})}):Be?(this._active=!0,I.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:St=>St.easeTo({duration:300,zoom:dt.zoom-1,around:dt.unproject(Be)},{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 we=this._lastPoint;if(!we)return;if(I.preventDefault(),!this._moveStateManager.isValidMoveEvent(I))return void this.reset(I);let Se=ie.length?ie[0]:ie;return!this._moved&&Se.dist(we){Ue.mousedown=Ue.dragStart,Ue.mousemoveWindow=Ue.dragMove,Ue.mouseup=Ue.dragEnd,Ue.contextmenu=I=>{I.preventDefault()}},iu=({enable:Ue,clickTolerance:I,bearingDegreesPerPixelMoved:ie=.8})=>{let we=new Wu({checkCorrectEvent:Se=>i.mouseButton(Se)===0&&Se.ctrlKey||i.mouseButton(Se)===2});return new Hu({clickTolerance:I,move:(Se,Be)=>({bearingDelta:(Be.x-Se.x)*ie}),moveStateManager:we,enable:Ue,assignEvents:Lf})},Vf=({enable:Ue,clickTolerance:I,pitchDegreesPerPixelMoved:ie=-.5})=>{let we=new Wu({checkCorrectEvent:Se=>i.mouseButton(Se)===0&&Se.ctrlKey||i.mouseButton(Se)===2});return new Hu({clickTolerance:I,move:(Se,Be)=>({pitchDelta:(Be.y-Se.y)*ie}),moveStateManager:we,enable:Ue,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,we){return this._calculateTransform(I,ie,we)}touchmove(I,ie,we){if(this._active){if(!this._shouldBePrevented(we.length))return I.preventDefault(),this._calculateTransform(I,ie,we);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",I)}}touchend(I,ie,we){this._calculateTransform(I,ie,we),this._active&&this._shouldBePrevented(we.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(I,ie,we){we.length>0&&(this._active=!0);let Se=Cf(we,ie),Be=new t.P(0,0),dt=new t.P(0,0),St=0;for(let $t in Se){let Tr=Se[$t],Ar=this._touches[$t];Ar&&(Be._add(Tr),dt._add(Tr.sub(Ar)),St++,Se[$t]=Tr)}if(this._touches=Se,this._shouldBePrevented(St)||!dt.mag())return;let Nt=dt.div(St);return this._sum._add(Nt),this._sum.mag()Math.abs(Ue.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,we){super.touchstart(I,ie,we),this._currentTouchCount=we.length}_start(I){this._lastPoints=I,sc(I[0].sub(I[1]))&&(this._valid=!1)}_move(I,ie,we){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;let Se=I[0].sub(this._lastPoints[0]),Be=I[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(Se,Be,we.timeStamp),this._valid?(this._lastPoints=I,this._active=!0,{pitchDelta:(Se.y+Be.y)/2*-.5}):void 0}gestureBeginsVertically(I,ie,we){if(this._valid!==void 0)return this._valid;let Se=I.mag()>=2,Be=ie.mag()>=2;if(!Se&&!Be)return;if(!Se||!Be)return this._firstMove===void 0&&(this._firstMove=we),we-this._firstMove<100&&void 0;let dt=I.y>0==ie.y>0;return sc(I)&&sc(ie)&&dt}}let Qt={panStep:100,bearingStep:15,pitchStep:10};class br{constructor(I){this._tr=new _u(I);let ie=Qt;this._panStep=ie.panStep,this._bearingStep=ie.bearingStep,this._pitchStep=ie.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(I){if(I.altKey||I.ctrlKey||I.metaKey)return;let ie=0,we=0,Se=0,Be=0,dt=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?we=-1:(I.preventDefault(),Be=-1);break;case 39:I.shiftKey?we=1:(I.preventDefault(),Be=1);break;case 38:I.shiftKey?Se=1:(I.preventDefault(),dt=-1);break;case 40:I.shiftKey?Se=-1:(I.preventDefault(),dt=1);break;default:return}return this._rotationDisabled&&(we=0,Se=0),{cameraAnimation:St=>{let Nt=this._tr;St.easeTo({duration:300,easeId:"keyboardHandler",easing:aa,zoom:ie?Math.round(Nt.zoom)+ie*(I.shiftKey?2:1):Nt.zoom,bearing:Nt.bearing+we*this._bearingStep,pitch:Nt.pitch+Se*this._pitchStep,offset:[-Be*this._panStep,-dt*this._panStep],center:Nt.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(Ue){return Ue*(2-Ue)}let $r=4.000244140625;class ka{constructor(I,ie){this._onTimeout=we=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(we)},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,we=n.now(),Se=we-(this._lastWheelEventTime||0);this._lastWheelEventTime=we,ie!==0&&ie%$r==0?this._type="wheel":ie!==0&&Math.abs(ie)<4?this._type="trackpad":Se>400?(this._type=null,this._lastValue=ie,this._timeout=setTimeout(this._onTimeout,40,I)):this._type||(this._type=Math.abs(Se*ie)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,ie+=this._lastValue)),I.shiftKey&&ie&&(ie/=4),this._type&&(this._lastWheelEvent=I,this._delta-=ie,this._active||this._start(I)),I.preventDefault()}_start(I){if(!this._delta)return;this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);let ie=i.mousePos(this._map.getCanvas(),I),we=this._tr;this._around=ie.y>we.transform.height/2-we.transform.getHorizon()?t.N.convert(this._aroundCenter?we.center:we.unproject(ie)):t.N.convert(we.center),this._aroundPoint=we.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 Nt=this._type==="wheel"&&Math.abs(this._delta)>$r?this._wheelZoomRate:this._defaultZoomRate,$t=2/(1+Math.exp(-Math.abs(this._delta*Nt)));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,we=this._startZoom,Se=this._easing,Be,dt=!1,St=n.now()-this._lastWheelEventTime;if(this._type==="wheel"&&we&&Se&&St){let Nt=Math.min(St/200,1),$t=Se(Nt);Be=t.y.number(we,ie,$t),Nt<1?this._frameId||(this._frameId=!0):dt=!0}else Be=ie,dt=!0;return this._active=!0,dt&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!dt,zoomDelta:Be-I.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(I){let ie=t.b9;if(this._prevEase){let we=this._prevEase,Se=(n.now()-we.start)/we.duration,Be=we.easing(Se+.01)-we.easing(Se),dt=.27/Math.sqrt(Be*Be+1e-4)*.01,St=Math.sqrt(.0729-dt*dt);ie=t.b8(dt,St,.25,1)}return this._prevEase={start:n.now(),duration:I,easing:ie},ie}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class li{constructor(I,ie){this._clickZoom=I,this._tapZoom=ie}enable(){this._clickZoom.enable(),this._tapZoom.enable()}disable(){this._clickZoom.disable(),this._tapZoom.disable()}isEnabled(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()}isActive(){return this._clickZoom.isActive()||this._tapZoom.isActive()}}class Ci{constructor(I){this._tr=new _u(I),this.reset()}reset(){this._active=!1}dblclick(I,ie){return I.preventDefault(),{cameraAnimation:we=>{we.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,we){if(!this._swipePoint)if(this._tapTime){let Se=ie[0],Be=I.timeStamp-this._tapTime<500,dt=this._tapPoint.dist(Se)<30;Be&&dt?we.length>0&&(this._swipePoint=Se,this._swipeTouch=we[0].identifier):this.reset()}else this._tap.touchstart(I,ie,we)}touchmove(I,ie,we){if(this._tapTime){if(this._swipePoint){if(we[0].identifier!==this._swipeTouch)return;let Se=ie[0],Be=Se.y-this._swipePoint.y;return this._swipePoint=Se,I.preventDefault(),this._active=!0,{zoomDelta:Be/128}}}else this._tap.touchmove(I,ie,we)}touchend(I,ie,we){if(this._tapTime)this._swipePoint&&we.length===0&&this.reset();else{let Se=this._tap.touchend(I,ie,we);Se&&(this._tapTime=I.timeStamp,this._tapPoint=Se)}}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,we){this._el=I,this._mousePan=ie,this._touchPan=we}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 dn{constructor(I,ie,we){this._pitchWithRotate=I.pitchWithRotate,this._mouseRotate=ie,this._mousePitch=we}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,we,Se){this._el=I,this._touchZoom=ie,this._touchRotate=we,this._tapDragZoom=Se,this._rotationDisabled=!1,this._enabled=!0}enable(I){this._touchZoom.enable(I),this._rotationDisabled||this._touchRotate.enable(I),this._tapDragZoom.enable(),this._el.classList.add("maplibregl-touch-zoom-rotate")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("maplibregl-touch-zoom-rotate")}isEnabled(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()}isActive(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}class Di{constructor(I,ie){this._bypassKey=navigator.userAgent.indexOf("Mac")!==-1?"metaKey":"ctrlKey",this._map=I,this._options=ie,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;let I=this._map.getCanvasContainer();I.classList.add("maplibregl-cooperative-gestures"),this._container=i.create("div","maplibregl-cooperative-gesture-screen",I);let ie=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(ie=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));let we=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),Se=document.createElement("div");Se.className="maplibregl-desktop-message",Se.textContent=ie,this._container.appendChild(Se);let Be=document.createElement("div");Be.className="maplibregl-mobile-message",Be.textContent=we,this._container.appendChild(Be),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(i.remove(this._container),this._map.getCanvasContainer().classList.remove("maplibregl-cooperative-gestures")),delete this._container}enable(){this._setupUI(),this._enabled=!0}disable(){this._enabled=!1,this._destroyUI()}isEnabled(){return this._enabled}isBypassed(I){return I[this._bypassKey]}notifyGestureBlocked(I,ie){this._enabled&&(this._map.fire(new t.k("cooperativegestureprevented",{gestureType:I,originalEvent:ie})),this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}}let Ni=Ue=>Ue.zoom||Ue.drag||Ue.pitch||Ue.rotate;class mi extends t.k{}function Mn(Ue){return Ue.panDelta&&Ue.panDelta.mag()||Ue.zoomDelta||Ue.bearingDelta||Ue.pitchDelta}class Qn{constructor(I,ie){this.handleWindowEvent=Se=>{this.handleEvent(Se,`${Se.type}Window`)},this.handleEvent=(Se,Be)=>{if(Se.type==="blur")return void this.stop(!0);this._updatingCamera=!0;let dt=Se.type==="renderFrame"?void 0:Se,St={needsRenderFrame:!1},Nt={},$t={},Tr=Se.touches,Ar=Tr?this._getMapTouches(Tr):void 0,Kr=Ar?i.touchPos(this._map.getCanvas(),Ar):i.mousePos(this._map.getCanvas(),Se);for(let{handlerName:Je,handler:lt,allowed:vt}of this._handlers){if(!lt.isEnabled())continue;let Lt;this._blockedByActive($t,vt,Je)?lt.reset():lt[Be||Se.type]&&(Lt=lt[Be||Se.type](Se,Kr,Ar),this.mergeHandlerResult(St,Nt,Lt,Je,dt),Lt&&Lt.needsRenderFrame&&this._triggerRenderFrame()),(Lt||lt.isActive())&&($t[Je]=lt)}let na={};for(let Je in this._previousActiveHandlers)$t[Je]||(na[Je]=dt);this._previousActiveHandlers=$t,(Object.keys(na).length||Mn(St))&&(this._changes.push([St,Nt,na]),this._triggerRenderFrame()),(Object.keys($t).length||Mn(St))&&this._map._stop(!0),this._updatingCamera=!1;let{cameraAnimation:He}=St;He&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],He(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 we=this._el;this._listeners=[[we,"touchstart",{passive:!0}],[we,"touchmove",{passive:!1}],[we,"touchend",void 0],[we,"touchcancel",void 0],[we,"mousedown",void 0],[we,"mousemove",void 0],[we,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[we,"mouseover",void 0],[we,"mouseout",void 0],[we,"dblclick",void 0],[we,"click",void 0],[we,"keydown",{capture:!1}],[we,"keyup",void 0],[we,"wheel",{passive:!1}],[we,"contextmenu",void 0],[window,"blur",void 0]];for(let[Se,Be,dt]of this._listeners)i.addEventListener(Se,Be,Se===document?this.handleWindowEvent:this.handleEvent,dt)}destroy(){for(let[I,ie,we]of this._listeners)i.removeEventListener(I,ie,I===document?this.handleWindowEvent:this.handleEvent,we)}_addDefaultHandlers(I){let ie=this._map,we=ie.getCanvasContainer();this._add("mapEvent",new mf(ie,I));let Se=ie.boxZoom=new Pu(ie,I);this._add("boxZoom",Se),I.interactive&&I.boxZoom&&Se.enable();let Be=ie.cooperativeGestures=new Di(ie,I.cooperativeGestures);this._add("cooperativeGestures",Be),I.cooperativeGestures&&Be.enable();let dt=new kc(ie),St=new Ci(ie);ie.doubleClickZoom=new li(St,dt),this._add("tapZoom",dt),this._add("clickZoom",St),I.interactive&&I.doubleClickZoom&&ie.doubleClickZoom.enable();let Nt=new Hi;this._add("tapDragZoom",Nt);let $t=ie.touchPitch=new Pc(ie);this._add("touchPitch",$t),I.interactive&&I.touchPitch&&ie.touchPitch.enable(I.touchPitch);let Tr=iu(I),Ar=Vf(I);ie.dragRotate=new dn(I,Tr,Ar),this._add("mouseRotate",Tr,["mousePitch"]),this._add("mousePitch",Ar,["mouseRotate"]),I.interactive&&I.dragRotate&&ie.dragRotate.enable();let Kr=(({enable:Lt,clickTolerance:At})=>{let zt=new Wu({checkCorrectEvent:cr=>i.mouseButton(cr)===0&&!cr.ctrlKey});return new Hu({clickTolerance:At,move:(cr,yr)=>({around:yr,panDelta:yr.sub(cr)}),activateOnStart:!0,moveStateManager:zt,enable:Lt,assignEvents:Lf})})(I),na=new Xu(I,ie);ie.dragPan=new Qi(we,Kr,na),this._add("mousePan",Kr),this._add("touchPan",na,["touchZoom","touchRotate"]),I.interactive&&I.dragPan&&ie.dragPan.enable(I.dragPan);let He=new Jc,Je=new xu;ie.touchZoomRotate=new Pi(we,Je,He,Nt),this._add("touchRotate",He,["touchPan","touchZoom"]),this._add("touchZoom",Je,["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 vt=ie.keyboard=new br(ie);this._add("keyboard",vt),I.interactive&&I.keyboard&&ie.keyboard.enable(),this._add("blockableMapEvent",new sl(ie))}_add(I,ie,we){this._handlers.push({handlerName:I,handler:ie,allowed:we}),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,we){for(let Se in I)if(Se!==we&&(!ie||ie.indexOf(Se)<0))return!0;return!1}_getMapTouches(I){let ie=[];for(let we of I)this._el.contains(we.target)&&ie.push(we);return ie}mergeHandlerResult(I,ie,we,Se,Be){if(!we)return;t.e(I,we);let dt={handlerName:Se,originalEvent:we.originalEvent||Be};we.zoomDelta!==void 0&&(ie.zoom=dt),we.panDelta!==void 0&&(ie.drag=dt),we.pitchDelta!==void 0&&(ie.pitch=dt),we.bearingDelta!==void 0&&(ie.rotate=dt)}_applyChanges(){let I={},ie={},we={};for(let[Se,Be,dt]of this._changes)Se.panDelta&&(I.panDelta=(I.panDelta||new t.P(0,0))._add(Se.panDelta)),Se.zoomDelta&&(I.zoomDelta=(I.zoomDelta||0)+Se.zoomDelta),Se.bearingDelta&&(I.bearingDelta=(I.bearingDelta||0)+Se.bearingDelta),Se.pitchDelta&&(I.pitchDelta=(I.pitchDelta||0)+Se.pitchDelta),Se.around!==void 0&&(I.around=Se.around),Se.pinchAround!==void 0&&(I.pinchAround=Se.pinchAround),Se.noInertia&&(I.noInertia=Se.noInertia),t.e(ie,Be),t.e(we,dt);this._updateMapTransform(I,ie,we),this._changes=[]}_updateMapTransform(I,ie,we){let Se=this._map,Be=Se._getTransformForUpdate(),dt=Se.terrain;if(!(Mn(I)||dt&&this._terrainMovement))return this._fireEvents(ie,we,!0);let{panDelta:St,zoomDelta:Nt,bearingDelta:$t,pitchDelta:Tr,around:Ar,pinchAround:Kr}=I;Kr!==void 0&&(Ar=Kr),Se._stop(!0),Ar=Ar||Se.transform.centerPoint;let na=Be.pointLocation(St?Ar.sub(St):Ar);$t&&(Be.bearing+=$t),Tr&&(Be.pitch+=Tr),Nt&&(Be.zoom+=Nt),dt?this._terrainMovement||!ie.drag&&!ie.zoom?ie.drag&&this._terrainMovement?Be.center=Be.pointLocation(Be.centerPoint.sub(St)):Be.setLocationAtPoint(na,Ar):(this._terrainMovement=!0,this._map._elevationFreeze=!0,Be.setLocationAtPoint(na,Ar)):Be.setLocationAtPoint(na,Ar),Se._applyUpdatedTransform(Be),this._map._update(),I.noInertia||this._inertia.record(I),this._fireEvents(ie,we,!0)}_fireEvents(I,ie,we){let Se=Ni(this._eventsInProgress),Be=Ni(I),dt={};for(let Ar in I){let{originalEvent:Kr}=I[Ar];this._eventsInProgress[Ar]||(dt[`${Ar}start`]=Kr),this._eventsInProgress[Ar]=I[Ar]}!Se&&Be&&this._fireEvent("movestart",Be.originalEvent);for(let Ar in dt)this._fireEvent(Ar,dt[Ar]);Be&&this._fireEvent("move",Be.originalEvent);for(let Ar in I){let{originalEvent:Kr}=I[Ar];this._fireEvent(Ar,Kr)}let St={},Nt;for(let Ar in this._eventsInProgress){let{handlerName:Kr,originalEvent:na}=this._eventsInProgress[Ar];this._handlersById[Kr].isActive()||(delete this._eventsInProgress[Ar],Nt=ie[Kr]||na,St[`${Ar}end`]=Nt)}for(let Ar in St)this._fireEvent(Ar,St[Ar]);let $t=Ni(this._eventsInProgress),Tr=(Se||Be)&&!$t;if(Tr&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;let Ar=this._map._getTransformForUpdate();Ar.recalculateZoom(this._map.terrain),this._map._applyUpdatedTransform(Ar)}if(we&&Tr){this._updatingCamera=!0;let Ar=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),Kr=na=>na!==0&&-this._bearingSnap{delete this._frameId,this.handleEvent(new mi("renderFrame",{timeStamp:I})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class ao extends t.E{constructor(I,ie){super(),this._renderFrameCallback=()=>{let we=Math.min((n.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(we)),we<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,we){return I=t.P.convert(I).mult(-1),this.panTo(this.transform.center,t.e({offset:I},ie),we)}panTo(I,ie,we){return this.easeTo(t.e({center:I},ie),we)}getZoom(){return this.transform.zoom}setZoom(I,ie){return this.jumpTo({zoom:I},ie),this}zoomTo(I,ie,we){return this.easeTo(t.e({zoom:I},ie),we)}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,we){return this.easeTo(t.e({bearing:I},ie),we)}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&&(Se.zoom=t.y.number(Be,lt,Er)),this._rotating&&(Se.bearing=t.y.number(dt,$t,Er)),this._pitching&&(Se.pitch=t.y.number(St,Tr,Er)),this._padding&&(Se.interpolatePadding(Nt,Ar,Er),na=Se.centerPoint.add(Kr)),this.terrain&&!I.freezeElevation&&this._updateElevation(Er),zt)Se.setLocationAtPoint(zt,cr);else{let jr=Se.zoomScale(Se.zoom-Be),Qr=lt>Be?Math.min(2,At):Math.max(.5,At),pa=Math.pow(Qr,1-Er),Aa=Se.unproject(vt.add(Lt.mult(Er*pa)).mult(jr));Se.setLocationAtPoint(Se.renderWorldCopies?Aa.wrap():Aa,na)}this._applyUpdatedTransform(Se),this._fireMoveEvents(ie)},Er=>{this.terrain&&I.freezeElevation&&this._finalizeElevation(),this._afterEase(ie,Er)},I),this}_prepareEase(I,ie,we={}){this._moving=!0,ie||we.moving||this.fire(new t.k("movestart",I)),this._zooming&&!we.zooming&&this.fire(new t.k("zoomstart",I)),this._rotating&&!we.rotating&&this.fire(new t.k("rotatestart",I)),this._pitching&&!we.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 we=this._elevationTarget-this._elevationStart;this._elevationStart+=I*(we-(ie-(we*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(),we=this.terrain.getElevationForLngLatZoom(ie.lngLat,I.zoom);if(ie.altitudethis._elevateCameraIfInsideTerrain(Se)),this.transformCameraUpdate&&ie.push(Se=>this.transformCameraUpdate(Se)),!ie.length)return;let we=I.clone();for(let Se of ie){let Be=we.clone(),{center:dt,zoom:St,pitch:Nt,bearing:$t,elevation:Tr}=Se(Be);dt&&(Be.center=dt),St!==void 0&&(Be.zoom=St),Nt!==void 0&&(Be.pitch=Nt),$t!==void 0&&(Be.bearing=$t),Tr!==void 0&&(Be.elevation=Tr),we.apply(Be)}this.transform.apply(we)}_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 we=this._zooming,Se=this._rotating,Be=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,we&&this.fire(new t.k("zoomend",I)),Se&&this.fire(new t.k("rotateend",I)),Be&&this.fire(new t.k("pitchend",I)),this.fire(new t.k("moveend",I))}flyTo(I,ie){var we;if(!I.essential&&n.prefersReducedMotion){let nn=t.M(I,["center","zoom","bearing","pitch","around"]);return this.jumpTo(nn,ie)}this.stop(),I=t.e({offset:[0,0],speed:1.2,curve:1.42,easing:t.b9},I);let Se=this._getTransformForUpdate(),Be=Se.zoom,dt=Se.bearing,St=Se.pitch,Nt=Se.padding,$t="bearing"in I?this._normalizeBearing(I.bearing,dt):dt,Tr="pitch"in I?+I.pitch:St,Ar="padding"in I?I.padding:Se.padding,Kr=t.P.convert(I.offset),na=Se.centerPoint.add(Kr),He=Se.pointLocation(na),{center:Je,zoom:lt}=Se.getConstrained(t.N.convert(I.center||He),(we=I.zoom)!==null&&we!==void 0?we:Be);this._normalizeCenter(Je,Se);let vt=Se.zoomScale(lt-Be),Lt=Se.project(He),At=Se.project(Je).sub(Lt),zt=I.curve,cr=Math.max(Se.width,Se.height),yr=cr/vt,Er=At.mag();if("minZoom"in I){let nn=t.ac(Math.min(I.minZoom,Be,lt),Se.minZoom,Se.maxZoom),Sn=cr/Se.zoomScale(nn-Be);zt=Math.sqrt(Sn/Er*2)}let jr=zt*zt;function Qr(nn){let Sn=(yr*yr-cr*cr+(nn?-1:1)*jr*jr*Er*Er)/(2*(nn?yr:cr)*jr*Er);return Math.log(Math.sqrt(Sn*Sn+1)-Sn)}function pa(nn){return(Math.exp(nn)-Math.exp(-nn))/2}function Aa(nn){return(Math.exp(nn)+Math.exp(-nn))/2}let za=Qr(!1),ci=function(nn){return Aa(za)/Aa(za+zt*nn)},Vi=function(nn){return cr*((Aa(za)*(pa(Sn=za+zt*nn)/Aa(Sn))-pa(za))/jr)/Er;var Sn},ji=(Qr(!0)-za)/zt;if(Math.abs(Er)<1e-6||!isFinite(ji)){if(Math.abs(cr-yr)<1e-6)return this.easeTo(I,ie);let nn=yr0,ci=Sn=>Math.exp(nn*zt*Sn)}return I.duration="duration"in I?+I.duration:1e3*ji/("screenSpeed"in I?+I.screenSpeed/zt:+I.speed),I.maxDuration&&I.duration>I.maxDuration&&(I.duration=0),this._zooming=!0,this._rotating=dt!==$t,this._pitching=Tr!==St,this._padding=!Se.isPaddingEqual(Ar),this._prepareEase(ie,!1),this.terrain&&this._prepareElevation(Je),this._ease(nn=>{let Sn=nn*ji,Kn=1/ci(Sn);Se.zoom=nn===1?lt:Be+Se.scaleZoom(Kn),this._rotating&&(Se.bearing=t.y.number(dt,$t,nn)),this._pitching&&(Se.pitch=t.y.number(St,Tr,nn)),this._padding&&(Se.interpolatePadding(Nt,Ar,nn),na=Se.centerPoint.add(Kr)),this.terrain&&!I.freezeElevation&&this._updateElevation(nn);let Bn=nn===1?Je:Se.unproject(Lt.add(At.mult(Vi(Sn))).mult(Kn));Se.setLocationAtPoint(Se.renderWorldCopies?Bn.wrap():Bn,na),this._applyUpdatedTransform(Se),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 we;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){let Se=this._onEaseEnd;delete this._onEaseEnd,Se.call(this,ie)}return I||(we=this.handlers)===null||we===void 0||we.stop(!1),this}_ease(I,ie,we){we.animate===!1||we.duration===0?(I(1),ie()):(this._easeStart=n.now(),this._easeOptions=we,this._onEaseFrame=I,this._onEaseEnd=ie,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(I,ie){I=t.b3(I,-180,180);let we=Math.abs(I-ie);return Math.abs(I-360-ie)180?-360:we<-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 fo{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=i.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=i.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=i.create("div","maplibregl-ctrl-attrib-inner",this._container),this._updateAttributions(),this._updateCompact(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("terrain",this._updateData),this._map.on("resize",this._updateCompact),this._map.on("drag",this._updateCompactMinimize),this._container}onRemove(){i.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("terrain",this._updateData),this._map.off("resize",this._updateCompact),this._map.off("drag",this._updateCompactMinimize),this._map=void 0,this._compact=void 0,this._attribHTML=void 0}_setElementTitle(I,ie){let we=this._map._getUIString(`AttributionControl.${ie}`);I.title=we,I.setAttribute("aria-label",we)}_updateAttributions(){if(!this._map.style)return;let I=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?I=I.concat(this.options.customAttribution.map(Se=>typeof Se!="string"?"":Se)):typeof this.options.customAttribution=="string"&&I.push(this.options.customAttribution)),this._map.style.stylesheet){let Se=this._map.style.stylesheet;this.styleOwner=Se.owner,this.styleId=Se.id}let ie=this._map.style.sourceCaches;for(let Se in ie){let Be=ie[Se];if(Be.used||Be.usedForTerrain){let dt=Be.getSource();dt.attribution&&I.indexOf(dt.attribution)<0&&I.push(dt.attribution)}}I=I.filter(Se=>String(Se).trim()),I.sort((Se,Be)=>Se.length-Be.length),I=I.filter((Se,Be)=>{for(let dt=Be+1;dt=0)return!1;return!0});let we=I.join(" | ");we!==this._attribHTML&&(this._attribHTML=we,I.length?(this._innerContainer.innerHTML=we,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 we=ie[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&we.classList.add("maplibregl-compact"):we.classList.remove("maplibregl-compact")}},this.options=I}getDefaultPosition(){return"bottom-left"}onAdd(I){this._map=I,this._compact=this.options&&this.options.compact,this._container=i.create("div","maplibregl-ctrl");let ie=i.create("a","maplibregl-ctrl-logo");return ie.target="_blank",ie.rel="noopener nofollow",ie.href="https://maplibre.org/",ie.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),ie.setAttribute("rel","noopener nofollow"),this._container.appendChild(ie),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){i.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class un{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(I){let ie=++this._id;return this._queue.push({callback:I,id:ie,cancelled:!1}),ie}remove(I){let ie=this._currentlyRunning,we=ie?this._queue.concat(ie):this._queue;for(let Se of we)if(Se.id===I)return void(Se.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 we of ie)if(!we.cancelled&&(we.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 Ko extends t.E{constructor(I){super(),this.sourceCache=I,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.deltaZoom=1,I.usedForTerrain=!0,I.tileSize=this.tileSize*2**this.deltaZoom}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(I,ie){this.sourceCache.update(I,ie),this._renderableTilesKeys=[];let we={};for(let Se of I.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:ie}))we[Se.key]=!0,this._renderableTilesKeys.push(Se.key),this._tiles[Se.key]||(Se.posMatrix=new Float64Array(16),t.aP(Se.posMatrix,0,t.X,0,t.X,0,1),this._tiles[Se.key]=new ot(Se,this.tileSize));for(let Se in this._tiles)we[Se]||delete this._tiles[Se]}freeRtt(I){for(let ie in this._tiles){let we=this._tiles[ie];(!I||we.tileID.equals(I)||we.tileID.isChildOf(I)||I.isChildOf(we.tileID))&&(we.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(I=>this.getTileByID(I))}getTileByID(I){return this._tiles[I]}getTerrainCoords(I){let ie={};for(let we of this._renderableTilesKeys){let Se=this._tiles[we].tileID;if(Se.canonical.equals(I.canonical)){let Be=I.clone();Be.posMatrix=new Float64Array(16),t.aP(Be.posMatrix,0,t.X,0,t.X,0,1),ie[we]=Be}else if(Se.canonical.isChildOf(I.canonical)){let Be=I.clone();Be.posMatrix=new Float64Array(16);let dt=Se.canonical.z-I.canonical.z,St=Se.canonical.x-(Se.canonical.x>>dt<>dt<>dt;t.aP(Be.posMatrix,0,$t,0,$t,0,1),t.J(Be.posMatrix,Be.posMatrix,[-St*$t,-Nt*$t,0]),ie[we]=Be}else if(I.canonical.isChildOf(Se.canonical)){let Be=I.clone();Be.posMatrix=new Float64Array(16);let dt=I.canonical.z-Se.canonical.z,St=I.canonical.x-(I.canonical.x>>dt<>dt<>dt;t.aP(Be.posMatrix,0,t.X,0,t.X,0,1),t.J(Be.posMatrix,Be.posMatrix,[St*$t,Nt*$t,0]),t.K(Be.posMatrix,Be.posMatrix,[1/2**dt,1/2**dt,0]),ie[we]=Be}}return ie}getSourceTile(I,ie){let we=this.sourceCache._source,Se=I.overscaledZ-this.deltaZoom;if(Se>we.maxzoom&&(Se=we.maxzoom),Se=we.minzoom&&(!Be||!Be.dem);)Be=this.sourceCache.getTileByID(I.scaledTo(Se--).key);return Be}tilesAfterTime(I=Date.now()){return Object.values(this._tiles).filter(ie=>ie.timeAdded>=I)}}class Ss{constructor(I,ie,we){this.painter=I,this.sourceCache=new Ko(ie),this.options=we,this.exaggeration=typeof we.exaggeration=="number"?we.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(I,ie,we,Se=t.X){var Be;if(!(ie>=0&&ie=0&&weI.canonical.z&&(I.canonical.z>=Se?Be=I.canonical.z-Se:t.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));let dt=I.canonical.x-(I.canonical.x>>Be<>Be<>8<<4|Be>>8,ie[dt+3]=0;let we=new t.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(ie.buffer)),Se=new u(I,we,I.gl.RGBA,{premultiply:!1});return Se.bind(I.gl.NEAREST,I.gl.CLAMP_TO_EDGE),this._coordsTexture=Se,Se}pointCoordinate(I){this.painter.maybeDrawDepthAndCoords(!0);let ie=new Uint8Array(4),we=this.painter.context,Se=we.gl,Be=Math.round(I.x*this.painter.pixelRatio/devicePixelRatio),dt=Math.round(I.y*this.painter.pixelRatio/devicePixelRatio),St=Math.round(this.painter.height/devicePixelRatio);we.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),Se.readPixels(Be,St-dt-1,1,1,Se.RGBA,Se.UNSIGNED_BYTE,ie),we.bindFramebuffer.set(null);let Nt=ie[0]+(ie[2]>>4<<8),$t=ie[1]+((15&ie[2])<<8),Tr=this.coordsIndex[255-ie[3]],Ar=Tr&&this.sourceCache.getTileByID(Tr);if(!Ar)return null;let Kr=this._coordsTextureSize,na=(1<I.id!==ie),this._recentlyUsed.push(I.id)}stampObject(I){I.stamp=++this._stamp}getOrCreateFreeObject(){for(let ie of this._recentlyUsed)if(!this._objects[ie].inUse)return this._objects[ie];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");let I=this._createObject(this._objects.length);return this._objects.push(I),I}freeObject(I){I.inUse=!1}freeAllObjects(){for(let I of this._objects)this.freeObject(I)}isFull(){return!(this._objects.length!I.inUse)===!1}}let Os={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(we=>!I._layers[we].isHidden(ie)),this._coordsDescendingInv={};for(let we in I.sourceCaches){this._coordsDescendingInv[we]={};let Se=I.sourceCaches[we].getVisibleCoordinates();for(let Be of Se){let dt=this.terrain.sourceCache.getTerrainCoords(Be);for(let St in dt)this._coordsDescendingInv[we][St]||(this._coordsDescendingInv[we][St]=[]),this._coordsDescendingInv[we][St].push(dt[St])}}this._coordsDescendingInvStr={};for(let we of I._order){let Se=I._layers[we],Be=Se.source;if(Os[Se.type]&&!this._coordsDescendingInvStr[Be]){this._coordsDescendingInvStr[Be]={};for(let dt in this._coordsDescendingInv[Be])this._coordsDescendingInvStr[Be][dt]=this._coordsDescendingInv[Be][dt].map(St=>St.key).sort().join()}}for(let we of this._renderableTiles)for(let Se in this._coordsDescendingInvStr){let Be=this._coordsDescendingInvStr[Se][we.tileID.key];Be&&Be!==we.rttCoords[Se]&&(we.rtt=[])}}renderLayer(I){if(I.isHidden(this.painter.transform.zoom))return!1;let ie=I.type,we=this.painter,Se=this._renderableLayerIds[this._renderableLayerIds.length-1]===I.id;if(Os[ie]&&(this._prevType&&Os[this._prevType]||this._stacks.push([]),this._prevType=ie,this._stacks[this._stacks.length-1].push(I.id),!Se))return!0;if(Os[this._prevType]||Os[ie]&&Se){this._prevType=ie;let Be=this._stacks.length-1,dt=this._stacks[Be]||[];for(let St of this._renderableTiles){if(this.pool.isFull()&&(yl(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(St),St.rtt[Be]){let $t=this.pool.getObjectForId(St.rtt[Be].id);if($t.stamp===St.rtt[Be].stamp){this.pool.useObject($t);continue}}let Nt=this.pool.getOrCreateFreeObject();this.pool.useObject(Nt),this.pool.stampObject(Nt),St.rtt[Be]={id:Nt.id,stamp:Nt.stamp},we.context.bindFramebuffer.set(Nt.fbo.framebuffer),we.context.clear({color:t.aM.transparent,stencil:0}),we.currentStencilSource=void 0;for(let $t=0;$t{Ue.touchstart=Ue.dragStart,Ue.touchmoveWindow=Ue.dragMove,Ue.touchend=Ue.dragEnd},Un={showCompass:!0,showZoom:!0,visualizePitch:!1};class Lo{constructor(I,ie,we=!1){this.mousedown=dt=>{this.startMouse(t.e({},dt,{ctrlKey:!0,preventDefault:()=>dt.preventDefault()}),i.mousePos(this.element,dt)),i.addEventListener(window,"mousemove",this.mousemove),i.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=dt=>{this.moveMouse(dt,i.mousePos(this.element,dt))},this.mouseup=dt=>{this.mouseRotate.dragEnd(dt),this.mousePitch&&this.mousePitch.dragEnd(dt),this.offTemp()},this.touchstart=dt=>{dt.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=i.touchPos(this.element,dt.targetTouches)[0],this.startTouch(dt,this._startPos),i.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),i.addEventListener(window,"touchend",this.touchend))},this.touchmove=dt=>{dt.targetTouches.length!==1?this.reset():(this._lastPos=i.touchPos(this.element,dt.targetTouches)[0],this.moveTouch(dt,this._lastPos))},this.touchend=dt=>{dt.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 Se=I.dragRotate._mouseRotate.getClickTolerance(),Be=I.dragRotate._mousePitch.getClickTolerance();this.element=ie,this.mouseRotate=iu({clickTolerance:Se,enable:!0}),this.touchRotate=(({enable:dt,clickTolerance:St,bearingDegreesPerPixelMoved:Nt=.8})=>{let $t=new Kc;return new Hu({clickTolerance:St,move:(Tr,Ar)=>({bearingDelta:(Ar.x-Tr.x)*Nt}),moveStateManager:$t,enable:dt,assignEvents:ll})})({clickTolerance:Se,enable:!0}),this.map=I,we&&(this.mousePitch=Vf({clickTolerance:Be,enable:!0}),this.touchPitch=(({enable:dt,clickTolerance:St,pitchDegreesPerPixelMoved:Nt=-.5})=>{let $t=new Kc;return new Hu({clickTolerance:St,move:(Tr,Ar)=>({pitchDelta:(Ar.y-Tr.y)*Nt}),moveStateManager:$t,enable:dt,assignEvents:ll})})({clickTolerance:Be,enable:!0})),i.addEventListener(ie,"mousedown",this.mousedown),i.addEventListener(ie,"touchstart",this.touchstart,{passive:!1}),i.addEventListener(ie,"touchcancel",this.reset)}startMouse(I,ie){this.mouseRotate.dragStart(I,ie),this.mousePitch&&this.mousePitch.dragStart(I,ie),i.disableDrag()}startTouch(I,ie){this.touchRotate.dragStart(I,ie),this.touchPitch&&this.touchPitch.dragStart(I,ie),i.disableDrag()}moveMouse(I,ie){let we=this.map,{bearingDelta:Se}=this.mouseRotate.dragMove(I,ie)||{};if(Se&&we.setBearing(we.getBearing()+Se),this.mousePitch){let{pitchDelta:Be}=this.mousePitch.dragMove(I,ie)||{};Be&&we.setPitch(we.getPitch()+Be)}}moveTouch(I,ie){let we=this.map,{bearingDelta:Se}=this.touchRotate.dragMove(I,ie)||{};if(Se&&we.setBearing(we.getBearing()+Se),this.touchPitch){let{pitchDelta:Be}=this.touchPitch.dragMove(I,ie)||{};Be&&we.setPitch(we.getPitch()+Be)}}off(){let I=this.element;i.removeEventListener(I,"mousedown",this.mousedown),i.removeEventListener(I,"touchstart",this.touchstart,{passive:!1}),i.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),i.removeEventListener(window,"touchend",this.touchend),i.removeEventListener(I,"touchcancel",this.reset),this.offTemp()}offTemp(){i.enableDrag(),i.removeEventListener(window,"mousemove",this.mousemove),i.removeEventListener(window,"mouseup",this.mouseup),i.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),i.removeEventListener(window,"touchend",this.touchend)}}let Js;function Rs(Ue,I,ie){let we=new t.N(Ue.lng,Ue.lat);if(Ue=new t.N(Ue.lng,Ue.lat),I){let Se=new t.N(Ue.lng-360,Ue.lat),Be=new t.N(Ue.lng+360,Ue.lat),dt=ie.locationPoint(Ue).distSqr(I);ie.locationPoint(Se).distSqr(I)180;){let Se=ie.locationPoint(Ue);if(Se.x>=0&&Se.y>=0&&Se.x<=ie.width&&Se.y<=ie.height)break;Ue.lng>ie.center.lng?Ue.lng-=360:Ue.lng+=360}return Ue.lng!==we.lng&&ie.locationPoint(Ue).y>ie.height/2-ie.getHorizon()?Ue:we}let uu={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function Iu(Ue,I,ie){let we=Ue.classList;for(let Se in uu)we.remove(`maplibregl-${ie}-anchor-${Se}`);we.add(`maplibregl-${ie}-anchor-${I}`)}class Zu extends t.E{constructor(I){if(super(),this._onKeyPress=ie=>{let we=ie.code,Se=ie.charCode||ie.keyCode;we!=="Space"&&we!=="Enter"&&Se!==32&&Se!==13||this.togglePopup()},this._onMapClick=ie=>{let we=ie.originalEvent.target,Se=this._element;this._popup&&(we===Se||Se.contains(we))&&this.togglePopup()},this._update=ie=>{var we;if(!this._map)return;let Se=this._map.loaded()&&!this._map.isMoving();(ie?.type==="terrain"||ie?.type==="render"&&!Se)&&this._map.once("render",this._update),this._lngLat=this._map.transform.renderWorldCopies?Rs(this._lngLat,this._flatPos,this._map.transform):(we=this._lngLat)===null||we===void 0?void 0:we.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 Be="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?Be=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(Be=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let dt="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?dt="rotateX(0deg)":this._pitchAlignment==="map"&&(dt=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||ie&&ie.type!=="moveend"||(this._pos=this._pos.round()),i.setTransform(this._element,`${uu[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${dt} ${Be}`),n.frameAsync(new AbortController).then(()=>{this._updateOpacity(ie&&ie.type==="moveend")}).catch(()=>{})},this._onMove=ie=>{if(!this._isDragging){let we=this._clickTolerance||this._map._clickTolerance;this._isDragging=ie.point.dist(this._pointerdownPos)>=we}this._isDragging&&(this._pos=ie.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new t.k("dragstart"))),this.fire(new t.k("drag")))},this._onUp=()=>{this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new t.k("dragend")),this._state="inactive"},this._addDragHandler=ie=>{this._element.contains(ie.originalEvent.target)&&(ie.preventDefault(),this._positionDelta=ie.point.sub(this._pos).add(this._offset),this._pointerdownPos=ie.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},this._anchor=I&&I.anchor||"center",this._color=I&&I.color||"#3FB1CE",this._scale=I&&I.scale||1,this._draggable=I&&I.draggable||!1,this._clickTolerance=I&&I.clickTolerance||0,this._subpixelPositioning=I&&I.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=I&&I.rotation||0,this._rotationAlignment=I&&I.rotationAlignment||"auto",this._pitchAlignment=I&&I.pitchAlignment&&I.pitchAlignment!=="auto"?I.pitchAlignment:this._rotationAlignment,this.setOpacity(),this.setOpacity(I?.opacity,I?.opacityWhenCovered),I&&I.element)this._element=I.element,this._offset=t.P.convert(I&&I.offset||[0,0]);else{this._defaultMarker=!0,this._element=i.create("div");let ie=i.createNS("http://www.w3.org/2000/svg","svg"),we=41,Se=27;ie.setAttributeNS(null,"display","block"),ie.setAttributeNS(null,"height",`${we}px`),ie.setAttributeNS(null,"width",`${Se}px`),ie.setAttributeNS(null,"viewBox",`0 0 ${Se} ${we}`);let Be=i.createNS("http://www.w3.org/2000/svg","g");Be.setAttributeNS(null,"stroke","none"),Be.setAttributeNS(null,"stroke-width","1"),Be.setAttributeNS(null,"fill","none"),Be.setAttributeNS(null,"fill-rule","evenodd");let dt=i.createNS("http://www.w3.org/2000/svg","g");dt.setAttributeNS(null,"fill-rule","nonzero");let St=i.createNS("http://www.w3.org/2000/svg","g");St.setAttributeNS(null,"transform","translate(3.0, 29.0)"),St.setAttributeNS(null,"fill","#000000");let Nt=[{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 vt of Nt){let Lt=i.createNS("http://www.w3.org/2000/svg","ellipse");Lt.setAttributeNS(null,"opacity","0.04"),Lt.setAttributeNS(null,"cx","10.5"),Lt.setAttributeNS(null,"cy","5.80029008"),Lt.setAttributeNS(null,"rx",vt.rx),Lt.setAttributeNS(null,"ry",vt.ry),St.appendChild(Lt)}let $t=i.createNS("http://www.w3.org/2000/svg","g");$t.setAttributeNS(null,"fill",this._color);let Tr=i.createNS("http://www.w3.org/2000/svg","path");Tr.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),$t.appendChild(Tr);let Ar=i.createNS("http://www.w3.org/2000/svg","g");Ar.setAttributeNS(null,"opacity","0.25"),Ar.setAttributeNS(null,"fill","#000000");let Kr=i.createNS("http://www.w3.org/2000/svg","path");Kr.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),Ar.appendChild(Kr);let na=i.createNS("http://www.w3.org/2000/svg","g");na.setAttributeNS(null,"transform","translate(6.0, 7.0)"),na.setAttributeNS(null,"fill","#FFFFFF");let He=i.createNS("http://www.w3.org/2000/svg","g");He.setAttributeNS(null,"transform","translate(8.0, 8.0)");let Je=i.createNS("http://www.w3.org/2000/svg","circle");Je.setAttributeNS(null,"fill","#000000"),Je.setAttributeNS(null,"opacity","0.25"),Je.setAttributeNS(null,"cx","5.5"),Je.setAttributeNS(null,"cy","5.5"),Je.setAttributeNS(null,"r","5.4999962");let lt=i.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"),He.appendChild(Je),He.appendChild(lt),dt.appendChild(St),dt.appendChild($t),dt.appendChild(Ar),dt.appendChild(na),dt.appendChild(He),ie.appendChild(dt),ie.setAttributeNS(null,"height",we*this._scale+"px"),ie.setAttributeNS(null,"width",Se*this._scale+"px"),this._element.appendChild(ie),this._offset=t.P.convert(I&&I.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",ie=>{ie.preventDefault()}),this._element.addEventListener("mousedown",ie=>{ie.preventDefault()}),Iu(this._element,this._anchor,"marker"),I&&I.className)for(let ie of I.className.split(" "))this._element.classList.add(ie);this._popup=null}addTo(I){return this.remove(),this._map=I,this._element.setAttribute("aria-label",I._getUIString("Marker.Title")),I.getCanvasContainer().appendChild(this._element),I.on("move",this._update),I.on("moveend",this._update),I.on("terrain",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this}remove(){return this._opacityTimeout&&(clearTimeout(this._opacityTimeout),delete this._opacityTimeout),this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("terrain",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),i.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(I){return this._lngLat=t.N.convert(I),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(I){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),I){if(!("offset"in I.options)){let Se=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":[Se,-1*(38.1-13.5+Se)],"bottom-right":[-Se,-1*(38.1-13.5+Se)],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,we;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 Se=this._map,Be=Se.terrain.depthAtPoint(this._pos),dt=Se.terrain.getElevationForLngLatZoom(this._lngLat,Se.transform.tileZoom);if(Se.transform.lngLatToCameraDepth(this._lngLat,dt)-Be<.006)return void(this._element.style.opacity=this._opacity);let St=-this._offset.y/Se.transform._pixelPerMeter,Nt=Math.sin(Se.getPitch()*Math.PI/180)*St,$t=Se.terrain.depthAtPoint(new t.P(this._pos.x,this._pos.y-this._offset.y)),Tr=Se.transform.lngLatToCameraDepth(this._lngLat,dt+Nt)-$t>.006;!((we=this._popup)===null||we===void 0)&&we.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(Ue,I,ie){let we=ie&&ie.maxWidth||100,Se=Ue._container.clientHeight/2,Be=Ue.unproject([0,Se]),dt=Ue.unproject([we,Se]),St=Be.distanceTo(dt);if(ie&&ie.unit==="imperial"){let Nt=3.2808*St;Nt>5280?ho(I,we,Nt/5280,Ue._getUIString("ScaleControl.Miles")):ho(I,we,Nt,Ue._getUIString("ScaleControl.Feet"))}else ie&&ie.unit==="nautical"?ho(I,we,St/1852,Ue._getUIString("ScaleControl.NauticalMiles")):St>=1e3?ho(I,we,St/1e3,Ue._getUIString("ScaleControl.Kilometers")):ho(I,we,St,Ue._getUIString("ScaleControl.Meters"))}function ho(Ue,I,ie,we){let Se=function(Be){let dt=Math.pow(10,`${Math.floor(Be)}`.length-1),St=Be/dt;return St=St>=10?10:St>=5?5:St>=3?3:St>=2?2:St>=1?1:function(Nt){let $t=Math.pow(10,Math.ceil(-Math.log(Nt)/Math.LN10));return Math.round(Nt*$t)/$t}(St),dt*St}(ie);Ue.style.width=I*(Se/ie)+"px",Ue.innerHTML=`${Se} ${we}`}let Ro={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(Ue){if(Ue){if(typeof Ue=="number"){let I=Math.round(Math.abs(Ue)/Math.SQRT2);return{center:new t.P(0,0),top:new t.P(0,Ue),"top-left":new t.P(I,I),"top-right":new t.P(-I,I),bottom:new t.P(0,-Ue),"bottom-left":new t.P(I,-I),"bottom-right":new t.P(-I,-I),left:new t.P(Ue,0),right:new t.P(-Ue,0)}}if(Ue instanceof t.P||Array.isArray(Ue)){let I=t.P.convert(Ue);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(Ue.center||[0,0]),top:t.P.convert(Ue.top||[0,0]),"top-left":t.P.convert(Ue["top-left"]||[0,0]),"top-right":t.P.convert(Ue["top-right"]||[0,0]),bottom:t.P.convert(Ue.bottom||[0,0]),"bottom-left":t.P.convert(Ue["bottom-left"]||[0,0]),"bottom-right":t.P.convert(Ue["bottom-right"]||[0,0]),left:t.P.convert(Ue.left||[0,0]),right:t.P.convert(Ue.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=fo,e.BoxZoomHandler=Pu,e.CanvasSource=rt,e.CooperativeGesturesHandler=Di,e.DoubleClickZoomHandler=li,e.DragPanHandler=Qi,e.DragRotateHandler=dn,e.EdgeInsets=yu,e.FullscreenControl=class extends t.E{constructor(Ue={}){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,Ue&&Ue.container&&(Ue.container instanceof HTMLElement?this._container=Ue.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(Ue){return this._map=Ue,this._container||(this._container=this._map.getContainer()),this._controlContainer=i.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){i.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){let Ue=this._fullscreenButton=i.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);i.create("span","maplibregl-ctrl-icon",Ue).setAttribute("aria-hidden","true"),Ue.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){let Ue=this._getTitle();this._fullscreenButton.setAttribute("aria-label",Ue),this._fullscreenButton.title=Ue}_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=ze,e.GeolocateControl=class extends t.E{constructor(Ue){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),we=I.coords.accuracy,Se=this._map.getBearing(),Be=t.e({bearing:Se},this.options.fitBoundsOptions),dt=re.fromLngLat(ie,we);this._map.fitBounds(dt,Be,{geolocateSource:!0})},this._updateMarker=I=>{if(I){let ie=new t.N(I.coords.longitude,I.coords.latitude);this._accuracyCircleMarker.setLngLat(ie).addTo(this._map),this._userLocationDotMarker.setLngLat(ie).addTo(this._map),this._accuracy=I.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onZoom=()=>{this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},this._onError=I=>{if(this._map){if(this.options.trackUserLocation)if(I.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;let ie=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=ie,this._geolocateButton.setAttribute("aria-label",ie),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(I.code===3&&Rc)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new t.k("error",I)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",I=>I.preventDefault()),this._geolocateButton=i.create("button","maplibregl-ctrl-geolocate",this._container),i.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=I=>{if(this._map){if(I===!1){t.w("Geolocation support is not available so the GeolocateControl will be disabled.");let ie=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=ie,this._geolocateButton.setAttribute("aria-label",ie)}else{let ie=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=ie,this._geolocateButton.setAttribute("aria-label",ie)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=i.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new Zu({element:this._dotElement}),this._circleElement=i.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Zu({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",()=>this.trigger()),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",ie=>{ie.geolocateSource||this._watchState!=="ACTIVE_LOCK"||ie.originalEvent&&ie.originalEvent.type==="resize"||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new t.k("trackuserlocationend")),this.fire(new t.k("userlocationlostfocus")))})}},this.options=t.e({},Ic,Ue)}onAdd(Ue){return this._map=Ue,this._container=i.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),function(){return t._(this,arguments,void 0,function*(I=!1){if(Js!==void 0&&!I)return Js;if(window.navigator.permissions===void 0)return Js=!!window.navigator.geolocation,Js;try{Js=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch{Js=!!window.navigator.geolocation}return Js})}().then(I=>this._finishSetupUI(I)),this._container}onRemove(){this._geolocationWatchID!==void 0&&(window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),i.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,bu=0,Rc=!1}_isOutOfMapMaxBounds(Ue){let I=this._map.getMaxBounds(),ie=Ue.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 Ue=this._map.getBounds(),I=Ue.getSouthEast(),ie=Ue.getNorthEast(),we=I.distanceTo(ie),Se=Math.ceil(this._accuracy/(we/this._map._container.clientHeight)*2);this._circleElement.style.width=`${Se}px`,this._circleElement.style.height=`${Se}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 Ue;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),bu++,bu>1?(Ue={maximumAge:6e5,timeout:0},Rc=!0):(Ue=this.options.positionOptions,Rc=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,Ue)}}else window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_clearWatch(){window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}},e.Hash=Qf,e.ImageSource=at,e.KeyboardHandler=br,e.LngLatBounds=re,e.LogoControl=An,e.Map=class extends ao{constructor(Ue){t.bf.mark(t.bg.create);let I=Object.assign(Object.assign({},_l),Ue);if(I.minZoom!=null&&I.maxZoom!=null&&I.minZoom>I.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(I.minPitch!=null&&I.maxPitch!=null&&I.minPitch>I.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(I.minPitch!=null&&I.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(I.maxPitch!=null&&I.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(super(new El(I.minZoom,I.maxZoom,I.minPitch,I.maxPitch,I.renderWorldCopies),{bearingSnap:I.bearingSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new un,this._controls=[],this._mapId=t.a4(),this._contextLost=ie=>{ie.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.fire(new t.k("webglcontextlost",{originalEvent:ie}))},this._contextRestored=ie=>{this._setupPainter(),this.resize(),this._update(),this.fire(new t.k("webglcontextrestored",{originalEvent:ie}))},this._onMapScroll=ie=>{if(ie.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=I.interactive,this._maxTileCacheSize=I.maxTileCacheSize,this._maxTileCacheZoomLevels=I.maxTileCacheZoomLevels,this._failIfMajorPerformanceCaveat=I.failIfMajorPerformanceCaveat===!0,this._preserveDrawingBuffer=I.preserveDrawingBuffer===!0,this._antialias=I.antialias===!0,this._trackResize=I.trackResize===!0,this._bearingSnap=I.bearingSnap,this._refreshExpiredTiles=I.refreshExpiredTiles===!0,this._fadeDuration=I.fadeDuration,this._crossSourceCollisions=I.crossSourceCollisions===!0,this._collectResourceTiming=I.collectResourceTiming===!0,this._locale=Object.assign(Object.assign({},bs),I.locale),this._clickTolerance=I.clickTolerance,this._overridePixelRatio=I.pixelRatio,this._maxCanvasSize=I.maxCanvasSize,this.transformCameraUpdate=I.transformCameraUpdate,this.cancelPendingTileRequestsWhileZooming=I.cancelPendingTileRequestsWhileZooming===!0,this._imageQueueHandle=l.addThrottleControl(()=>this.isMoving()),this._requestManager=new _(I.transformRequest),typeof I.container=="string"){if(this._container=document.getElementById(I.container),!this._container)throw new Error(`Container '${I.container}' not found.`)}else{if(!(I.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=I.container}if(I.maxBounds&&this.setMaxBounds(I.maxBounds),this._setupContainer(),this._setupPainter(),this.on("move",()=>this._update(!1)).on("moveend",()=>this._update(!1)).on("zoom",()=>this._update(!0)).on("terrain",()=>{this.painter.terrainFacilitator.dirty=!0,this._update(!0)}).once("idle",()=>{this._idleTriggered=!0}),typeof window<"u"){addEventListener("online",this._onWindowOnline,!1);let ie=!1,we=qf(Se=>{this._trackResize&&!this._removed&&(this.resize(Se),this.redraw())},50);this._resizeObserver=new ResizeObserver(Se=>{ie?we(Se):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 fo(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(Ue,I){if(I===void 0&&(I=Ue.getDefaultPosition?Ue.getDefaultPosition():"top-right"),!Ue||!Ue.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=Ue.onAdd(this);this._controls.push(Ue);let we=this._controlPositions[I];return I.indexOf("bottom")!==-1?we.insertBefore(ie,we.firstChild):we.appendChild(ie),this}removeControl(Ue){if(!Ue||!Ue.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(Ue);return I>-1&&this._controls.splice(I,1),Ue.onRemove(this),this}hasControl(Ue){return this._controls.indexOf(Ue)>-1}calculateCameraOptionsFromTo(Ue,I,ie,we){return we==null&&this.terrain&&(we=this.terrain.getElevationForLngLatZoom(ie,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(Ue,I,ie,we)}resize(Ue){var I;let ie=this._containerDimensions(),we=ie[0],Se=ie[1],Be=this._getClampedPixelRatio(we,Se);if(this._resizeCanvas(we,Se,Be),this.painter.resize(we,Se,Be),this.painter.overLimit()){let St=this.painter.context.gl;this._maxCanvasSize=[St.drawingBufferWidth,St.drawingBufferHeight];let Nt=this._getClampedPixelRatio(we,Se);this._resizeCanvas(we,Se,Nt),this.painter.resize(we,Se,Nt)}this.transform.resize(we,Se),(I=this._requestedCameraState)===null||I===void 0||I.resize(we,Se);let dt=!this._moving;return dt&&(this.stop(),this.fire(new t.k("movestart",Ue)).fire(new t.k("move",Ue))),this.fire(new t.k("resize",Ue)),dt&&this.fire(new t.k("moveend",Ue)),this}_getClampedPixelRatio(Ue,I){let{0:ie,1:we}=this._maxCanvasSize,Se=this.getPixelRatio(),Be=Ue*Se,dt=I*Se;return Math.min(Be>ie?ie/Be:1,dt>we?we/dt:1)*Se}getPixelRatio(){var Ue;return(Ue=this._overridePixelRatio)!==null&&Ue!==void 0?Ue:devicePixelRatio}setPixelRatio(Ue){this._overridePixelRatio=Ue,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(Ue){return this.transform.setMaxBounds(re.convert(Ue)),this._update()}setMinZoom(Ue){if((Ue=Ue??-2)>=-2&&Ue<=this.transform.maxZoom)return this.transform.minZoom=Ue,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=Ue,this._update(),this.getZoom()>Ue&&this.setZoom(Ue),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(Ue){if((Ue=Ue??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(Ue>=0&&Ue<=this.transform.maxPitch)return this.transform.minPitch=Ue,this._update(),this.getPitch()85)throw new Error("maxPitch must be less than or equal to 85");if(Ue>=this.transform.minPitch)return this.transform.maxPitch=Ue,this._update(),this.getPitch()>Ue&&this.setPitch(Ue),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(Ue){return this.transform.renderWorldCopies=Ue,this._update()}project(Ue){return this.transform.locationPoint(t.N.convert(Ue),this.style&&this.terrain)}unproject(Ue){return this.transform.pointLocation(t.P.convert(Ue),this.terrain)}isMoving(){var Ue;return this._moving||((Ue=this.handlers)===null||Ue===void 0?void 0:Ue.isMoving())}isZooming(){var Ue;return this._zooming||((Ue=this.handlers)===null||Ue===void 0?void 0:Ue.isZooming())}isRotating(){var Ue;return this._rotating||((Ue=this.handlers)===null||Ue===void 0?void 0:Ue.isRotating())}_createDelegatedListener(Ue,I,ie){if(Ue==="mouseenter"||Ue==="mouseover"){let we=!1;return{layers:I,listener:ie,delegates:{mousemove:Be=>{let dt=I.filter(Nt=>this.getLayer(Nt)),St=dt.length!==0?this.queryRenderedFeatures(Be.point,{layers:dt}):[];St.length?we||(we=!0,ie.call(this,new au(Ue,this,Be.originalEvent,{features:St}))):we=!1},mouseout:()=>{we=!1}}}}if(Ue==="mouseleave"||Ue==="mouseout"){let we=!1;return{layers:I,listener:ie,delegates:{mousemove:dt=>{let St=I.filter(Nt=>this.getLayer(Nt));(St.length!==0?this.queryRenderedFeatures(dt.point,{layers:St}):[]).length?we=!0:we&&(we=!1,ie.call(this,new au(Ue,this,dt.originalEvent)))},mouseout:dt=>{we&&(we=!1,ie.call(this,new au(Ue,this,dt.originalEvent)))}}}}{let we=Se=>{let Be=I.filter(St=>this.getLayer(St)),dt=Be.length!==0?this.queryRenderedFeatures(Se.point,{layers:Be}):[];dt.length&&(Se.features=dt,ie.call(this,Se),delete Se.features)};return{layers:I,listener:ie,delegates:{[Ue]:we}}}}_saveDelegatedListener(Ue,I){this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[Ue]=this._delegatedListeners[Ue]||[],this._delegatedListeners[Ue].push(I)}_removeDelegatedListener(Ue,I,ie){if(!this._delegatedListeners||!this._delegatedListeners[Ue])return;let we=this._delegatedListeners[Ue];for(let Se=0;SeI.includes(dt))){for(let dt in Be.delegates)this.off(dt,Be.delegates[dt]);return void we.splice(Se,1)}}}on(Ue,I,ie){if(ie===void 0)return super.on(Ue,I);let we=this._createDelegatedListener(Ue,typeof I=="string"?[I]:I,ie);this._saveDelegatedListener(Ue,we);for(let Se in we.delegates)this.on(Se,we.delegates[Se]);return this}once(Ue,I,ie){if(ie===void 0)return super.once(Ue,I);let we=typeof I=="string"?[I]:I,Se=this._createDelegatedListener(Ue,we,ie);for(let Be in Se.delegates){let dt=Se.delegates[Be];Se.delegates[Be]=(...St)=>{this._removeDelegatedListener(Ue,we,ie),dt(...St)}}this._saveDelegatedListener(Ue,Se);for(let Be in Se.delegates)this.once(Be,Se.delegates[Be]);return this}off(Ue,I,ie){return ie===void 0?super.off(Ue,I):(this._removeDelegatedListener(Ue,typeof I=="string"?[I]:I,ie),this)}queryRenderedFeatures(Ue,I){if(!this.style)return[];let ie,we=Ue instanceof t.P||Array.isArray(Ue),Se=we?Ue:[[0,0],[this.transform.width,this.transform.height]];if(I=I||(we?{}:Ue)||{},Se instanceof t.P||typeof Se[0]=="number")ie=[t.P.convert(Se)];else{let Be=t.P.convert(Se[0]),dt=t.P.convert(Se[1]);ie=[Be,new t.P(dt.x,Be.y),dt,new t.P(Be.x,dt.y),Be]}return this.style.queryRenderedFeatures(ie,I,this.transform)}querySourceFeatures(Ue,I){return this.style.querySourceFeatures(Ue,I)}setStyle(Ue,I){return(I=t.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},I)).diff!==!1&&I.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&Ue?(this._diffStyle(Ue,I),this):(this._localIdeographFontFamily=I.localIdeographFontFamily,this._updateStyle(Ue,I))}setTransformRequest(Ue){return this._requestManager.setTransformRequest(Ue),this}_getUIString(Ue){let I=this._locale[Ue];if(I==null)throw new Error(`Missing UI string '${Ue}'`);return I}_updateStyle(Ue,I){if(I.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle(Ue,I));let ie=this.style&&I.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!Ue)),Ue?(this.style=new Ir(this,I||{}),this.style.setEventedParent(this,{style:this.style}),typeof Ue=="string"?this.style.loadURL(Ue,I,ie):this.style.loadJSON(Ue,I,ie),this):(delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new Ir(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(Ue,I){if(typeof Ue=="string"){let ie=this._requestManager.transformRequest(Ue,"Style");t.h(ie,new AbortController).then(we=>{this._updateDiff(we.data,I)}).catch(we=>{we&&this.fire(new t.j(we))})}else typeof Ue=="object"&&this._updateDiff(Ue,I)}_updateDiff(Ue,I){try{this.style.setState(Ue,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(Ue,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(Ue,I){return this._lazyInitEmptyStyle(),this.style.addSource(Ue,I),this._update(!0)}isSourceLoaded(Ue){let I=this.style&&this.style.sourceCaches[Ue];if(I!==void 0)return I.loaded();this.fire(new t.j(new Error(`There is no source with ID '${Ue}'`)))}setTerrain(Ue){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),Ue){let I=this.style.sourceCaches[Ue.source];if(!I)throw new Error(`cannot load terrain, because there exists no source with ID: ${Ue.source}`);this.terrain===null&&I.reload();for(let ie in this.style._layers){let we=this.style._layers[ie];we.type==="hillshade"&&we.source===Ue.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 Ss(this.painter,I,Ue),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!==Ue.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:Ue})),this}getTerrain(){var Ue,I;return(I=(Ue=this.terrain)===null||Ue===void 0?void 0:Ue.options)!==null&&I!==void 0?I:null}areTilesLoaded(){let Ue=this.style&&this.style.sourceCaches;for(let I in Ue){let ie=Ue[I]._tiles;for(let we in ie){let Se=ie[we];if(Se.state!=="loaded"&&Se.state!=="errored")return!1}}return!0}removeSource(Ue){return this.style.removeSource(Ue),this._update(!0)}getSource(Ue){return this.style.getSource(Ue)}addImage(Ue,I,ie={}){let{pixelRatio:we=1,sdf:Se=!1,stretchX:Be,stretchY:dt,content:St,textFitWidth:Nt,textFitHeight:$t}=ie;if(this._lazyInitEmptyStyle(),!(I instanceof HTMLImageElement||t.b(I))){if(I.width===void 0||I.height===void 0)return this.fire(new t.j(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));{let{width:Tr,height:Ar,data:Kr}=I,na=I;return this.style.addImage(Ue,{data:new t.R({width:Tr,height:Ar},new Uint8Array(Kr)),pixelRatio:we,stretchX:Be,stretchY:dt,content:St,textFitWidth:Nt,textFitHeight:$t,sdf:Se,version:0,userImage:na}),na.onAdd&&na.onAdd(this,Ue),this}}{let{width:Tr,height:Ar,data:Kr}=n.getImageData(I);this.style.addImage(Ue,{data:new t.R({width:Tr,height:Ar},Kr),pixelRatio:we,stretchX:Be,stretchY:dt,content:St,textFitWidth:Nt,textFitHeight:$t,sdf:Se,version:0})}}updateImage(Ue,I){let ie=this.style.getImage(Ue);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 we=I instanceof HTMLImageElement||t.b(I)?n.getImageData(I):I,{width:Se,height:Be,data:dt}=we;if(Se===void 0||Be===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(Se!==ie.data.width||Be!==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 St=!(I instanceof HTMLImageElement||t.b(I));return ie.data.replace(dt,St),this.style.updateImage(Ue,ie),this}getImage(Ue){return this.style.getImage(Ue)}hasImage(Ue){return Ue?!!this.style.getImage(Ue):(this.fire(new t.j(new Error("Missing required image id"))),!1)}removeImage(Ue){this.style.removeImage(Ue)}loadImage(Ue){return l.getImage(this._requestManager.transformRequest(Ue,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(Ue,I){return this._lazyInitEmptyStyle(),this.style.addLayer(Ue,I),this._update(!0)}moveLayer(Ue,I){return this.style.moveLayer(Ue,I),this._update(!0)}removeLayer(Ue){return this.style.removeLayer(Ue),this._update(!0)}getLayer(Ue){return this.style.getLayer(Ue)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(Ue,I,ie){return this.style.setLayerZoomRange(Ue,I,ie),this._update(!0)}setFilter(Ue,I,ie={}){return this.style.setFilter(Ue,I,ie),this._update(!0)}getFilter(Ue){return this.style.getFilter(Ue)}setPaintProperty(Ue,I,ie,we={}){return this.style.setPaintProperty(Ue,I,ie,we),this._update(!0)}getPaintProperty(Ue,I){return this.style.getPaintProperty(Ue,I)}setLayoutProperty(Ue,I,ie,we={}){return this.style.setLayoutProperty(Ue,I,ie,we),this._update(!0)}getLayoutProperty(Ue,I){return this.style.getLayoutProperty(Ue,I)}setGlyphs(Ue,I={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(Ue,I),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(Ue,I,ie={}){return this._lazyInitEmptyStyle(),this.style.addSprite(Ue,I,ie,we=>{we||this._update(!0)}),this}removeSprite(Ue){return this._lazyInitEmptyStyle(),this.style.removeSprite(Ue),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(Ue,I={}){return this._lazyInitEmptyStyle(),this.style.setSprite(Ue,I,ie=>{ie||this._update(!0)}),this}setLight(Ue,I={}){return this._lazyInitEmptyStyle(),this.style.setLight(Ue,I),this._update(!0)}getLight(){return this.style.getLight()}setSky(Ue){return this._lazyInitEmptyStyle(),this.style.setSky(Ue),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(Ue,I){return this.style.setFeatureState(Ue,I),this._update()}removeFeatureState(Ue,I){return this.style.removeFeatureState(Ue,I),this._update()}getFeatureState(Ue){return this.style.getFeatureState(Ue)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let Ue=0,I=0;return this._container&&(Ue=this._container.clientWidth||400,I=this._container.clientHeight||300),[Ue,I]}_setupContainer(){let Ue=this._container;Ue.classList.add("maplibregl-map");let I=this._canvasContainer=i.create("div","maplibregl-canvas-container",Ue);this._interactive&&I.classList.add("maplibregl-interactive"),this._canvas=i.create("canvas","maplibregl-canvas",I),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex",this._interactive?"0":"-1"),this._canvas.setAttribute("aria-label",this._getUIString("Map.Title")),this._canvas.setAttribute("role","region");let ie=this._containerDimensions(),we=this._getClampedPixelRatio(ie[0],ie[1]);this._resizeCanvas(ie[0],ie[1],we);let Se=this._controlContainer=i.create("div","maplibregl-control-container",Ue),Be=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(dt=>{Be[dt]=i.create("div",`maplibregl-ctrl-${dt} `,Se)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(Ue,I,ie){this._canvas.width=Math.floor(ie*Ue),this._canvas.height=Math.floor(ie*I),this._canvas.style.width=`${Ue}px`,this._canvas.style.height=`${I}px`}_setupPainter(){let Ue={alpha:!0,stencil:!0,depth:!0,failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1},I=null;this._canvas.addEventListener("webglcontextcreationerror",we=>{I={requestedAttributes:Ue},we&&(I.statusMessage=we.statusMessage,I.type=we.type)},{once:!0});let ie=this._canvas.getContext("webgl2",Ue)||this._canvas.getContext("webgl",Ue);if(!ie){let we="Failed to initialize WebGL";throw I?(I.message=we,new Error(JSON.stringify(I))):new Error(we)}this.painter=new Mc(ie,this.transform),s.testSupport(ie)}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(Ue){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||Ue,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(Ue){return this._update(),this._renderTaskQueue.add(Ue)}_cancelRenderFrame(Ue){this._renderTaskQueue.remove(Ue)}_render(Ue){let I=this._idleTriggered?this._fadeDuration:0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(Ue),this._removed)return;let ie=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;let Se=this.transform.zoom,Be=n.now();this.style.zoomHistory.update(Se,Be);let dt=new t.z(Se,{now:Be,fadeDuration:I,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),St=dt.crossFadingFactor();St===1&&St===this._crossFadingFactor||(ie=!0,this._crossFadingFactor=St),this.style.update(dt)}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 we=this._sourcesDirty||this._styleDirty||this._placementDirty;return we||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new t.k("idle")),!this._loaded||this._fullyLoaded||we||(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 Ue;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),(Ue=this._resizeObserver)===null||Ue===void 0||Ue.disconnect();let I=this.painter.context.gl.getExtension("WEBGL_lose_context");I?.loseContext&&I.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),i.remove(this._canvasContainer),i.remove(this._controlContainer),this._container.classList.remove("maplibregl-map"),t.bf.clearMetrics(),this._removed=!0,this.fire(new t.k("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,n.frameAsync(this._frameRequest).then(Ue=>{t.bf.frame(Ue),this._frameRequest=null,this._render(Ue)}).catch(()=>{}))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(Ue){this._showTileBoundaries!==Ue&&(this._showTileBoundaries=Ue,this._update())}get showPadding(){return!!this._showPadding}set showPadding(Ue){this._showPadding!==Ue&&(this._showPadding=Ue,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(Ue){this._showCollisionBoxes!==Ue&&(this._showCollisionBoxes=Ue,Ue?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(Ue){this._showOverdrawInspector!==Ue&&(this._showOverdrawInspector=Ue,this._update())}get repaint(){return!!this._repaint}set repaint(Ue){this._repaint!==Ue&&(this._repaint=Ue,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(Ue){this._vertices=Ue,this._update()}get version(){return Fl}getCameraTargetElevation(){return this.transform.elevation}},e.MapMouseEvent=au,e.MapTouchEvent=Yc,e.MapWheelEvent=hh,e.Marker=Zu,e.NavigationControl=class{constructor(Ue){this._updateZoomButtons=()=>{let I=this._map.getZoom(),ie=I===this._map.getMaxZoom(),we=I===this._map.getMinZoom();this._zoomInButton.disabled=ie,this._zoomOutButton.disabled=we,this._zoomInButton.setAttribute("aria-disabled",ie.toString()),this._zoomOutButton.setAttribute("aria-disabled",we.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 we=this._map._getUIString(`NavigationControl.${ie}`);I.title=we,I.setAttribute("aria-label",we)},this.options=t.e({},Un,Ue),this._container=i.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",I=>I.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",I=>this._map.zoomIn({},{originalEvent:I})),i.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",I=>this._map.zoomOut({},{originalEvent:I})),i.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",I=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:I}):this._map.resetNorth({},{originalEvent:I})}),this._compassIcon=i.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(Ue){return this._map=Ue,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 Lo(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){i.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(Ue,I){let ie=i.create("button",Ue,this._container);return ie.type="button",ie.addEventListener("click",I),ie}},e.Popup=class extends t.E{constructor(Ue){super(),this.remove=()=>(this._content&&i.remove(this._content),this._container&&(i.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new t.k("close"))),this),this._onMouseUp=I=>{this._update(I.point)},this._onMouseMove=I=>{this._update(I.point)},this._onDrag=I=>{this._update(I.point)},this._update=I=>{var ie;if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=i.create("div","maplibregl-popup",this._map.getContainer()),this._tip=i.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(let St of this.options.className.split(" "))this._container.classList.add(St);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?Rs(this._lngLat,this._flatPos,this._map.transform):(ie=this._lngLat)===null||ie===void 0?void 0:ie.wrap(),this._trackPointer&&!I)return;let we=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 Se=this.options.anchor,Be=lc(this.options.offset);if(!Se){let St=this._container.offsetWidth,Nt=this._container.offsetHeight,$t;$t=we.y+Be.bottom.ythis._map.transform.height-Nt?["bottom"]:[],we.xthis._map.transform.width-St/2&&$t.push("right"),Se=$t.length===0?"bottom":$t.join("-")}let dt=we.add(Be[Se]);this.options.subpixelPositioning||(dt=dt.round()),i.setTransform(this._container,`${uu[Se]} translate(${dt.x}px,${dt.y}px)`),Iu(this._container,Se,"popup")},this._onClose=()=>{this.remove()},this.options=t.e(Object.create(Ro),Ue)}addTo(Ue){return this._map&&this.remove(),this._map=Ue,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(Ue){return this._lngLat=t.N.convert(Ue),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(Ue){return this.setDOMContent(document.createTextNode(Ue))}setHTML(Ue){let I=document.createDocumentFragment(),ie=document.createElement("body"),we;for(ie.innerHTML=Ue;we=ie.firstChild,we;)I.appendChild(we);return this.setDOMContent(I)}getMaxWidth(){var Ue;return(Ue=this._container)===null||Ue===void 0?void 0:Ue.style.maxWidth}setMaxWidth(Ue){return this.options.maxWidth=Ue,this._update(),this}setDOMContent(Ue){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=i.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(Ue),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(Ue){return this._container&&this._container.classList.add(Ue),this}removeClassName(Ue){return this._container&&this._container.classList.remove(Ue),this}setOffset(Ue){return this.options.offset=Ue,this._update(),this}toggleClassName(Ue){if(this._container)return this._container.classList.toggle(Ue)}setSubpixelPositioning(Ue){this.options.subpixelPositioning=Ue}_createCloseButton(){this.options.closeButton&&(this._closeButton=i.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;let Ue=this._container.querySelector(Dc);Ue&&Ue.focus()}},e.RasterDEMTileSource=De,e.RasterTileSource=Ae,e.ScaleControl=class{constructor(Ue){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),Ue)}getDefaultPosition(){return"bottom-left"}onAdd(Ue){return this._map=Ue,this._container=i.create("div","maplibregl-ctrl maplibregl-ctrl-scale",Ue.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){i.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}},e.ScrollZoomHandler=ka,e.Style=Ir,e.TerrainControl=class{constructor(Ue){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=Ue}onAdd(Ue){return this._map=Ue,this._container=i.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=i.create("button","maplibregl-ctrl-terrain",this._container),i.create("span","maplibregl-ctrl-icon",this._terrainButton).setAttribute("aria-hidden","true"),this._terrainButton.type="button",this._terrainButton.addEventListener("click",this._toggleTerrain),this._updateTerrainIcon(),this._map.on("terrain",this._updateTerrainIcon),this._container}onRemove(){i.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},e.TwoFingersTouchPitchHandler=Pc,e.TwoFingersTouchRotateHandler=Jc,e.TwoFingersTouchZoomHandler=xu,e.TwoFingersTouchZoomRotateHandler=Pi,e.VectorTileSource=be,e.VideoSource=nt,e.addSourceType=(Ue,I)=>t._(void 0,void 0,void 0,function*(){if(Me(Ue))throw new Error(`A source type called "${Ue}" already exists.`);((ie,we)=>{st[ie]=we})(Ue,I)}),e.clearPrewarmedResources=function(){let Ue=fe;Ue&&(Ue.isPreloaded()&&Ue.numActive()===1?(Ue.release($),fe=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 tt().getRTLTextPluginStatus()},e.getVersion=function(){return Yu},e.getWorkerCount=function(){return se.workerCount},e.getWorkerUrl=function(){return t.a.WORKER_URL},e.importScriptInWorkers=function(Ue){return q().broadcast("IS",Ue)},e.prewarm=function(){Y().acquire($)},e.setMaxParallelImageRequests=function(Ue){t.a.MAX_PARALLEL_IMAGE_REQUESTS=Ue},e.setRTLTextPlugin=function(Ue,I){return tt().setRTLTextPlugin(Ue,I)},e.setWorkerCount=function(Ue){se.workerCount=Ue},e.setWorkerUrl=function(Ue){t.a.WORKER_URL=Ue}});var E=v;return E})}}),qV=Xe({"src/plots/map/layers.js"(Z,G){"use strict";var v=sa(),x=ou().sanitizeHTML,S=D6(),E=b0();function e(n,i){this.subplot=n,this.uid=n.uid+"-"+i,this.index=i,this.idSource="source-"+this.uid,this.idLayer=E.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var t=e.prototype;t.update=function(i){this.visible?this.needsNewImage(i)?this.updateImage(i):this.needsNewSource(i)?(this.removeLayer(),this.updateSource(i),this.updateLayer(i)):this.needsNewLayer(i)?this.updateLayer(i):this.updateStyle(i):(this.updateSource(i),this.updateLayer(i)),this.visible=r(i)},t.needsNewImage=function(n){var i=this.subplot.map;return i.getSource(this.idSource)&&this.sourceType==="image"&&n.sourcetype==="image"&&(this.source!==n.source||JSON.stringify(this.coordinates)!==JSON.stringify(n.coordinates))},t.needsNewSource=function(n){return this.sourceType!==n.sourcetype||JSON.stringify(this.source)!==JSON.stringify(n.source)||this.layerType!==n.type},t.needsNewLayer=function(n){return this.layerType!==n.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},t.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},t.updateImage=function(n){var i=this.subplot.map;i.getSource(this.idSource).updateImage({url:n.source,coordinates:n.coordinates});var s=this.findFollowingMapLayerId(this.lookupBelow());s!==null&&this.subplot.map.moveLayer(this.idLayer,s)},t.updateSource=function(n){var i=this.subplot.map;if(i.getSource(this.idSource)&&i.removeSource(this.idSource),this.sourceType=n.sourcetype,this.source=n.source,!!r(n)){var s=a(n);i.addSource(this.idSource,s)}},t.findFollowingMapLayerId=function(n){if(n==="traces")for(var i=this.subplot.getMapLayers(),s=0;s0){for(var s=0;s0}function o(n){var i={},s={};switch(n.type){case"circle":v.extendFlat(s,{"circle-radius":n.circle.radius,"circle-color":n.color,"circle-opacity":n.opacity});break;case"line":v.extendFlat(s,{"line-width":n.line.width,"line-color":n.color,"line-opacity":n.opacity,"line-dasharray":n.line.dash});break;case"fill":v.extendFlat(s,{"fill-color":n.color,"fill-outline-color":n.fill.outlinecolor,"fill-opacity":n.opacity});break;case"symbol":var h=n.symbol,c=S(h.textposition,h.iconsize);v.extendFlat(i,{"icon-image":h.icon+"-15","icon-size":h.iconsize/10,"text-field":h.text,"text-size":h.textfont.size,"text-anchor":c.anchor,"text-offset":c.offset,"symbol-placement":h.placement}),v.extendFlat(s,{"icon-color":n.color,"text-color":h.textfont.color,"text-opacity":n.opacity});break;case"raster":v.extendFlat(s,{"raster-fade-duration":0,"raster-opacity":n.opacity});break}return{layout:i,paint:s}}function a(n){var i=n.sourcetype,s=n.source,h={type:i},c;return i==="geojson"?c="data":i==="vector"?c=typeof s=="string"?"url":"tiles":i==="raster"?(c="tiles",h.tileSize=256):i==="image"&&(c="url",h.coordinates=n.coordinates),h[c]=s,n.sourceattribution&&(h.attribution=x(n.sourceattribution)),h}G.exports=function(i,s,h){var c=new e(i,s);return c.update(h),c}}}),VV=Xe({"src/plots/map/map.js"(Z,G){"use strict";var v=jV(),x=sa(),S=g0(),E=so(),e=Go(),t=Ap(),r=rf(),o=Jd(),a=o.drawMode,n=o.selectMode,i=Af().prepSelect,s=Af().clearOutline,h=Af().clearSelectionsCache,c=Af().selectOnClick,m=b0(),p=qV();function T(g,b){this.id=b,this.gd=g;var d=g._fullLayout,u=g._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(g,b,d){var u=this,y;u.map?y=new Promise(function(f,R){u.updateMap(g,b,f,R)}):y=new Promise(function(f,R){u.createMap(g,b,f,R)}),d.push(y)},l.createMap=function(g,b,d,u){var y=this,f=b[y.id],R=y.styleObj=w(f.style),L=f.bounds,z=L?[[L.west,L.south],[L.east,L.north]]:null,F=y.map=new v.Map({container:y.div,style:R.style,center:M(f.center),zoom:f.zoom,bearing:f.bearing,pitch:f.pitch,maxBounds:z,interactive:!y.isStatic,preserveDrawingBuffer:y.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new v.AttributionControl({compact:!0})),N={};F.on("styleimagemissing",function(P){var U=P.id;if(!N[U]&&U.includes("-15")){N[U]=!0;var B=new Image(15,15);B.onload=function(){F.addImage(U,B)},B.crossOrigin="Anonymous",B.src="https://unpkg.com/maki@2.1.0/icons/"+U+".svg"}}),F.setTransformRequest(function(P){return P=P.replace("https://fonts.openmaptiles.org/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),P=P.replace("https://tiles.basemaps.cartocdn.com/fonts/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),P=P.replace("https://fonts.openmaptiles.org/Open Sans Regular,Arial Unicode MS Regular","https://fonts.openmaptiles.org/Klokantech Noto Sans Regular"),{url:P}}),F._canvas.style.left="0px",F._canvas.style.top="0px",y.rejectOnError(u),y.isStatic||y.initFx(g,b);var O=[];O.push(new Promise(function(P){F.once("load",P)})),O=O.concat(S.fetchTraceGeoData(g)),Promise.all(O).then(function(){y.fillBelowLookup(g,b),y.updateData(g),y.updateLayout(b),y.resolveOnRender(d)}).catch(u)},l.updateMap=function(g,b,d,u){var y=this,f=y.map,R=b[this.id];y.rejectOnError(u);var L=[],z=w(R.style);JSON.stringify(y.styleObj)!==JSON.stringify(z)&&(y.styleObj=z,f.setStyle(z.style),y.traceHash={},L.push(new Promise(function(F){f.once("styledata",F)}))),L=L.concat(S.fetchTraceGeoData(g)),Promise.all(L).then(function(){y.fillBelowLookup(g,b),y.updateData(g),y.updateLayout(b),y.resolveOnRender(d)}).catch(u)},l.fillBelowLookup=function(g,b){var d=b[this.id],u=d.layers,y,f,R=this.belowLookup={},L=!1;for(y=0;y1)for(y=0;y-1&&c(z.originalEvent,u,[d.xaxis],[d.yaxis],d.id,L),F.indexOf("event")>-1&&r.click(u,z.originalEvent)}}},l.updateFx=function(g){var b=this,d=b.map,u=b.gd;if(b.isStatic)return;function y(z){var F=b.map.unproject(z);return[F.lng,F.lat]}var f=g.dragmode,R;R=function(z,F){if(F.isRect){var N=z.range={};N[b.id]=[y([F.xmin,F.ymin]),y([F.xmax,F.ymax])]}else{var O=z.lassoPoints={};O[b.id]=F.map(y)}};var L=b.dragOptions;b.dragOptions=x.extendDeep(L||{},{dragmode:g.dragmode,element:b.div,gd:u,plotinfo:{id:b.id,domain:g[b.id].domain,xaxis:b.xaxis,yaxis:b.yaxis,fillRangeItems:R},xaxes:[b.xaxis],yaxes:[b.yaxis],subplot:b.id}),d.off("click",b.onClickInPanHandler),n(f)||a(f)?(d.dragPan.disable(),d.on("zoomstart",b.clearOutline),b.dragOptions.prepFn=function(z,F,N){i(z,F,N,b.dragOptions,f)},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(g){var b=g[this.id].domain,d=g._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(g){var b=g[this.id],d=b.layers,u=this.layerList,y;if(d.length!==u.length){for(y=0;yd/2){var u=A.split("|").join("
");g.text(u).attr("data-unformatted",u).call(r.convertToTspans,n),b=t.bBox(g.node())}g.attr("transform",v(-3,-b.height+8)),M.insert("rect",".static-attribution").attr({x:-b.width-6,y:-b.height-3,width:b.width+6,height:b.height+3,fill:"rgba(255, 255, 255, 0.75)"});var y=1;b.width+6>d&&(y=d/(b.width+6));var f=[h.l+h.w*p.x[1],h.t+h.h*(1-p.y[0])];M.attr("transform",v(f[0],f[1])+x(y))}},Z.updateFx=function(n){for(var i=n._fullLayout,s=i._subplots[a],h=0;h=0;o--)t.removeLayer(r[o][1])},e.dispose=function(){var t=this.subplot.map;this._removeLayers(),t.removeSource(this.sourceId)},G.exports=function(r,o){var a=o[0].trace,n=new E(r,a.uid),i=n.sourceId,s=v(o),h=n.below=r.belowLookup["trace-"+a.uid];return r.map.addSource(i,{type:"geojson",data:s.geojson}),n._addLayers(s,h),o[0].trace._glTrace=n,n}}}),YV=Xe({"src/traces/choroplethmap/index.js"(Z,G){"use strict";G.exports={attributes:z6(),supplyDefaults:XV(),colorbar:n0(),calc:lT(),plot:ZV(),hoverPoints:cT(),eventData:fT(),selectPoints:hT(),styleOnSelect:function(v,x){if(x){var S=x[0].trace;S._glTrace.updateOnSelect(x)}},getBelow:function(v,x){for(var S=x.getMapLayers(),E=S.length-2;E>=0;E--){var e=S[E].id;if(typeof e=="string"&&e.indexOf("water")===0){for(var t=E+1;t0?+p[c]:0),h.push({type:"Feature",geometry:{type:"Point",coordinates:w},properties:A})}}var g=E.extractOpts(a),b=g.reversescale?E.flipScale(g.colorscale):g.colorscale,d=b[0][1],u=S.opacity(d)<1?d:S.addOpacity(d,0),y=["interpolate",["linear"],["heatmap-density"],0,u];for(c=1;c=0;r--)e.removeLayer(t[r][1])},E.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)},G.exports=function(t,r){var o=r[0].trace,a=new S(t,o.uid),n=a.sourceId,i=v(r),s=a.below=t.belowLookup["trace-"+o.uid];return t.map.addSource(n,{type:"geojson",data:i.geojson}),a._addLayers(i,s),a}}}),tG=Xe({"src/traces/densitymap/hover.js"(Z,G){"use strict";var v=Go(),x=kT().hoverPoints,S=kT().getExtraText;G.exports=function(e,t,r){var o=x(e,t,r);if(o){var a=o[0],n=a.cd,i=n[0].trace,s=n[a.index];if(delete a.color,"z"in s){var h=a.subplot.mockAxis;a.z=s.z,a.zLabel=v.tickText(h,h.c2l(s.z),"hover").text}return a.extraText=S(i,s,n[0].t.labels),[a]}}}}),rG=Xe({"src/traces/densitymap/event_data.js"(Z,G){"use strict";G.exports=function(x,S){return x.lon=S.lon,x.lat=S.lat,x.z=S.z,x}}}),aG=Xe({"src/traces/densitymap/index.js"(Z,G){"use strict";G.exports={attributes:O6(),supplyDefaults:JV(),colorbar:n0(),formatLabels:R6(),calc:$V(),plot:eG(),hoverPoints:tG(),eventData:rG(),getBelow:function(v,x){for(var S=x.getMapLayers(),E=0;E0;){l=w[w.length-1];var A=x[l];if(r[l]=0&&a[l].push(o[g])}r[l]=M}else{if(e[l]===E[l]){for(var b=[],d=[],u=0,M=_.length-1;M>=0;--M){var y=_[M];if(t[y]=!1,b.push(y),d.push(a[y]),u+=a[y].length,o[y]=s.length,y===l){_.length=M;break}}s.push(b);for(var f=new Array(u),M=0;Mg&&(g=i.source[_]),i.target[_]>g&&(g=i.target[_]);var b=g+1;a.node._count=b;var d,u=a.node.groups,y={};for(_=0;_0&&e(N,b)&&e(O,b)&&!(y.hasOwnProperty(N)&&y.hasOwnProperty(O)&&y[N]===y[O])){y.hasOwnProperty(O)&&(O=y[O]),y.hasOwnProperty(N)&&(N=y[N]),N=+N,O=+O,p[N]=p[O]=!0;var P="";i.label&&i.label[_]&&(P=i.label[_]);var U=null;P&&T.hasOwnProperty(P)&&(U=T[P]),s.push({pointNumber:_,label:P,color:h?i.color[_]:i.color,hovercolor:c?i.hovercolor[_]:i.hovercolor,customdata:m?i.customdata[_]:i.customdata,concentrationscale:U,source:N,target:O,value:+F}),z.source.push(N),z.target.push(O)}}var B=b+u.length,X=E(n.color),$=E(n.customdata),se=[];for(_=0;_b-1,childrenNodes:[],pointNumber:_,label:le,color:X?n.color[_]:n.color,customdata:$?n.customdata[_]:n.customdata})}var fe=!1;return o(B,z.source,z.target)&&(fe=!0),{circular:fe,links:s,nodes:se,groups:u,groupLookup:y}}function o(a,n,i){for(var s=x.init2dArray(a,0),h=0;h1})}G.exports=function(n,i){var s=r(i);return S({circular:s.circular,_nodes:s.nodes,_links:s.links,_groups:s.groups,_groupLookup:s.groupLookup})}}}),sG=Xe({"node_modules/d3-quadtree/dist/d3-quadtree.js"(Z,G){(function(v,x){typeof Z=="object"&&typeof G<"u"?x(Z):(v=v||self,x(v.d3=v.d3||{}))})(Z,function(v){"use strict";function x(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,y){if(isNaN(d)||isNaN(u))return b;var f,R=b._root,L={data:y},z=b._x0,F=b._y0,N=b._x1,O=b._y1,P,U,B,X,$,se,le,fe;if(!R)return b._root=L,b;for(;R.length;)if(($=d>=(P=(z+N)/2))?z=P:N=P,(se=u>=(U=(F+O)/2))?F=U:O=U,f=R,!(R=R[le=se<<1|$]))return f[le]=L,b;if(B=+b._x.call(null,R.data),X=+b._y.call(null,R.data),d===B&&u===X)return L.next=R,f?f[le]=L:b._root=L,b;do f=f?f[le]=new Array(4):b._root=new Array(4),($=d>=(P=(z+N)/2))?z=P:N=P,(se=u>=(U=(F+O)/2))?F=U:O=U;while((le=se<<1|$)===(fe=(X>=U)<<1|B>=P));return f[fe]=R,f[le]=L,b}function E(b){var d,u,y=b.length,f,R,L=new Array(y),z=new Array(y),F=1/0,N=1/0,O=-1/0,P=-1/0;for(u=0;uO&&(O=f),RP&&(P=R));if(F>O||N>P)return this;for(this.cover(F,N).cover(O,P),u=0;ub||b>=f||y>d||d>=R;)switch(N=(dO||(z=X.y0)>P||(F=X.x1)=le)<<1|b>=se)&&(X=U[U.length-1],U[U.length-1]=U[U.length-1-$],U[U.length-1-$]=X)}else{var fe=b-+this._x.call(null,B.data),V=d-+this._y.call(null,B.data),Y=fe*fe+V*V;if(Y=(U=(L+F)/2))?L=U:F=U,($=P>=(B=(z+N)/2))?z=B:N=B,d=u,!(u=u[se=$<<1|X]))return this;if(!u.length)break;(d[se+1&3]||d[se+2&3]||d[se+3&3])&&(y=d,le=se)}for(;u.data!==b;)if(f=u,!(u=u.next))return this;return(R=u.next)&&delete u.next,f?(R?f.next=R:delete f.next,this):d?(R?d[se]=R:delete d[se],(u=d[0]||d[1]||d[2]||d[3])&&u===(d[3]||d[2]||d[1]||d[0])&&!u.length&&(y?y[le]=u:this._root=u),this):(this._root=R,this)}function i(b){for(var d=0,u=b.length;d=p.length)return l!=null&&g.sort(l),_!=null?_(g):g;for(var y=-1,f=g.length,R=p[b++],L,z,F=E(),N,O=d();++yp.length)return g;var d,u=T[b-1];return _!=null&&b>=p.length?d=g.entries():(d=[],g.each(function(y,f){d.push({key:f,values:M(y,b)})})),u!=null?d.sort(function(y,f){return u(y.key,f.key)}):d}return w={object:function(g){return A(g,0,t,r)},map:function(g){return A(g,0,o,a)},entries:function(g){return M(A(g,0,o,a),0)},key:function(g){return p.push(g),w},sortKeys:function(g){return T[p.length-1]=g,w},sortValues:function(g){return l=g,w},rollup:function(g){return _=g,w}}}function t(){return{}}function r(p,T,l){p[T]=l}function o(){return E()}function a(p,T,l){p.set(T,l)}function n(){}var i=E.prototype;n.prototype=s.prototype={constructor:n,has:i.has,add:function(p){return p+="",this[x+p]=p,this},remove:i.remove,clear:i.clear,values:i.keys,size:i.size,empty:i.empty,each:i.each};function s(p,T){var l=new n;if(p instanceof n)p.each(function(A){l.add(A)});else if(p){var _=-1,w=p.length;if(T==null)for(;++_=0&&(i=n.slice(s+1),n=n.slice(0,s)),n&&!a.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:i}})}E.prototype=S.prototype={constructor:E,on:function(o,a){var n=this._,i=e(o+"",n),s,h=-1,c=i.length;if(arguments.length<2){for(;++h0)for(var n=new Array(s),i=0,s,h;i=0&&b._call.call(null,d),b=b._next;--x}function l(){a=(o=i.now())+n,x=S=0;try{T()}finally{x=0,w(),a=0}}function _(){var b=i.now(),d=b-o;d>e&&(n-=d,o=b)}function w(){for(var b,d=t,u,y=1/0;d;)d._call?(y>d._time&&(y=d._time),b=d,d=d._next):(u=d._next,d._next=null,d=b?b._next=u:t=u);r=b,A(y)}function A(b){if(!x){S&&(S=clearTimeout(S));var d=b-a;d>24?(b<1/0&&(S=setTimeout(l,b-i.now()-n)),E&&(E=clearInterval(E))):(E||(o=i.now(),E=setInterval(_,e)),x=1,s(l))}}function M(b,d,u){var y=new m;return d=d==null?0:+d,y.restart(function(f){y.stop(),b(f+d)},d,u),y}function g(b,d,u){var y=new m,f=d;return d==null?(y.restart(b,d,u),y):(d=+d,u=u==null?h():+u,y.restart(function R(L){L+=f,y.restart(R,f+=d,u),b(L)},d,u),y)}v.interval=g,v.now=h,v.timeout=M,v.timer=p,v.timerFlush=T,Object.defineProperty(v,"__esModule",{value:!0})})}}),cG=Xe({"node_modules/d3-force/dist/d3-force.js"(Z,G){(function(v,x){typeof Z=="object"&&typeof G<"u"?x(Z,sG(),LT(),lG(),uG()):x(v.d3=v.d3||{},v.d3,v.d3,v.d3,v.d3)})(Z,function(v,x,S,E,e){"use strict";function t(b,d){var u;b==null&&(b=0),d==null&&(d=0);function y(){var f,R=u.length,L,z=0,F=0;for(f=0;fP.index){var Q=U-oe.x-oe.vx,re=B-oe.y-oe.vy,ce=Q*Q+re*re;ceU+j||eeB+j||qF.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(X):z.set(X,B($)),d):z.get(X)},find:function(X,$,se){var le=0,fe=b.length,V,Y,ee,q,oe;for(se==null?se=1/0:se*=se,le=0;le1?(N.on(X,$),d):N.on(X)}}}function w(){var b,d,u,y=r(-30),f,R=1,L=1/0,z=.81;function F(U){var B,X=b.length,$=x.quadtree(b,m,p).visitAfter(O);for(u=U,B=0;B=L)return;(U.data!==d||U.next)&&(se===0&&(se=o(),V+=se*se),le===0&&(le=o(),V+=le*le),VE)if(!(Math.abs(l*m-p*T)>E)||!s)this._+="L"+(this._x1=o)+","+(this._y1=a);else{var w=n-h,A=i-c,M=m*m+p*p,g=w*w+A*A,b=Math.sqrt(M),d=Math.sqrt(_),u=s*Math.tan((x-Math.acos((M+_-g)/(2*b*d)))/2),y=u/d,f=u/b;Math.abs(y-1)>E&&(this._+="L"+(o+y*T)+","+(a+y*l)),this._+="A"+s+","+s+",0,0,"+ +(l*w>T*A)+","+(this._x1=o+f*m)+","+(this._y1=a+f*p)}},arc:function(o,a,n,i,s,h){o=+o,a=+a,n=+n,h=!!h;var c=n*Math.cos(i),m=n*Math.sin(i),p=o+c,T=a+m,l=1^h,_=h?i-s:s-i;if(n<0)throw new Error("negative radius: "+n);this._x1===null?this._+="M"+p+","+T:(Math.abs(this._x1-p)>E||Math.abs(this._y1-T)>E)&&(this._+="L"+p+","+T),n&&(_<0&&(_=_%S+S),_>e?this._+="A"+n+","+n+",0,1,"+l+","+(o-c)+","+(a-m)+"A"+n+","+n+",0,1,"+l+","+(this._x1=p)+","+(this._y1=T):_>E&&(this._+="A"+n+","+n+",0,"+ +(_>=x)+","+l+","+(this._x1=o+n*Math.cos(s))+","+(this._y1=a+n*Math.sin(s))))},rect:function(o,a,n,i){this._+="M"+(this._x0=this._x1=+o)+","+(this._y0=this._y1=+a)+"h"+ +n+"v"+ +i+"h"+-n+"Z"},toString:function(){return this._}},v.path=r,Object.defineProperty(v,"__esModule",{value:!0})})}}),U6=Xe({"node_modules/d3-shape/dist/d3-shape.js"(Z,G){(function(v,x){typeof Z=="object"&&typeof G<"u"?x(Z,fG()):(v=v||self,x(v.d3=v.d3||{},v.d3))})(Z,function(v,x){"use strict";function S(xt){return function(){return xt}}var E=Math.abs,e=Math.atan2,t=Math.cos,r=Math.max,o=Math.min,a=Math.sin,n=Math.sqrt,i=1e-12,s=Math.PI,h=s/2,c=2*s;function m(xt){return xt>1?0:xt<-1?s:Math.acos(xt)}function p(xt){return xt>=1?h:xt<=-1?-h:Math.asin(xt)}function T(xt){return xt.innerRadius}function l(xt){return xt.outerRadius}function _(xt){return xt.startAngle}function w(xt){return xt.endAngle}function A(xt){return xt&&xt.padAngle}function M(xt,Xt,vr,Or,ba,Pa,ya,la){var Ta=vr-xt,Ai=Or-Xt,ki=ya-ba,Ki=la-Pa,_n=Ki*Ta-ki*Ai;if(!(_n*_nls*ls+Cs*Cs&&(as=ss,Ns=uo),{cx:as,cy:Ns,x01:-ki,y01:-Ki,x11:as*(ba/Oo-1),y11:Ns*(ba/Oo-1)}}function b(){var xt=T,Xt=l,vr=S(0),Or=null,ba=_,Pa=w,ya=A,la=null;function Ta(){var Ai,ki,Ki=+xt.apply(this,arguments),_n=+Xt.apply(this,arguments),Rn=ba.apply(this,arguments)-h,En=Pa.apply(this,arguments)-h,On=E(En-Rn),no=En>Rn;if(la||(la=Ai=x.path()),_ni))la.moveTo(0,0);else if(On>c-i)la.moveTo(_n*t(Rn),_n*a(Rn)),la.arc(0,0,_n,Rn,En,!no),Ki>i&&(la.moveTo(Ki*t(En),Ki*a(En)),la.arc(0,0,Ki,En,Rn,no));else{var cn=Rn,lo=En,Wo=Rn,hs=En,Oo=On,Wn=On,No=ya.apply(this,arguments)/2,as=No>i&&(Or?+Or.apply(this,arguments):n(Ki*Ki+_n*_n)),Ns=o(E(_n-Ki)/2,+vr.apply(this,arguments)),ss=Ns,uo=Ns,jn,Xn;if(as>i){var ls=p(as/Ki*a(No)),Cs=p(as/_n*a(No));(Oo-=ls*2)>i?(ls*=no?1:-1,Wo+=ls,hs-=ls):(Oo=0,Wo=hs=(Rn+En)/2),(Wn-=Cs*2)>i?(Cs*=no?1:-1,cn+=Cs,lo-=Cs):(Wn=0,cn=lo=(Rn+En)/2)}var Ks=_n*t(cn),Xo=_n*a(cn),Gi=Ki*t(hs),Ln=Ki*a(hs);if(Ns>i){var Us=_n*t(lo),_s=_n*a(lo),Gn=Ki*t(Wo),zs=Ki*a(Wo),vs;if(Oni?uo>i?(jn=g(Gn,zs,Ks,Xo,_n,uo,no),Xn=g(Us,_s,Gi,Ln,_n,uo,no),la.moveTo(jn.cx+jn.x01,jn.cy+jn.y01),uoi)||!(Oo>i)?la.lineTo(Gi,Ln):ss>i?(jn=g(Gi,Ln,Us,_s,Ki,-ss,no),Xn=g(Ks,Xo,Gn,zs,Ki,-ss,no),la.lineTo(jn.cx+jn.x01,jn.cy+jn.y01),ss=_n;--Rn)la.point(lo[Rn],Wo[Rn]);la.lineEnd(),la.areaEnd()}no&&(lo[Ki]=+xt(On,Ki,ki),Wo[Ki]=+vr(On,Ki,ki),la.point(Xt?+Xt(On,Ki,ki):lo[Ki],Or?+Or(On,Ki,ki):Wo[Ki]))}if(cn)return la=null,cn+""||null}function Ai(){return R().defined(ba).curve(ya).context(Pa)}return Ta.x=function(ki){return arguments.length?(xt=typeof ki=="function"?ki:S(+ki),Xt=null,Ta):xt},Ta.x0=function(ki){return arguments.length?(xt=typeof ki=="function"?ki:S(+ki),Ta):xt},Ta.x1=function(ki){return arguments.length?(Xt=ki==null?null:typeof ki=="function"?ki:S(+ki),Ta):Xt},Ta.y=function(ki){return arguments.length?(vr=typeof ki=="function"?ki:S(+ki),Or=null,Ta):vr},Ta.y0=function(ki){return arguments.length?(vr=typeof ki=="function"?ki:S(+ki),Ta):vr},Ta.y1=function(ki){return arguments.length?(Or=ki==null?null:typeof ki=="function"?ki:S(+ki),Ta):Or},Ta.lineX0=Ta.lineY0=function(){return Ai().x(xt).y(vr)},Ta.lineY1=function(){return Ai().x(xt).y(Or)},Ta.lineX1=function(){return Ai().x(Xt).y(vr)},Ta.defined=function(ki){return arguments.length?(ba=typeof ki=="function"?ki:S(!!ki),Ta):ba},Ta.curve=function(ki){return arguments.length?(ya=ki,Pa!=null&&(la=ya(Pa)),Ta):ya},Ta.context=function(ki){return arguments.length?(ki==null?Pa=la=null:la=ya(Pa=ki),Ta):Pa},Ta}function z(xt,Xt){return Xtxt?1:Xt>=xt?0:NaN}function F(xt){return xt}function N(){var xt=F,Xt=z,vr=null,Or=S(0),ba=S(c),Pa=S(0);function ya(la){var Ta,Ai=la.length,ki,Ki,_n=0,Rn=new Array(Ai),En=new Array(Ai),On=+Or.apply(this,arguments),no=Math.min(c,Math.max(-c,ba.apply(this,arguments)-On)),cn,lo=Math.min(Math.abs(no)/Ai,Pa.apply(this,arguments)),Wo=lo*(no<0?-1:1),hs;for(Ta=0;Ta0&&(_n+=hs);for(Xt!=null?Rn.sort(function(Oo,Wn){return Xt(En[Oo],En[Wn])}):vr!=null&&Rn.sort(function(Oo,Wn){return vr(la[Oo],la[Wn])}),Ta=0,Ki=_n?(no-Ai*Wo)/_n:0;Ta0?hs*Ki:0)+Wo,En[ki]={data:la[ki],index:Ta,value:hs,startAngle:On,endAngle:cn,padAngle:lo};return En}return ya.value=function(la){return arguments.length?(xt=typeof la=="function"?la:S(+la),ya):xt},ya.sortValues=function(la){return arguments.length?(Xt=la,vr=null,ya):Xt},ya.sort=function(la){return arguments.length?(vr=la,Xt=null,ya):vr},ya.startAngle=function(la){return arguments.length?(Or=typeof la=="function"?la:S(+la),ya):Or},ya.endAngle=function(la){return arguments.length?(ba=typeof la=="function"?la:S(+la),ya):ba},ya.padAngle=function(la){return arguments.length?(Pa=typeof la=="function"?la:S(+la),ya):Pa},ya}var O=U(u);function P(xt){this._curve=xt}P.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(xt,Xt){this._curve.point(Xt*Math.sin(xt),Xt*-Math.cos(xt))}};function U(xt){function Xt(vr){return new P(xt(vr))}return Xt._curve=xt,Xt}function B(xt){var Xt=xt.curve;return xt.angle=xt.x,delete xt.x,xt.radius=xt.y,delete xt.y,xt.curve=function(vr){return arguments.length?Xt(U(vr)):Xt()._curve},xt}function X(){return B(R().curve(O))}function $(){var xt=L().curve(O),Xt=xt.curve,vr=xt.lineX0,Or=xt.lineX1,ba=xt.lineY0,Pa=xt.lineY1;return xt.angle=xt.x,delete xt.x,xt.startAngle=xt.x0,delete xt.x0,xt.endAngle=xt.x1,delete xt.x1,xt.radius=xt.y,delete xt.y,xt.innerRadius=xt.y0,delete xt.y0,xt.outerRadius=xt.y1,delete xt.y1,xt.lineStartAngle=function(){return B(vr())},delete xt.lineX0,xt.lineEndAngle=function(){return B(Or())},delete xt.lineX1,xt.lineInnerRadius=function(){return B(ba())},delete xt.lineY0,xt.lineOuterRadius=function(){return B(Pa())},delete xt.lineY1,xt.curve=function(ya){return arguments.length?Xt(U(ya)):Xt()._curve},xt}function se(xt,Xt){return[(Xt=+Xt)*Math.cos(xt-=Math.PI/2),Xt*Math.sin(xt)]}var le=Array.prototype.slice;function fe(xt){return xt.source}function V(xt){return xt.target}function Y(xt){var Xt=fe,vr=V,Or=y,ba=f,Pa=null;function ya(){var la,Ta=le.call(arguments),Ai=Xt.apply(this,Ta),ki=vr.apply(this,Ta);if(Pa||(Pa=la=x.path()),xt(Pa,+Or.apply(this,(Ta[0]=Ai,Ta)),+ba.apply(this,Ta),+Or.apply(this,(Ta[0]=ki,Ta)),+ba.apply(this,Ta)),la)return Pa=null,la+""||null}return ya.source=function(la){return arguments.length?(Xt=la,ya):Xt},ya.target=function(la){return arguments.length?(vr=la,ya):vr},ya.x=function(la){return arguments.length?(Or=typeof la=="function"?la:S(+la),ya):Or},ya.y=function(la){return arguments.length?(ba=typeof la=="function"?la:S(+la),ya):ba},ya.context=function(la){return arguments.length?(Pa=la??null,ya):Pa},ya}function ee(xt,Xt,vr,Or,ba){xt.moveTo(Xt,vr),xt.bezierCurveTo(Xt=(Xt+Or)/2,vr,Xt,ba,Or,ba)}function q(xt,Xt,vr,Or,ba){xt.moveTo(Xt,vr),xt.bezierCurveTo(Xt,vr=(vr+ba)/2,Or,vr,Or,ba)}function oe(xt,Xt,vr,Or,ba){var Pa=se(Xt,vr),ya=se(Xt,vr=(vr+ba)/2),la=se(Or,vr),Ta=se(Or,ba);xt.moveTo(Pa[0],Pa[1]),xt.bezierCurveTo(ya[0],ya[1],la[0],la[1],Ta[0],Ta[1])}function ae(){return Y(ee)}function j(){return Y(q)}function Q(){var xt=Y(oe);return xt.angle=xt.x,delete xt.x,xt.radius=xt.y,delete xt.y,xt}var re={draw:function(xt,Xt){var vr=Math.sqrt(Xt/s);xt.moveTo(vr,0),xt.arc(0,0,vr,0,c)}},ce={draw:function(xt,Xt){var vr=Math.sqrt(Xt/5)/2;xt.moveTo(-3*vr,-vr),xt.lineTo(-vr,-vr),xt.lineTo(-vr,-3*vr),xt.lineTo(vr,-3*vr),xt.lineTo(vr,-vr),xt.lineTo(3*vr,-vr),xt.lineTo(3*vr,vr),xt.lineTo(vr,vr),xt.lineTo(vr,3*vr),xt.lineTo(-vr,3*vr),xt.lineTo(-vr,vr),xt.lineTo(-3*vr,vr),xt.closePath()}},be=Math.sqrt(1/3),Ae=be*2,De={draw:function(xt,Xt){var vr=Math.sqrt(Xt/Ae),Or=vr*be;xt.moveTo(0,-vr),xt.lineTo(Or,0),xt.lineTo(0,vr),xt.lineTo(-Or,0),xt.closePath()}},ze=.8908130915292852,Ze=Math.sin(s/10)/Math.sin(7*s/10),at=Math.sin(c/10)*Ze,nt=-Math.cos(c/10)*Ze,rt={draw:function(xt,Xt){var vr=Math.sqrt(Xt*ze),Or=at*vr,ba=nt*vr;xt.moveTo(0,-vr),xt.lineTo(Or,ba);for(var Pa=1;Pa<5;++Pa){var ya=c*Pa/5,la=Math.cos(ya),Ta=Math.sin(ya);xt.lineTo(Ta*vr,-la*vr),xt.lineTo(la*Or-Ta*ba,Ta*Or+la*ba)}xt.closePath()}},st={draw:function(xt,Xt){var vr=Math.sqrt(Xt),Or=-vr/2;xt.rect(Or,Or,vr,vr)}},Me=Math.sqrt(3),ye={draw:function(xt,Xt){var vr=-Math.sqrt(Xt/(Me*3));xt.moveTo(0,vr*2),xt.lineTo(-Me*vr,-vr),xt.lineTo(Me*vr,-vr),xt.closePath()}},he=-.5,Oe=Math.sqrt(3)/2,tt=1/Math.sqrt(12),ot=(tt/2+1)*3,Qe={draw:function(xt,Xt){var vr=Math.sqrt(Xt/ot),Or=vr/2,ba=vr*tt,Pa=Or,ya=vr*tt+vr,la=-Pa,Ta=ya;xt.moveTo(Or,ba),xt.lineTo(Pa,ya),xt.lineTo(la,Ta),xt.lineTo(he*Or-Oe*ba,Oe*Or+he*ba),xt.lineTo(he*Pa-Oe*ya,Oe*Pa+he*ya),xt.lineTo(he*la-Oe*Ta,Oe*la+he*Ta),xt.lineTo(he*Or+Oe*ba,he*ba-Oe*Or),xt.lineTo(he*Pa+Oe*ya,he*ya-Oe*Pa),xt.lineTo(he*la+Oe*Ta,he*Ta-Oe*la),xt.closePath()}},Pt=[re,ce,De,st,rt,ye,Qe];function It(){var xt=S(re),Xt=S(64),vr=null;function Or(){var ba;if(vr||(vr=ba=x.path()),xt.apply(this,arguments).draw(vr,+Xt.apply(this,arguments)),ba)return vr=null,ba+""||null}return Or.type=function(ba){return arguments.length?(xt=typeof ba=="function"?ba:S(ba),Or):xt},Or.size=function(ba){return arguments.length?(Xt=typeof ba=="function"?ba:S(+ba),Or):Xt},Or.context=function(ba){return arguments.length?(vr=ba??null,Or):vr},Or}function qt(){}function Wt(xt,Xt,vr){xt._context.bezierCurveTo((2*xt._x0+xt._x1)/3,(2*xt._y0+xt._y1)/3,(xt._x0+2*xt._x1)/3,(xt._y0+2*xt._y1)/3,(xt._x0+4*xt._x1+Xt)/6,(xt._y0+4*xt._y1+vr)/6)}function kr(xt){this._context=xt}kr.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:Wt(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(xt,Xt){switch(xt=+xt,Xt=+Xt,this._point){case 0:this._point=1,this._line?this._context.lineTo(xt,Xt):this._context.moveTo(xt,Xt);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Wt(this,xt,Xt);break}this._x0=this._x1,this._x1=xt,this._y0=this._y1,this._y1=Xt}};function mr(xt){return new kr(xt)}function qr(xt){this._context=xt}qr.prototype={areaStart:qt,areaEnd:qt,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(xt,Xt){switch(xt=+xt,Xt=+Xt,this._point){case 0:this._point=1,this._x2=xt,this._y2=Xt;break;case 1:this._point=2,this._x3=xt,this._y3=Xt;break;case 2:this._point=3,this._x4=xt,this._y4=Xt,this._context.moveTo((this._x0+4*this._x1+xt)/6,(this._y0+4*this._y1+Xt)/6);break;default:Wt(this,xt,Xt);break}this._x0=this._x1,this._x1=xt,this._y0=this._y1,this._y1=Xt}};function Sr(xt){return new qr(xt)}function Rr(xt){this._context=xt}Rr.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(xt,Xt){switch(xt=+xt,Xt=+Xt,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var vr=(this._x0+4*this._x1+xt)/6,Or=(this._y0+4*this._y1+Xt)/6;this._line?this._context.lineTo(vr,Or):this._context.moveTo(vr,Or);break;case 3:this._point=4;default:Wt(this,xt,Xt);break}this._x0=this._x1,this._x1=xt,this._y0=this._y1,this._y1=Xt}};function wt(xt){return new Rr(xt)}function Ne(xt,Xt){this._basis=new kr(xt),this._beta=Xt}Ne.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var xt=this._x,Xt=this._y,vr=xt.length-1;if(vr>0)for(var Or=xt[0],ba=Xt[0],Pa=xt[vr]-Or,ya=Xt[vr]-ba,la=-1,Ta;++la<=vr;)Ta=la/vr,this._basis.point(this._beta*xt[la]+(1-this._beta)*(Or+Ta*Pa),this._beta*Xt[la]+(1-this._beta)*(ba+Ta*ya));this._x=this._y=null,this._basis.lineEnd()},point:function(xt,Xt){this._x.push(+xt),this._y.push(+Xt)}};var Ke=function xt(Xt){function vr(Or){return Xt===1?new kr(Or):new Ne(Or,Xt)}return vr.beta=function(Or){return xt(+Or)},vr}(.85);function Te(xt,Xt,vr){xt._context.bezierCurveTo(xt._x1+xt._k*(xt._x2-xt._x0),xt._y1+xt._k*(xt._y2-xt._y0),xt._x2+xt._k*(xt._x1-Xt),xt._y2+xt._k*(xt._y1-vr),xt._x2,xt._y2)}function Ie(xt,Xt){this._context=xt,this._k=(1-Xt)/6}Ie.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:Te(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(xt,Xt){switch(xt=+xt,Xt=+Xt,this._point){case 0:this._point=1,this._line?this._context.lineTo(xt,Xt):this._context.moveTo(xt,Xt);break;case 1:this._point=2,this._x1=xt,this._y1=Xt;break;case 2:this._point=3;default:Te(this,xt,Xt);break}this._x0=this._x1,this._x1=this._x2,this._x2=xt,this._y0=this._y1,this._y1=this._y2,this._y2=Xt}};var Ve=function xt(Xt){function vr(Or){return new Ie(Or,Xt)}return vr.tension=function(Or){return xt(+Or)},vr}(0);function Ce(xt,Xt){this._context=xt,this._k=(1-Xt)/6}Ce.prototype={areaStart:qt,areaEnd:qt,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(xt,Xt){switch(xt=+xt,Xt=+Xt,this._point){case 0:this._point=1,this._x3=xt,this._y3=Xt;break;case 1:this._point=2,this._context.moveTo(this._x4=xt,this._y4=Xt);break;case 2:this._point=3,this._x5=xt,this._y5=Xt;break;default:Te(this,xt,Xt);break}this._x0=this._x1,this._x1=this._x2,this._x2=xt,this._y0=this._y1,this._y1=this._y2,this._y2=Xt}};var Ee=function xt(Xt){function vr(Or){return new Ce(Or,Xt)}return vr.tension=function(Or){return xt(+Or)},vr}(0);function Pe(xt,Xt){this._context=xt,this._k=(1-Xt)/6}Pe.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(xt,Xt){switch(xt=+xt,Xt=+Xt,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Te(this,xt,Xt);break}this._x0=this._x1,this._x1=this._x2,this._x2=xt,this._y0=this._y1,this._y1=this._y2,this._y2=Xt}};var ft=function xt(Xt){function vr(Or){return new Pe(Or,Xt)}return vr.tension=function(Or){return xt(+Or)},vr}(0);function ct(xt,Xt,vr){var Or=xt._x1,ba=xt._y1,Pa=xt._x2,ya=xt._y2;if(xt._l01_a>i){var la=2*xt._l01_2a+3*xt._l01_a*xt._l12_a+xt._l12_2a,Ta=3*xt._l01_a*(xt._l01_a+xt._l12_a);Or=(Or*la-xt._x0*xt._l12_2a+xt._x2*xt._l01_2a)/Ta,ba=(ba*la-xt._y0*xt._l12_2a+xt._y2*xt._l01_2a)/Ta}if(xt._l23_a>i){var Ai=2*xt._l23_2a+3*xt._l23_a*xt._l12_a+xt._l12_2a,ki=3*xt._l23_a*(xt._l23_a+xt._l12_a);Pa=(Pa*Ai+xt._x1*xt._l23_2a-Xt*xt._l12_2a)/ki,ya=(ya*Ai+xt._y1*xt._l23_2a-vr*xt._l12_2a)/ki}xt._context.bezierCurveTo(Or,ba,Pa,ya,xt._x2,xt._y2)}function _t(xt,Xt){this._context=xt,this._alpha=Xt}_t.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(xt,Xt){if(xt=+xt,Xt=+Xt,this._point){var vr=this._x2-xt,Or=this._y2-Xt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(vr*vr+Or*Or,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(xt,Xt):this._context.moveTo(xt,Xt);break;case 1:this._point=2;break;case 2:this._point=3;default:ct(this,xt,Xt);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=xt,this._y0=this._y1,this._y1=this._y2,this._y2=Xt}};var Ct=function xt(Xt){function vr(Or){return Xt?new _t(Or,Xt):new Ie(Or,0)}return vr.alpha=function(Or){return xt(+Or)},vr}(.5);function ir(xt,Xt){this._context=xt,this._alpha=Xt}ir.prototype={areaStart:qt,areaEnd:qt,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(xt,Xt){if(xt=+xt,Xt=+Xt,this._point){var vr=this._x2-xt,Or=this._y2-Xt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(vr*vr+Or*Or,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=xt,this._y3=Xt;break;case 1:this._point=2,this._context.moveTo(this._x4=xt,this._y4=Xt);break;case 2:this._point=3,this._x5=xt,this._y5=Xt;break;default:ct(this,xt,Xt);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=xt,this._y0=this._y1,this._y1=this._y2,this._y2=Xt}};var rr=function xt(Xt){function vr(Or){return Xt?new ir(Or,Xt):new Ce(Or,0)}return vr.alpha=function(Or){return xt(+Or)},vr}(.5);function er(xt,Xt){this._context=xt,this._alpha=Xt}er.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(xt,Xt){if(xt=+xt,Xt=+Xt,this._point){var vr=this._x2-xt,Or=this._y2-Xt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(vr*vr+Or*Or,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:ct(this,xt,Xt);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=xt,this._y0=this._y1,this._y1=this._y2,this._y2=Xt}};var Lr=function xt(Xt){function vr(Or){return Xt?new er(Or,Xt):new Pe(Or,0)}return vr.alpha=function(Or){return xt(+Or)},vr}(.5);function fa(xt){this._context=xt}fa.prototype={areaStart:qt,areaEnd:qt,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(xt,Xt){xt=+xt,Xt=+Xt,this._point?this._context.lineTo(xt,Xt):(this._point=1,this._context.moveTo(xt,Xt))}};function Da(xt){return new fa(xt)}function Ia(xt){return xt<0?-1:1}function qa(xt,Xt,vr){var Or=xt._x1-xt._x0,ba=Xt-xt._x1,Pa=(xt._y1-xt._y0)/(Or||ba<0&&-0),ya=(vr-xt._y1)/(ba||Or<0&&-0),la=(Pa*ba+ya*Or)/(Or+ba);return(Ia(Pa)+Ia(ya))*Math.min(Math.abs(Pa),Math.abs(ya),.5*Math.abs(la))||0}function Wa(xt,Xt){var vr=xt._x1-xt._x0;return vr?(3*(xt._y1-xt._y0)/vr-Xt)/2:Xt}function Ca(xt,Xt,vr){var Or=xt._x0,ba=xt._y0,Pa=xt._x1,ya=xt._y1,la=(Pa-Or)/3;xt._context.bezierCurveTo(Or+la,ba+la*Xt,Pa-la,ya-la*vr,Pa,ya)}function hi(xt){this._context=xt}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(xt,Xt){var vr=NaN;if(xt=+xt,Xt=+Xt,!(xt===this._x1&&Xt===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(xt,Xt):this._context.moveTo(xt,Xt);break;case 1:this._point=2;break;case 2:this._point=3,Ca(this,Wa(this,vr=qa(this,xt,Xt)),vr);break;default:Ca(this,this._t0,vr=qa(this,xt,Xt));break}this._x0=this._x1,this._x1=xt,this._y0=this._y1,this._y1=Xt,this._t0=vr}}};function wi(xt){this._context=new Kt(xt)}(wi.prototype=Object.create(hi.prototype)).point=function(xt,Xt){hi.prototype.point.call(this,Xt,xt)};function Kt(xt){this._context=xt}Kt.prototype={moveTo:function(xt,Xt){this._context.moveTo(Xt,xt)},closePath:function(){this._context.closePath()},lineTo:function(xt,Xt){this._context.lineTo(Xt,xt)},bezierCurveTo:function(xt,Xt,vr,Or,ba,Pa){this._context.bezierCurveTo(Xt,xt,Or,vr,Pa,ba)}};function Ft(xt){return new hi(xt)}function Yt(xt){return new wi(xt)}function Jt(xt){this._context=xt}Jt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var xt=this._x,Xt=this._y,vr=xt.length;if(vr)if(this._line?this._context.lineTo(xt[0],Xt[0]):this._context.moveTo(xt[0],Xt[0]),vr===2)this._context.lineTo(xt[1],Xt[1]);else for(var Or=Fr(xt),ba=Fr(Xt),Pa=0,ya=1;ya=0;--Xt)ba[Xt]=(ya[Xt]-ba[Xt+1])/Pa[Xt];for(Pa[vr-1]=(xt[vr]+ba[vr-1])/2,Xt=0;Xt=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(xt,Xt){switch(xt=+xt,Xt=+Xt,this._point){case 0:this._point=1,this._line?this._context.lineTo(xt,Xt):this._context.moveTo(xt,Xt);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,Xt),this._context.lineTo(xt,Xt);else{var vr=this._x*(1-this._t)+xt*this._t;this._context.lineTo(vr,this._y),this._context.lineTo(vr,Xt)}break}}this._x=xt,this._y=Xt}};function ca(xt){return new ra(xt,.5)}function Ba(xt){return new ra(xt,0)}function $a(xt){return new ra(xt,1)}function Za(xt,Xt){if((ya=xt.length)>1)for(var vr=1,Or,ba,Pa=xt[Xt[0]],ya,la=Pa.length;vr=0;)vr[Xt]=Xt;return vr}function pi(xt,Xt){return xt[Xt]}function Ra(){var xt=S([]),Xt=ri,vr=Za,Or=pi;function ba(Pa){var ya=xt.apply(this,arguments),la,Ta=Pa.length,Ai=ya.length,ki=new Array(Ai),Ki;for(la=0;la0){for(var vr,Or,ba=0,Pa=xt[0].length,ya;ba0)for(var vr,Or=0,ba,Pa,ya,la,Ta,Ai=xt[Xt[0]].length;Or0?(ba[0]=ya,ba[1]=ya+=Pa):Pa<0?(ba[1]=la,ba[0]=la+=Pa):(ba[0]=0,ba[1]=Pa)}function hn(xt,Xt){if((ba=xt.length)>0){for(var vr=0,Or=xt[Xt[0]],ba,Pa=Or.length;vr0)||!((Pa=(ba=xt[Xt[0]]).length)>0))){for(var vr=0,Or=1,ba,Pa,ya;OrPa&&(Pa=ba,vr=Xt);return vr}function Cr(xt){var Xt=xt.map(xr);return ri(xt).sort(function(vr,Or){return Xt[vr]-Xt[Or]})}function xr(xt){for(var Xt=0,vr=-1,Or=xt.length,ba;++vr0;--oe)Q(q*=.99),re(),j(q),re();function ae(){var ce=x.max(ee,function(De){return De.length}),be=B*(R-y)/(ce-1);z>be&&(z=be);var Ae=x.min(ee,function(De){return(R-y-(De.length-1)*z)/x.sum(De,c)});ee.forEach(function(De){De.forEach(function(ze,Ze){ze.y1=(ze.y0=Ze)+ze.value*Ae})}),Y.links.forEach(function(De){De.width=De.value*Ae})}function j(ce){ee.forEach(function(be){be.forEach(function(Ae){if(Ae.targetLinks.length){var De=(x.sum(Ae.targetLinks,p)/x.sum(Ae.targetLinks,c)-m(Ae))*ce;Ae.y0+=De,Ae.y1+=De}})})}function Q(ce){ee.slice().reverse().forEach(function(be){be.forEach(function(Ae){if(Ae.sourceLinks.length){var De=(x.sum(Ae.sourceLinks,T)/x.sum(Ae.sourceLinks,c)-m(Ae))*ce;Ae.y0+=De,Ae.y1+=De}})})}function re(){ee.forEach(function(ce){var be,Ae,De=y,ze=ce.length,Ze;for(ce.sort(h),Ze=0;Ze0&&(be.y0+=Ae,be.y1+=Ae),De=be.y1+z;if(Ae=De-z-R,Ae>0)for(De=be.y0-=Ae,be.y1-=Ae,Ze=ze-2;Ze>=0;--Ze)be=ce[Ze],Ae=be.y1+z-De,Ae>0&&(be.y0-=Ae,be.y1-=Ae),De=be.y0})}}function V(Y){Y.nodes.forEach(function(ee){ee.sourceLinks.sort(s),ee.targetLinks.sort(i)}),Y.nodes.forEach(function(ee){var q=ee.y0,oe=q;ee.sourceLinks.forEach(function(ae){ae.y0=q+ae.width/2,q+=ae.width}),ee.targetLinks.forEach(function(ae){ae.y1=oe+ae.width/2,oe+=ae.width})})}return X};function g(u){return[u.source.x1,u.y0]}function b(u){return[u.target.x0,u.y1]}var d=function(){return E.linkHorizontal().source(g).target(b)};v.sankey=M,v.sankeyCenter=a,v.sankeyLeft=t,v.sankeyRight=r,v.sankeyJustify=o,v.sankeyLinkHorizontal=d,Object.defineProperty(v,"__esModule",{value:!0})})}}),pG=Xe({"node_modules/elementary-circuits-directed-graph/johnson.js"(Z,G){var v=N6();G.exports=function(S,E){var e=[],t=[],r=[],o={},a=[],n;function i(A){r[A]=!1,o.hasOwnProperty(A)&&Object.keys(o[A]).forEach(function(M){delete o[A][M],r[M]&&i(M)})}function s(A){var M=!1;t.push(A),r[A]=!0;var g,b;for(g=0;g=A})}function m(A){c(A);for(var M=S,g=v(M),b=g.components.filter(function(z){return z.length>1}),d=1/0,u,y=0;y"u"?"undefined":s(Ie))!=="object"&&(Ie=Ke.source=g(Ne,Ie)),(typeof Ve>"u"?"undefined":s(Ve))!=="object"&&(Ve=Ke.target=g(Ne,Ve)),Ie.sourceLinks.push(Ke),Ve.targetLinks.push(Ke)}),wt}function Wt(wt){wt.nodes.forEach(function(Ne){Ne.partOfCycle=!1,Ne.value=Math.max(x.sum(Ne.sourceLinks,p),x.sum(Ne.targetLinks,p)),Ne.sourceLinks.forEach(function(Ke){Ke.circular&&(Ne.partOfCycle=!0,Ne.circularLinkType=Ke.circularLinkType)}),Ne.targetLinks.forEach(function(Ke){Ke.circular&&(Ne.partOfCycle=!0,Ne.circularLinkType=Ke.circularLinkType)})})}function kr(wt){var Ne=0,Ke=0,Te=0,Ie=0,Ve=x.max(wt.nodes,function(Ce){return Ce.column});return wt.links.forEach(function(Ce){Ce.circular&&(Ce.circularLinkType=="top"?Ne=Ne+Ce.width:Ke=Ke+Ce.width,Ce.target.column==0&&(Ie=Ie+Ce.width),Ce.source.column==Ve&&(Te=Te+Ce.width))}),Ne=Ne>0?Ne+d+u:Ne,Ke=Ke>0?Ke+d+u:Ke,Te=Te>0?Te+d+u:Te,Ie=Ie>0?Ie+d+u:Ie,{top:Ne,bottom:Ke,left:Ie,right:Te}}function mr(wt,Ne){var Ke=x.max(wt.nodes,function(ft){return ft.column}),Te=at-ze,Ie=nt-Ze,Ve=Te+Ne.right+Ne.left,Ce=Ie+Ne.top+Ne.bottom,Ee=Te/Ve,Pe=Ie/Ce;return ze=ze*Ee+Ne.left,at=Ne.right==0?at:at*Ee,Ze=Ze*Pe+Ne.top,nt=nt*Pe,wt.nodes.forEach(function(ft){ft.x0=ze+ft.column*((at-ze-rt)/Ke),ft.x1=ft.x0+rt}),Pe}function qr(wt){var Ne,Ke,Te;for(Ne=wt.nodes,Ke=[],Te=0;Ne.length;++Te,Ne=Ke,Ke=[])Ne.forEach(function(Ie){Ie.depth=Te,Ie.sourceLinks.forEach(function(Ve){Ke.indexOf(Ve.target)<0&&!Ve.circular&&Ke.push(Ve.target)})});for(Ne=wt.nodes,Ke=[],Te=0;Ne.length;++Te,Ne=Ke,Ke=[])Ne.forEach(function(Ie){Ie.height=Te,Ie.targetLinks.forEach(function(Ve){Ke.indexOf(Ve.source)<0&&!Ve.circular&&Ke.push(Ve.source)})});wt.nodes.forEach(function(Ie){Ie.column=Math.floor(ye.call(null,Ie,Te))})}function Sr(wt,Ne,Ke){var Te=S.nest().key(function(ft){return ft.column}).sortKeys(x.ascending).entries(wt.nodes).map(function(ft){return ft.values});Ce(Ke),Pe();for(var Ie=1,Ve=Ne;Ve>0;--Ve)Ee(Ie*=.99,Ke),Pe();function Ce(ft){if(Qe){var ct=1/0;Te.forEach(function(rr){var er=nt*Qe/(rr.length+1);ct=er0))if(rr==0&&ir==1)Lr=er.y1-er.y0,er.y0=nt/2-Lr/2,er.y1=nt/2+Lr/2;else if(rr==_t-1&&ir==1)Lr=er.y1-er.y0,er.y0=nt/2-Lr/2,er.y1=nt/2+Lr/2;else{var fa=0,Da=x.mean(er.sourceLinks,_),Ia=x.mean(er.targetLinks,l);Da&&Ia?fa=(Da+Ia)/2:fa=Da||Ia;var qa=(fa-T(er))*ft;er.y0+=qa,er.y1+=qa}})})}function Pe(){Te.forEach(function(ft){var ct,_t,Ct=Ze,ir=ft.length,rr;for(ft.sort(m),rr=0;rr0&&(ct.y0+=_t,ct.y1+=_t),Ct=ct.y1+st;if(_t=Ct-st-nt,_t>0)for(Ct=ct.y0-=_t,ct.y1-=_t,rr=ir-2;rr>=0;--rr)ct=ft[rr],_t=ct.y1+st-Ct,_t>0&&(ct.y0-=_t,ct.y1-=_t),Ct=ct.y0})}}function Rr(wt){wt.nodes.forEach(function(Ne){Ne.sourceLinks.sort(c),Ne.targetLinks.sort(h)}),wt.nodes.forEach(function(Ne){var Ke=Ne.y0,Te=Ke,Ie=Ne.y1,Ve=Ie;Ne.sourceLinks.forEach(function(Ce){Ce.circular?(Ce.y0=Ie-Ce.width/2,Ie=Ie-Ce.width):(Ce.y0=Ke+Ce.width/2,Ke+=Ce.width)}),Ne.targetLinks.forEach(function(Ce){Ce.circular?(Ce.y1=Ve-Ce.width/2,Ve=Ve-Ce.width):(Ce.y1=Te+Ce.width/2,Te+=Ce.width)})})}return It}function R(ze,Ze,at){var nt=0;if(at===null){for(var rt=[],st=0;stZe.source.column)}function N(ze,Ze){var at=0;ze.sourceLinks.forEach(function(rt){at=rt.circular&&!Ae(rt,Ze)?at+1:at});var nt=0;return ze.targetLinks.forEach(function(rt){nt=rt.circular&&!Ae(rt,Ze)?nt+1:nt}),at+nt}function O(ze){var Ze=ze.source.sourceLinks,at=0;Ze.forEach(function(st){at=st.circular?at+1:at});var nt=ze.target.targetLinks,rt=0;return nt.forEach(function(st){rt=st.circular?rt+1:rt}),!(at>1||rt>1)}function P(ze,Ze,at){return ze.sort(X),ze.forEach(function(nt,rt){var st=0;if(Ae(nt,at)&&O(nt))nt.circularPathData.verticalBuffer=st+nt.width/2;else{var Me=0;for(Me;Mest?ye:st}nt.circularPathData.verticalBuffer=st+nt.width/2}}),ze}function U(ze,Ze,at,nt){var rt=5,st=x.min(ze.links,function(he){return he.source.y0});ze.links.forEach(function(he){he.circular&&(he.circularPathData={})});var Me=ze.links.filter(function(he){return he.circularLinkType=="top"});P(Me,Ze,nt);var ye=ze.links.filter(function(he){return he.circularLinkType=="bottom"});P(ye,Ze,nt),ze.links.forEach(function(he){if(he.circular){if(he.circularPathData.arcRadius=he.width+u,he.circularPathData.leftNodeBuffer=rt,he.circularPathData.rightNodeBuffer=rt,he.circularPathData.sourceWidth=he.source.x1-he.source.x0,he.circularPathData.sourceX=he.source.x0+he.circularPathData.sourceWidth,he.circularPathData.targetX=he.target.x0,he.circularPathData.sourceY=he.y0,he.circularPathData.targetY=he.y1,Ae(he,nt)&&O(he))he.circularPathData.leftSmallArcRadius=u+he.width/2,he.circularPathData.leftLargeArcRadius=u+he.width/2,he.circularPathData.rightSmallArcRadius=u+he.width/2,he.circularPathData.rightLargeArcRadius=u+he.width/2,he.circularLinkType=="bottom"?(he.circularPathData.verticalFullExtent=he.source.y1+d+he.circularPathData.verticalBuffer,he.circularPathData.verticalLeftInnerExtent=he.circularPathData.verticalFullExtent-he.circularPathData.leftLargeArcRadius,he.circularPathData.verticalRightInnerExtent=he.circularPathData.verticalFullExtent-he.circularPathData.rightLargeArcRadius):(he.circularPathData.verticalFullExtent=he.source.y0-d-he.circularPathData.verticalBuffer,he.circularPathData.verticalLeftInnerExtent=he.circularPathData.verticalFullExtent+he.circularPathData.leftLargeArcRadius,he.circularPathData.verticalRightInnerExtent=he.circularPathData.verticalFullExtent+he.circularPathData.rightLargeArcRadius);else{var Oe=he.source.column,tt=he.circularLinkType,ot=ze.links.filter(function(It){return It.source.column==Oe&&It.circularLinkType==tt});he.circularLinkType=="bottom"?ot.sort(se):ot.sort($);var Qe=0;ot.forEach(function(It,qt){It.circularLinkID==he.circularLinkID&&(he.circularPathData.leftSmallArcRadius=u+he.width/2+Qe,he.circularPathData.leftLargeArcRadius=u+he.width/2+qt*Ze+Qe),Qe=Qe+It.width}),Oe=he.target.column,ot=ze.links.filter(function(It){return It.target.column==Oe&&It.circularLinkType==tt}),he.circularLinkType=="bottom"?ot.sort(fe):ot.sort(le),Qe=0,ot.forEach(function(It,qt){It.circularLinkID==he.circularLinkID&&(he.circularPathData.rightSmallArcRadius=u+he.width/2+Qe,he.circularPathData.rightLargeArcRadius=u+he.width/2+qt*Ze+Qe),Qe=Qe+It.width}),he.circularLinkType=="bottom"?(he.circularPathData.verticalFullExtent=Math.max(at,he.source.y1,he.target.y1)+d+he.circularPathData.verticalBuffer,he.circularPathData.verticalLeftInnerExtent=he.circularPathData.verticalFullExtent-he.circularPathData.leftLargeArcRadius,he.circularPathData.verticalRightInnerExtent=he.circularPathData.verticalFullExtent-he.circularPathData.rightLargeArcRadius):(he.circularPathData.verticalFullExtent=st-d-he.circularPathData.verticalBuffer,he.circularPathData.verticalLeftInnerExtent=he.circularPathData.verticalFullExtent+he.circularPathData.leftLargeArcRadius,he.circularPathData.verticalRightInnerExtent=he.circularPathData.verticalFullExtent+he.circularPathData.rightLargeArcRadius)}he.circularPathData.leftInnerExtent=he.circularPathData.sourceX+he.circularPathData.leftNodeBuffer,he.circularPathData.rightInnerExtent=he.circularPathData.targetX-he.circularPathData.rightNodeBuffer,he.circularPathData.leftFullExtent=he.circularPathData.sourceX+he.circularPathData.leftLargeArcRadius+he.circularPathData.leftNodeBuffer,he.circularPathData.rightFullExtent=he.circularPathData.targetX-he.circularPathData.rightLargeArcRadius-he.circularPathData.rightNodeBuffer}if(he.circular)he.path=B(he);else{var Pt=E.linkHorizontal().source(function(It){var qt=It.source.x0+(It.source.x1-It.source.x0),Wt=It.y0;return[qt,Wt]}).target(function(It){var qt=It.target.x0,Wt=It.y1;return[qt,Wt]});he.path=Pt(he)}})}function B(ze){var Ze="";return ze.circularLinkType=="top"?Ze="M"+ze.circularPathData.sourceX+" "+ze.circularPathData.sourceY+" L"+ze.circularPathData.leftInnerExtent+" "+ze.circularPathData.sourceY+" A"+ze.circularPathData.leftLargeArcRadius+" "+ze.circularPathData.leftSmallArcRadius+" 0 0 0 "+ze.circularPathData.leftFullExtent+" "+(ze.circularPathData.sourceY-ze.circularPathData.leftSmallArcRadius)+" L"+ze.circularPathData.leftFullExtent+" "+ze.circularPathData.verticalLeftInnerExtent+" A"+ze.circularPathData.leftLargeArcRadius+" "+ze.circularPathData.leftLargeArcRadius+" 0 0 0 "+ze.circularPathData.leftInnerExtent+" "+ze.circularPathData.verticalFullExtent+" L"+ze.circularPathData.rightInnerExtent+" "+ze.circularPathData.verticalFullExtent+" A"+ze.circularPathData.rightLargeArcRadius+" "+ze.circularPathData.rightLargeArcRadius+" 0 0 0 "+ze.circularPathData.rightFullExtent+" "+ze.circularPathData.verticalRightInnerExtent+" L"+ze.circularPathData.rightFullExtent+" "+(ze.circularPathData.targetY-ze.circularPathData.rightSmallArcRadius)+" A"+ze.circularPathData.rightLargeArcRadius+" "+ze.circularPathData.rightSmallArcRadius+" 0 0 0 "+ze.circularPathData.rightInnerExtent+" "+ze.circularPathData.targetY+" L"+ze.circularPathData.targetX+" "+ze.circularPathData.targetY:Ze="M"+ze.circularPathData.sourceX+" "+ze.circularPathData.sourceY+" L"+ze.circularPathData.leftInnerExtent+" "+ze.circularPathData.sourceY+" A"+ze.circularPathData.leftLargeArcRadius+" "+ze.circularPathData.leftSmallArcRadius+" 0 0 1 "+ze.circularPathData.leftFullExtent+" "+(ze.circularPathData.sourceY+ze.circularPathData.leftSmallArcRadius)+" L"+ze.circularPathData.leftFullExtent+" "+ze.circularPathData.verticalLeftInnerExtent+" A"+ze.circularPathData.leftLargeArcRadius+" "+ze.circularPathData.leftLargeArcRadius+" 0 0 1 "+ze.circularPathData.leftInnerExtent+" "+ze.circularPathData.verticalFullExtent+" L"+ze.circularPathData.rightInnerExtent+" "+ze.circularPathData.verticalFullExtent+" A"+ze.circularPathData.rightLargeArcRadius+" "+ze.circularPathData.rightLargeArcRadius+" 0 0 1 "+ze.circularPathData.rightFullExtent+" "+ze.circularPathData.verticalRightInnerExtent+" L"+ze.circularPathData.rightFullExtent+" "+(ze.circularPathData.targetY+ze.circularPathData.rightSmallArcRadius)+" A"+ze.circularPathData.rightLargeArcRadius+" "+ze.circularPathData.rightSmallArcRadius+" 0 0 1 "+ze.circularPathData.rightInnerExtent+" "+ze.circularPathData.targetY+" L"+ze.circularPathData.targetX+" "+ze.circularPathData.targetY,Ze}function X(ze,Ze){return V(ze)==V(Ze)?ze.circularLinkType=="bottom"?se(ze,Ze):$(ze,Ze):V(Ze)-V(ze)}function $(ze,Ze){return ze.y0-Ze.y0}function se(ze,Ze){return Ze.y0-ze.y0}function le(ze,Ze){return ze.y1-Ze.y1}function fe(ze,Ze){return Ze.y1-ze.y1}function V(ze){return ze.target.column-ze.source.column}function Y(ze){return ze.target.x0-ze.source.x1}function ee(ze,Ze){var at=z(ze),nt=Y(Ze)/Math.tan(at),rt=be(ze)=="up"?ze.y1+nt:ze.y1-nt;return rt}function q(ze,Ze){var at=z(ze),nt=Y(Ze)/Math.tan(at),rt=be(ze)=="up"?ze.y1-nt:ze.y1+nt;return rt}function oe(ze,Ze,at,nt){ze.links.forEach(function(rt){if(!rt.circular&&rt.target.column-rt.source.column>1){var st=rt.source.column+1,Me=rt.target.column-1,ye=1,he=Me-st+1;for(ye=1;st<=Me;st++,ye++)ze.nodes.forEach(function(Oe){if(Oe.column==st){var tt=ye/(he+1),ot=Math.pow(1-tt,3),Qe=3*tt*Math.pow(1-tt,2),Pt=3*Math.pow(tt,2)*(1-tt),It=Math.pow(tt,3),qt=ot*rt.y0+Qe*rt.y0+Pt*rt.y1+It*rt.y1,Wt=qt-rt.width/2,kr=qt+rt.width/2,mr;Wt>Oe.y0&&WtOe.y0&&krOe.y1&&j(qr,mr,Ze,at)})):WtOe.y1&&(mr=kr-Oe.y0+10,Oe=j(Oe,mr,Ze,at),ze.nodes.forEach(function(qr){b(qr,nt)==b(Oe,nt)||qr.column!=Oe.column||qr.y0Oe.y1&&j(qr,mr,Ze,at)}))}})}})}function ae(ze,Ze){return ze.y0>Ze.y0&&ze.y0Ze.y0&&ze.y1Ze.y1}function j(ze,Ze,at,nt){return ze.y0+Ze>=at&&ze.y1+Ze<=nt&&(ze.y0=ze.y0+Ze,ze.y1=ze.y1+Ze,ze.targetLinks.forEach(function(rt){rt.y1=rt.y1+Ze}),ze.sourceLinks.forEach(function(rt){rt.y0=rt.y0+Ze})),ze}function Q(ze,Ze,at,nt){ze.nodes.forEach(function(rt){nt&&rt.y+(rt.y1-rt.y0)>Ze&&(rt.y=rt.y-(rt.y+(rt.y1-rt.y0)-Ze));var st=ze.links.filter(function(he){return b(he.source,at)==b(rt,at)}),Me=st.length;Me>1&&st.sort(function(he,Oe){if(!he.circular&&!Oe.circular){if(he.target.column==Oe.target.column)return he.y1-Oe.y1;if(ce(he,Oe)){if(he.target.column>Oe.target.column){var tt=q(Oe,he);return he.y1-tt}if(Oe.target.column>he.target.column){var ot=q(he,Oe);return ot-Oe.y1}}else return he.y1-Oe.y1}if(he.circular&&!Oe.circular)return he.circularLinkType=="top"?-1:1;if(Oe.circular&&!he.circular)return Oe.circularLinkType=="top"?1:-1;if(he.circular&&Oe.circular)return he.circularLinkType===Oe.circularLinkType&&he.circularLinkType=="top"?he.target.column===Oe.target.column?he.target.y1-Oe.target.y1:Oe.target.column-he.target.column:he.circularLinkType===Oe.circularLinkType&&he.circularLinkType=="bottom"?he.target.column===Oe.target.column?Oe.target.y1-he.target.y1:he.target.column-Oe.target.column:he.circularLinkType=="top"?-1:1});var ye=rt.y0;st.forEach(function(he){he.y0=ye+he.width/2,ye=ye+he.width}),st.forEach(function(he,Oe){if(he.circularLinkType=="bottom"){var tt=Oe+1,ot=0;for(tt;tt1&&rt.sort(function(ye,he){if(!ye.circular&&!he.circular){if(ye.source.column==he.source.column)return ye.y0-he.y0;if(ce(ye,he)){if(he.source.column0?"up":"down"}function Ae(ze,Ze){return b(ze.source,Ze)==b(ze.target,Ze)}function De(ze,Ze,at){var nt=ze.nodes,rt=ze.links,st=!1,Me=!1;if(rt.forEach(function(Qe){Qe.circularLinkType=="top"?st=!0:Qe.circularLinkType=="bottom"&&(Me=!0)}),st==!1||Me==!1){var ye=x.min(nt,function(Qe){return Qe.y0}),he=x.max(nt,function(Qe){return Qe.y1}),Oe=he-ye,tt=at-Ze,ot=tt/Oe;nt.forEach(function(Qe){var Pt=(Qe.y1-Qe.y0)*ot;Qe.y0=(Qe.y0-ye)*ot,Qe.y1=Qe.y0+Pt}),rt.forEach(function(Qe){Qe.y0=(Qe.y0-ye)*ot,Qe.y1=(Qe.y1-ye)*ot,Qe.width=Qe.width*ot})}}v.sankeyCircular=f,v.sankeyCenter=n,v.sankeyLeft=r,v.sankeyRight=o,v.sankeyJustify=a,Object.defineProperty(v,"__esModule",{value:!0})})}}),j6=Xe({"src/traces/sankey/constants.js"(Z,G){"use strict";G.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"}}}}),vG=Xe({"src/traces/sankey/render.js"(Z,G){"use strict";var v=cG(),x=(pg(),zf(p0)).interpolateNumber,S=Hn(),E=hG(),e=dG(),t=j6(),r=Ch(),o=$n(),a=es(),n=sa(),i=n.strTranslate,s=n.strRotate,h=kv(),c=h.keyFun,m=h.repeat,p=h.unwrap,T=ou(),l=so(),_=uh(),w=_.CAP_SHIFT,A=_.LINE_SPACING,M=3;function g(ee,q,oe){var ae=p(q),j=ae.trace,Q=j.domain,re=j.orientation==="h",ce=j.node.pad,be=j.node.thickness,Ae={justify:E.sankeyJustify,left:E.sankeyLeft,right:E.sankeyRight,center:E.sankeyCenter}[j.node.align],De=ee.width*(Q.x[1]-Q.x[0]),ze=ee.height*(Q.y[1]-Q.y[0]),Ze=ae._nodes,at=ae._links,nt=ae.circular,rt;nt?rt=e.sankeyCircular().circularLinkGap(0):rt=E.sankey(),rt.iterations(t.sankeyIterations).size(re?[De,ze]:[ze,De]).nodeWidth(be).nodePadding(ce).nodeId(function(qr){return qr.pointNumber}).nodeAlign(Ae).nodes(Ze).links(at);var st=rt();rt.nodePadding()=Ne||(wt=Ne-Rr.y0,wt>1e-6&&(Rr.y0+=wt,Rr.y1+=wt)),Ne=Rr.y1+ce})}function qt(qr){var Sr=qr.map(function(Ve,Ce){return{x0:Ve.x0,index:Ce}}).sort(function(Ve,Ce){return Ve.x0-Ce.x0}),Rr=[],wt=-1,Ne,Ke=-1/0,Te;for(Me=0;MeKe+be&&(wt+=1,Ne=Ie.x0),Ke=Ie.x0,Rr[wt]||(Rr[wt]=[]),Rr[wt].push(Ie),Te=Ne-Ie.x0,Ie.x0+=Te,Ie.x1+=Te}return Rr}if(j.node.x.length&&j.node.y.length){for(Me=0;Me0?" L "+j.targetX+" "+j.targetY:"")+"Z"):(oe="M "+(j.targetX-q)+" "+(j.targetY-ae)+" L "+(j.rightInnerExtent-q)+" "+(j.targetY-ae)+" A "+(j.rightLargeArcRadius+ae)+" "+(j.rightSmallArcRadius+ae)+" 0 0 0 "+(j.rightFullExtent-ae-q)+" "+(j.targetY+j.rightSmallArcRadius)+" L "+(j.rightFullExtent-ae-q)+" "+j.verticalRightInnerExtent,Q&&re?oe+=" A "+(j.rightLargeArcRadius+ae)+" "+(j.rightLargeArcRadius+ae)+" 0 0 0 "+(j.rightInnerExtent-ae-q)+" "+(j.verticalFullExtent+ae)+" L "+(j.rightFullExtent+ae-q-(j.rightLargeArcRadius-ae))+" "+(j.verticalFullExtent+ae)+" A "+(j.rightLargeArcRadius+ae)+" "+(j.rightLargeArcRadius+ae)+" 0 0 0 "+(j.leftFullExtent+ae)+" "+j.verticalLeftInnerExtent:Q?oe+=" A "+(j.rightLargeArcRadius-ae)+" "+(j.rightSmallArcRadius-ae)+" 0 0 1 "+(j.rightFullExtent-q-ae-(j.rightLargeArcRadius-ae))+" "+(j.verticalFullExtent-ae)+" L "+(j.leftFullExtent+ae+(j.rightLargeArcRadius-ae))+" "+(j.verticalFullExtent-ae)+" A "+(j.rightLargeArcRadius-ae)+" "+(j.rightSmallArcRadius-ae)+" 0 0 1 "+(j.leftFullExtent+ae)+" "+j.verticalLeftInnerExtent:oe+=" A "+(j.rightLargeArcRadius+ae)+" "+(j.rightLargeArcRadius+ae)+" 0 0 0 "+(j.rightInnerExtent-q)+" "+(j.verticalFullExtent+ae)+" L "+j.leftInnerExtent+" "+(j.verticalFullExtent+ae)+" A "+(j.leftLargeArcRadius+ae)+" "+(j.leftLargeArcRadius+ae)+" 0 0 0 "+(j.leftFullExtent+ae)+" "+j.verticalLeftInnerExtent,oe+=" L "+(j.leftFullExtent+ae)+" "+(j.sourceY+j.leftSmallArcRadius)+" A "+(j.leftLargeArcRadius+ae)+" "+(j.leftSmallArcRadius+ae)+" 0 0 0 "+j.leftInnerExtent+" "+(j.sourceY-ae)+" L "+j.sourceX+" "+(j.sourceY-ae)+" L "+j.sourceX+" "+(j.sourceY+ae)+" L "+j.leftInnerExtent+" "+(j.sourceY+ae)+" A "+(j.leftLargeArcRadius-ae)+" "+(j.leftSmallArcRadius-ae)+" 0 0 1 "+(j.leftFullExtent-ae)+" "+(j.sourceY+j.leftSmallArcRadius)+" L "+(j.leftFullExtent-ae)+" "+j.verticalLeftInnerExtent,Q&&re?oe+=" A "+(j.rightLargeArcRadius-ae)+" "+(j.rightSmallArcRadius-ae)+" 0 0 1 "+(j.leftFullExtent-ae-(j.rightLargeArcRadius-ae))+" "+(j.verticalFullExtent-ae)+" L "+(j.rightFullExtent+ae-q+(j.rightLargeArcRadius-ae))+" "+(j.verticalFullExtent-ae)+" A "+(j.rightLargeArcRadius-ae)+" "+(j.rightSmallArcRadius-ae)+" 0 0 1 "+(j.rightFullExtent+ae-q)+" "+j.verticalRightInnerExtent:Q?oe+=" A "+(j.rightLargeArcRadius+ae)+" "+(j.rightLargeArcRadius+ae)+" 0 0 0 "+(j.leftFullExtent+ae)+" "+(j.verticalFullExtent+ae)+" L "+(j.rightFullExtent-q-ae)+" "+(j.verticalFullExtent+ae)+" A "+(j.rightLargeArcRadius+ae)+" "+(j.rightLargeArcRadius+ae)+" 0 0 0 "+(j.rightFullExtent+ae-q)+" "+j.verticalRightInnerExtent:oe+=" A "+(j.leftLargeArcRadius-ae)+" "+(j.leftLargeArcRadius-ae)+" 0 0 1 "+j.leftInnerExtent+" "+(j.verticalFullExtent-ae)+" L "+(j.rightInnerExtent-q)+" "+(j.verticalFullExtent-ae)+" A "+(j.rightLargeArcRadius-ae)+" "+(j.rightLargeArcRadius-ae)+" 0 0 1 "+(j.rightFullExtent+ae-q)+" "+j.verticalRightInnerExtent,oe+=" L "+(j.rightFullExtent+ae-q)+" "+(j.targetY+j.rightSmallArcRadius)+" A "+(j.rightLargeArcRadius-ae)+" "+(j.rightSmallArcRadius-ae)+" 0 0 1 "+(j.rightInnerExtent-q)+" "+(j.targetY+ae)+" L "+(j.targetX-q)+" "+(j.targetY+ae)+(q>0?" L "+j.targetX+" "+j.targetY:"")+"Z"),oe}function u(){var ee=.5;function q(oe){var ae=oe.linkArrowLength;if(oe.link.circular)return d(oe.link,ae);var j=Math.abs((oe.link.target.x0-oe.link.source.x1)/2);ae>j&&(ae=j);var Q=oe.link.source.x1,re=oe.link.target.x0-ae,ce=x(Q,re),be=ce(ee),Ae=ce(1-ee),De=oe.link.y0-oe.link.width/2,ze=oe.link.y0+oe.link.width/2,Ze=oe.link.y1-oe.link.width/2,at=oe.link.y1+oe.link.width/2,nt="M"+Q+","+De,rt="C"+be+","+De+" "+Ae+","+Ze+" "+re+","+Ze,st="C"+Ae+","+at+" "+be+","+ze+" "+Q+","+ze,Me=ae>0?"L"+(re+ae)+","+(Ze+oe.link.width/2):"";return Me+="L"+re+","+at,nt+rt+Me+st+"Z"}return q}function y(ee,q){var oe=r(q.color),ae=t.nodePadAcross,j=ee.nodePad/2;q.dx=q.x1-q.x0,q.dy=q.y1-q.y0;var Q=q.dx,re=Math.max(.5,q.dy),ce="node_"+q.pointNumber;return q.group&&(ce=n.randstr()),q.trace=ee.trace,q.curveNumber=ee.trace.index,{index:q.pointNumber,key:ce,partOfGroup:q.partOfGroup||!1,group:q.group,traceId:ee.key,trace:ee.trace,node:q,nodePad:ee.nodePad,nodeLineColor:ee.nodeLineColor,nodeLineWidth:ee.nodeLineWidth,textFont:ee.textFont,size:ee.horizontal?ee.height:ee.width,visibleWidth:Math.ceil(Q),visibleHeight:re,zoneX:-ae,zoneY:-j,zoneWidth:Q+2*ae,zoneHeight:re+2*j,labelY:ee.horizontal?q.dy/2+1:q.dx/2+1,left:q.originalLayer===1,sizeAcross:ee.width,forceLayouts:ee.forceLayouts,horizontal:ee.horizontal,darkBackground:oe.getBrightness()<=128,tinyColorHue:o.tinyRGB(oe),tinyColorAlpha:oe.getAlpha(),valueFormat:ee.valueFormat,valueSuffix:ee.valueSuffix,sankey:ee.sankey,graph:ee.graph,arrangement:ee.arrangement,uniqueNodeLabelPathId:[ee.guid,ee.key,ce].join("_"),interactionState:ee.interactionState,figure:ee}}function f(ee){ee.attr("transform",function(q){return i(q.node.x0.toFixed(3),q.node.y0.toFixed(3))})}function R(ee){ee.call(f)}function L(ee,q){ee.call(R),q.attr("d",u())}function z(ee){ee.attr("width",function(q){return q.node.x1-q.node.x0}).attr("height",function(q){return q.visibleHeight})}function F(ee){return ee.link.width>1||ee.linkLineWidth>0}function N(ee){var q=i(ee.translateX,ee.translateY);return q+(ee.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)")}function O(ee,q,oe){ee.on(".basic",null).on("mouseover.basic",function(ae){!ae.interactionState.dragInProgress&&!ae.partOfGroup&&(oe.hover(this,ae,q),ae.interactionState.hovered=[this,ae])}).on("mousemove.basic",function(ae){!ae.interactionState.dragInProgress&&!ae.partOfGroup&&(oe.follow(this,ae),ae.interactionState.hovered=[this,ae])}).on("mouseout.basic",function(ae){!ae.interactionState.dragInProgress&&!ae.partOfGroup&&(oe.unhover(this,ae,q),ae.interactionState.hovered=!1)}).on("click.basic",function(ae){ae.interactionState.hovered&&(oe.unhover(this,ae,q),ae.interactionState.hovered=!1),!ae.interactionState.dragInProgress&&!ae.partOfGroup&&oe.select(this,ae,q)})}function P(ee,q,oe,ae){var j=S.behavior.drag().origin(function(Q){return{x:Q.node.x0+Q.visibleWidth/2,y:Q.node.y0+Q.visibleHeight/2}}).on("dragstart",function(Q){if(Q.arrangement!=="fixed"&&(n.ensureSingle(ae._fullLayout._infolayer,"g","dragcover",function(ce){ae._fullLayout._dragCover=ce}),n.raiseToTop(this),Q.interactionState.dragInProgress=Q.node,le(Q.node),Q.interactionState.hovered&&(oe.nodeEvents.unhover.apply(0,Q.interactionState.hovered),Q.interactionState.hovered=!1),Q.arrangement==="snap")){var re=Q.traceId+"|"+Q.key;Q.forceLayouts[re]?Q.forceLayouts[re].alpha(1):U(ee,re,Q,ae),B(ee,q,Q,re,ae)}}).on("drag",function(Q){if(Q.arrangement!=="fixed"){var re=S.event.x,ce=S.event.y;Q.arrangement==="snap"?(Q.node.x0=re-Q.visibleWidth/2,Q.node.x1=re+Q.visibleWidth/2,Q.node.y0=ce-Q.visibleHeight/2,Q.node.y1=ce+Q.visibleHeight/2):(Q.arrangement==="freeform"&&(Q.node.x0=re-Q.visibleWidth/2,Q.node.x1=re+Q.visibleWidth/2),ce=Math.max(0,Math.min(Q.size-Q.visibleHeight/2,ce)),Q.node.y0=ce-Q.visibleHeight/2,Q.node.y1=ce+Q.visibleHeight/2),le(Q.node),Q.arrangement!=="snap"&&(Q.sankey.update(Q.graph),L(ee.filter(fe(Q)),q))}}).on("dragend",function(Q){if(Q.arrangement!=="fixed"){Q.interactionState.dragInProgress=!1;for(var re=0;re0)window.requestAnimationFrame(Q);else{var be=oe.node.originalX;oe.node.x0=be-oe.visibleWidth/2,oe.node.x1=be+oe.visibleWidth/2,$(oe,j)}})}function X(ee,q,oe,ae){return function(){for(var Q=0,re=0;re0&&ae.forceLayouts[q].alpha(0)}}function $(ee,q){for(var oe=[],ae=[],j=0;j"),color:_(V,"bgcolor")||t.addOpacity(ae.color,1),borderColor:_(V,"bordercolor"),fontFamily:_(V,"font.family"),fontSize:_(V,"font.size"),fontColor:_(V,"font.color"),fontWeight:_(V,"font.weight"),fontStyle:_(V,"font.style"),fontVariant:_(V,"font.variant"),fontTextcase:_(V,"font.textcase"),fontLineposition:_(V,"font.lineposition"),fontShadow:_(V,"font.shadow"),nameLength:_(V,"namelength"),textAlign:_(V,"align"),idealAlign:v.event.x"),color:_(V,"bgcolor")||fe.tinyColorHue,borderColor:_(V,"bordercolor"),fontFamily:_(V,"font.family"),fontSize:_(V,"font.size"),fontColor:_(V,"font.color"),fontWeight:_(V,"font.weight"),fontStyle:_(V,"font.style"),fontVariant:_(V,"font.variant"),fontTextcase:_(V,"font.textcase"),fontLineposition:_(V,"font.lineposition"),fontShadow:_(V,"font.shadow"),nameLength:_(V,"namelength"),textAlign:_(V,"align"),idealAlign:"left",hovertemplate:V.hovertemplate,hovertemplateLabels:Q,eventData:[fe.node]},{container:g._hoverlayer.node(),outerContainer:g._paper.node(),gd:A});i(be,.85),s(be)}}},se=function(le,fe,V){A._fullLayout.hovermode!==!1&&(v.select(le).call(p,fe,V),fe.node.trace.node.hoverinfo!=="skip"&&(fe.node.fullData=fe.node.trace,A.emit("plotly_unhover",{event:v.event,points:[fe.node]})),e.loneUnhover(g._hoverlayer.node()))};E(A,b,M,{width:d.w,height:d.h,margin:{t:d.t,r:d.r,b:d.b,l:d.l}},{linkEvents:{hover:R,follow:P,unhover:U,select:f},nodeEvents:{hover:X,follow:$,unhover:se,select:B}})}}}),mG=Xe({"src/traces/sankey/base_plot.js"(Z){"use strict";var G=pc().overrideAll,v=Hh().getModuleCalcData,x=q6(),S=Zm(),E=Kd(),e=Ap(),t=Af().prepSelect,r=sa(),o=so(),a="sankey";Z.name=a,Z.baseLayoutAttrOverrides=G({hoverlabel:S.hoverlabel},"plot","nested"),Z.plot=function(i){var s=v(i.calcdata,a)[0];x(i,s),Z.updateFx(i)},Z.clean=function(i,s,h,c){var m=c._has&&c._has(a),p=s._has&&s._has(a);m&&!p&&(c._paperdiv.selectAll(".sankey").remove(),c._paperdiv.selectAll(".bgsankey").remove())},Z.updateFx=function(i){for(var s=0;s0}G.exports=function(F,N,O,P){var U=F._fullLayout,B;w(O)&&P&&(B=P()),E.makeTraceGroups(U._indicatorlayer,N,"trace").each(function(X){var $=X[0],se=$.trace,le=v.select(this),fe=se._hasGauge,V=se._isAngular,Y=se._isBullet,ee=se.domain,q={w:U._size.w*(ee.x[1]-ee.x[0]),h:U._size.h*(ee.y[1]-ee.y[0]),l:U._size.l+U._size.w*ee.x[0],r:U._size.r+U._size.w*(1-ee.x[1]),t:U._size.t+U._size.h*(1-ee.y[1]),b:U._size.b+U._size.h*ee.y[0]},oe=q.l+q.w/2,ae=q.t+q.h/2,j=Math.min(q.w/2,q.h),Q=n.innerRadius*j,re,ce,be,Ae=se.align||"center";if(ce=ae,!fe)re=q.l+l[Ae]*q.w,be=function(he){return y(he,q.w,q.h)};else if(V&&(re=oe,ce=ae+j/2,be=function(he){return f(he,.9*Q)}),Y){var De=n.bulletPadding,ze=1-n.bulletNumberDomainSize+De;re=q.l+(ze+(1-ze)*l[Ae])*q.w,be=function(he){return y(he,(n.bulletNumberDomainSize-De)*q.w,q.h)}}g(F,le,X,{numbersX:re,numbersY:ce,numbersScaler:be,transitionOpts:O,onComplete:B});var Ze,at;fe&&(Ze={range:se.gauge.axis.range,color:se.gauge.bgcolor,line:{color:se.gauge.bordercolor,width:0},thickness:1},at={range:se.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:se.gauge.bordercolor,width:se.gauge.borderwidth},thickness:1});var nt=le.selectAll("g.angular").data(V?X:[]);nt.exit().remove();var rt=le.selectAll("g.angularaxis").data(V?X:[]);rt.exit().remove(),V&&M(F,le,X,{radius:j,innerRadius:Q,gauge:nt,layer:rt,size:q,gaugeBg:Ze,gaugeOutline:at,transitionOpts:O,onComplete:B});var st=le.selectAll("g.bullet").data(Y?X:[]);st.exit().remove();var Me=le.selectAll("g.bulletaxis").data(Y?X:[]);Me.exit().remove(),Y&&A(F,le,X,{gauge:st,layer:Me,size:q,gaugeBg:Ze,gaugeOutline:at,transitionOpts:O,onComplete:B});var ye=le.selectAll("text.title").data(X);ye.exit().remove(),ye.enter().append("text").classed("title",!0),ye.attr("text-anchor",function(){return Y?T.right:T[se.title.align]}).text(se.title.text).call(a.font,se.title.font).call(i.convertToTspans,F),ye.attr("transform",function(){var he=q.l+q.w*l[se.title.align],Oe,tt=n.titlePadding,ot=a.bBox(ye.node());if(fe){if(V)if(se.gauge.axis.visible){var Qe=a.bBox(rt.node());Oe=Qe.top-tt-ot.bottom}else Oe=q.t+q.h/2-j/2-ot.bottom-tt;Y&&(Oe=ce-(ot.top+ot.bottom)/2,he=q.l-n.bulletPadding*q.w)}else Oe=se._numbersTop-tt-ot.bottom;return t(he,Oe)})})};function A(z,F,N,O){var P=N[0].trace,U=O.gauge,B=O.layer,X=O.gaugeBg,$=O.gaugeOutline,se=O.size,le=P.domain,fe=O.transitionOpts,V=O.onComplete,Y,ee,q,oe,ae;U.enter().append("g").classed("bullet",!0),U.attr("transform",t(se.l,se.t)),B.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),B.selectAll("g.xbulletaxistick,path,text").remove();var j=se.h,Q=P.gauge.bar.thickness*j,re=le.x[0],ce=le.x[0]+(le.x[1]-le.x[0])*(P._hasNumber||P._hasDelta?1-n.bulletNumberDomainSize:1);Y=u(z,P.gauge.axis),Y._id="xbulletaxis",Y.domain=[re,ce],Y.setScale(),ee=s.calcTicks(Y),q=s.makeTransTickFn(Y),oe=s.getTickSigns(Y)[2],ae=se.t+se.h,Y.visible&&(s.drawTicks(z,Y,{vals:Y.ticks==="inside"?s.clipEnds(Y,ee):ee,layer:B,path:s.makeTickPath(Y,ae,oe),transFn:q}),s.drawLabels(z,Y,{vals:ee,layer:B,transFn:q,labelFns:s.makeLabelFns(Y,ae)}));function be(rt){rt.attr("width",function(st){return Math.max(0,Y.c2p(st.range[1])-Y.c2p(st.range[0]))}).attr("x",function(st){return Y.c2p(st.range[0])}).attr("y",function(st){return .5*(1-st.thickness)*j}).attr("height",function(st){return st.thickness*j})}var Ae=[X].concat(P.gauge.steps),De=U.selectAll("g.bg-bullet").data(Ae);De.enter().append("g").classed("bg-bullet",!0).append("rect"),De.select("rect").call(be).call(b),De.exit().remove();var ze=U.selectAll("g.value-bullet").data([P.gauge.bar]);ze.enter().append("g").classed("value-bullet",!0).append("rect"),ze.select("rect").attr("height",Q).attr("y",(j-Q)/2).call(b),w(fe)?ze.select("rect").transition().duration(fe.duration).ease(fe.easing).each("end",function(){V&&V()}).each("interrupt",function(){V&&V()}).attr("width",Math.max(0,Y.c2p(Math.min(P.gauge.axis.range[1],N[0].y)))):ze.select("rect").attr("width",typeof N[0].y=="number"?Math.max(0,Y.c2p(Math.min(P.gauge.axis.range[1],N[0].y))):0),ze.exit().remove();var Ze=N.filter(function(){return P.gauge.threshold.value||P.gauge.threshold.value===0}),at=U.selectAll("g.threshold-bullet").data(Ze);at.enter().append("g").classed("threshold-bullet",!0).append("line"),at.select("line").attr("x1",Y.c2p(P.gauge.threshold.value)).attr("x2",Y.c2p(P.gauge.threshold.value)).attr("y1",(1-P.gauge.threshold.thickness)/2*j).attr("y2",(1-(1-P.gauge.threshold.thickness)/2)*j).call(p.stroke,P.gauge.threshold.line.color).style("stroke-width",P.gauge.threshold.line.width),at.exit().remove();var nt=U.selectAll("g.gauge-outline").data([$]);nt.enter().append("g").classed("gauge-outline",!0).append("rect"),nt.select("rect").call(be).call(b),nt.exit().remove()}function M(z,F,N,O){var P=N[0].trace,U=O.size,B=O.radius,X=O.innerRadius,$=O.gaugeBg,se=O.gaugeOutline,le=[U.l+U.w/2,U.t+U.h/2+B/2],fe=O.gauge,V=O.layer,Y=O.transitionOpts,ee=O.onComplete,q=Math.PI/2;function oe(Pt){var It=P.gauge.axis.range[0],qt=P.gauge.axis.range[1],Wt=(Pt-It)/(qt-It)*Math.PI-q;return Wt<-q?-q:Wt>q?q:Wt}function ae(Pt){return v.svg.arc().innerRadius((X+B)/2-Pt/2*(B-X)).outerRadius((X+B)/2+Pt/2*(B-X)).startAngle(-q)}function j(Pt){Pt.attr("d",function(It){return ae(It.thickness).startAngle(oe(It.range[0])).endAngle(oe(It.range[1]))()})}var Q,re,ce,be;fe.enter().append("g").classed("angular",!0),fe.attr("transform",t(le[0],le[1])),V.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),V.selectAll("g.xangularaxistick,path,text").remove(),Q=u(z,P.gauge.axis),Q.type="linear",Q.range=P.gauge.axis.range,Q._id="xangularaxis",Q.ticklabeloverflow="allow",Q.setScale();var Ae=function(Pt){return(Q.range[0]-Pt.x)/(Q.range[1]-Q.range[0])*Math.PI+Math.PI},De={},ze=s.makeLabelFns(Q,0),Ze=ze.labelStandoff;De.xFn=function(Pt){var It=Ae(Pt);return Math.cos(It)*Ze},De.yFn=function(Pt){var It=Ae(Pt),qt=Math.sin(It)>0?.2:1;return-Math.sin(It)*(Ze+Pt.fontSize*qt)+Math.abs(Math.cos(It))*(Pt.fontSize*o)},De.anchorFn=function(Pt){var It=Ae(Pt),qt=Math.cos(It);return Math.abs(qt)<.1?"middle":qt>0?"start":"end"},De.heightFn=function(Pt,It,qt){var Wt=Ae(Pt);return-.5*(1+Math.sin(Wt))*qt};var at=function(Pt){return t(le[0]+B*Math.cos(Pt),le[1]-B*Math.sin(Pt))};ce=function(Pt){return at(Ae(Pt))};var nt=function(Pt){var It=Ae(Pt);return at(It)+"rotate("+-r(It)+")"};if(re=s.calcTicks(Q),be=s.getTickSigns(Q)[2],Q.visible){be=Q.ticks==="inside"?-1:1;var rt=(Q.linewidth||1)/2;s.drawTicks(z,Q,{vals:re,layer:V,path:"M"+be*rt+",0h"+be*Q.ticklen,transFn:nt}),s.drawLabels(z,Q,{vals:re,layer:V,transFn:ce,labelFns:De})}var st=[$].concat(P.gauge.steps),Me=fe.selectAll("g.bg-arc").data(st);Me.enter().append("g").classed("bg-arc",!0).append("path"),Me.select("path").call(j).call(b),Me.exit().remove();var ye=ae(P.gauge.bar.thickness),he=fe.selectAll("g.value-arc").data([P.gauge.bar]);he.enter().append("g").classed("value-arc",!0).append("path");var Oe=he.select("path");w(Y)?(Oe.transition().duration(Y.duration).ease(Y.easing).each("end",function(){ee&&ee()}).each("interrupt",function(){ee&&ee()}).attrTween("d",d(ye,oe(N[0].lastY),oe(N[0].y))),P._lastValue=N[0].y):Oe.attr("d",typeof N[0].y=="number"?ye.endAngle(oe(N[0].y)):"M0,0Z"),Oe.call(b),he.exit().remove(),st=[];var tt=P.gauge.threshold.value;(tt||tt===0)&&st.push({range:[tt,tt],color:P.gauge.threshold.color,line:{color:P.gauge.threshold.line.color,width:P.gauge.threshold.line.width},thickness:P.gauge.threshold.thickness});var ot=fe.selectAll("g.threshold-arc").data(st);ot.enter().append("g").classed("threshold-arc",!0).append("path"),ot.select("path").call(j).call(b),ot.exit().remove();var Qe=fe.selectAll("g.gauge-outline").data([se]);Qe.enter().append("g").classed("gauge-outline",!0).append("path"),Qe.select("path").call(j).call(b),Qe.exit().remove()}function g(z,F,N,O){var P=N[0].trace,U=O.numbersX,B=O.numbersY,X=P.align||"center",$=T[X],se=O.transitionOpts,le=O.onComplete,fe=E.ensureSingle(F,"g","numbers"),V,Y,ee,q=[];P._hasNumber&&q.push("number"),P._hasDelta&&(q.push("delta"),P.delta.position==="left"&&q.reverse());var oe=fe.selectAll("text").data(q);oe.enter().append("text"),oe.attr("text-anchor",function(){return $}).attr("class",function(at){return at}).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),oe.exit().remove();function ae(at,nt,rt,st){if(at.match("s")&&rt>=0!=st>=0&&!nt(rt).slice(-1).match(_)&&!nt(st).slice(-1).match(_)){var Me=at.slice().replace("s","f").replace(/\d+/,function(he){return parseInt(he)-1}),ye=u(z,{tickformat:Me});return function(he){return Math.abs(he)<1?s.tickText(ye,he).text:nt(he)}}else return nt}function j(){var at=u(z,{tickformat:P.number.valueformat},P._range);at.setScale(),s.prepTicks(at);var nt=function(he){return s.tickText(at,he).text},rt=P.number.suffix,st=P.number.prefix,Me=fe.select("text.number");function ye(){var he=typeof N[0].y=="number"?st+nt(N[0].y)+rt:"-";Me.text(he).call(a.font,P.number.font).call(i.convertToTspans,z)}return w(se)?Me.transition().duration(se.duration).ease(se.easing).each("end",function(){ye(),le&&le()}).each("interrupt",function(){ye(),le&&le()}).attrTween("text",function(){var he=v.select(this),Oe=S(N[0].lastY,N[0].y);P._lastValue=N[0].y;var tt=ae(P.number.valueformat,nt,N[0].lastY,N[0].y);return function(ot){he.text(st+tt(Oe(ot))+rt)}}):ye(),V=R(st+nt(N[0].y)+rt,P.number.font,$,z),Me}function Q(){var at=u(z,{tickformat:P.delta.valueformat},P._range);at.setScale(),s.prepTicks(at);var nt=function(ot){return s.tickText(at,ot).text},rt=P.delta.suffix,st=P.delta.prefix,Me=function(ot){var Qe=P.delta.relative?ot.relativeDelta:ot.delta;return Qe},ye=function(ot,Qe){return ot===0||typeof ot!="number"||isNaN(ot)?"-":(ot>0?P.delta.increasing.symbol:P.delta.decreasing.symbol)+st+Qe(ot)+rt},he=function(ot){return ot.delta>=0?P.delta.increasing.color:P.delta.decreasing.color};P._deltaLastValue===void 0&&(P._deltaLastValue=Me(N[0]));var Oe=fe.select("text.delta");Oe.call(a.font,P.delta.font).call(p.fill,he({delta:P._deltaLastValue}));function tt(){Oe.text(ye(Me(N[0]),nt)).call(p.fill,he(N[0])).call(i.convertToTspans,z)}return w(se)?Oe.transition().duration(se.duration).ease(se.easing).tween("text",function(){var ot=v.select(this),Qe=Me(N[0]),Pt=P._deltaLastValue,It=ae(P.delta.valueformat,nt,Pt,Qe),qt=S(Pt,Qe);return P._deltaLastValue=Qe,function(Wt){ot.text(ye(qt(Wt),It)),ot.call(p.fill,he({delta:qt(Wt)}))}}).each("end",function(){tt(),le&&le()}).each("interrupt",function(){tt(),le&&le()}):tt(),Y=R(ye(Me(N[0]),nt),P.delta.font,$,z),Oe}var re=P.mode+P.align,ce;if(P._hasDelta&&(ce=Q(),re+=P.delta.position+P.delta.font.size+P.delta.font.family+P.delta.valueformat,re+=P.delta.increasing.symbol+P.delta.decreasing.symbol,ee=Y),P._hasNumber&&(j(),re+=P.number.font.size+P.number.font.family+P.number.valueformat+P.number.suffix+P.number.prefix,ee=V),P._hasDelta&&P._hasNumber){var be=[(V.left+V.right)/2,(V.top+V.bottom)/2],Ae=[(Y.left+Y.right)/2,(Y.top+Y.bottom)/2],De,ze,Ze=.75*P.delta.font.size;P.delta.position==="left"&&(De=L(P,"deltaPos",0,-1*(V.width*l[P.align]+Y.width*(1-l[P.align])+Ze),re,Math.min),ze=be[1]-Ae[1],ee={width:V.width+Y.width+Ze,height:Math.max(V.height,Y.height),left:Y.left+De,right:V.right,top:Math.min(V.top,Y.top+ze),bottom:Math.max(V.bottom,Y.bottom+ze)}),P.delta.position==="right"&&(De=L(P,"deltaPos",0,V.width*(1-l[P.align])+Y.width*l[P.align]+Ze,re,Math.max),ze=be[1]-Ae[1],ee={width:V.width+Y.width+Ze,height:Math.max(V.height,Y.height),left:V.left,right:Y.right+De,top:Math.min(V.top,Y.top+ze),bottom:Math.max(V.bottom,Y.bottom+ze)}),P.delta.position==="bottom"&&(De=null,ze=Y.height,ee={width:Math.max(V.width,Y.width),height:V.height+Y.height,left:Math.min(V.left,Y.left),right:Math.max(V.right,Y.right),top:V.bottom-V.height,bottom:V.bottom+Y.height}),P.delta.position==="top"&&(De=null,ze=V.top,ee={width:Math.max(V.width,Y.width),height:V.height+Y.height,left:Math.min(V.left,Y.left),right:Math.max(V.right,Y.right),top:V.bottom-V.height-Y.height,bottom:V.bottom}),ce.attr({dx:De,dy:ze})}(P._hasNumber||P._hasDelta)&&fe.attr("transform",function(){var at=O.numbersScaler(ee);re+=at[2];var nt=L(P,"numbersScale",1,at[0],re,Math.min),rt;P._scaleNumbers||(nt=1),P._isAngular?rt=B-nt*ee.bottom:rt=B-nt*(ee.top+ee.bottom)/2,P._numbersTop=nt*ee.top+rt;var st=ee[X];X==="center"&&(st=(ee.left+ee.right)/2);var Me=U-nt*st;return Me=L(P,"numbersTranslate",0,Me,re,Math.max),t(Me,rt)+e(nt)})}function b(z){z.each(function(F){p.stroke(v.select(this),F.line.color)}).each(function(F){p.fill(v.select(this),F.color)}).style("stroke-width",function(F){return F.line.width})}function d(z,F,N){return function(){var O=x(F,N);return function(P){return z.endAngle(O(P))()}}}function u(z,F,N){var O=z._fullLayout,P=E.extendFlat({type:"linear",ticks:"outside",range:N,showline:!0},F),U={type:"linear",_id:"x"+F._id},B={letter:"x",font:O.font,noAutotickangles:!0,noHover:!0,noTickson:!0};function X($,se){return E.coerce(P,U,m,$,se)}return h(P,U,X,B,O),c(P,U,X,B),U}function y(z,F,N){var O=Math.min(F/z.width,N/z.height);return[O,z,F+"x"+N]}function f(z,F){var N=Math.sqrt(z.width/2*(z.width/2)+z.height*z.height),O=F/N;return[O,z,F]}function R(z,F,N,O){var P=document.createElementNS("http://www.w3.org/2000/svg","text"),U=v.select(P);return U.text(z).attr("x",0).attr("y",0).attr("text-anchor",N).attr("data-unformatted",z).call(i.convertToTspans,O).call(a.font,F),a.bBox(U.node())}function L(z,F,N,O,P,U){var B="_cache"+F;z[B]&&z[B].key===P||(z[B]={key:P,value:N});var X=E.aggNums(U,null,[z[B].value,O],2);return z[B].value=X,X}}}),AG=Xe({"src/traces/indicator/index.js"(Z,G){"use strict";G.exports={moduleType:"trace",name:"indicator",basePlotModule:xG(),categories:["svg","noOpacity","noHover"],animatable:!0,attributes:V6(),supplyDefaults:bG().supplyDefaults,calc:wG().calc,plot:TG(),meta:{}}}}),SG=Xe({"lib/indicator.js"(Z,G){"use strict";G.exports=AG()}}),H6=Xe({"src/traces/table/attributes.js"(Z,G){"use strict";var v=$0(),x=Qo().extendFlat,S=pc().overrideAll,E=tc(),e=wc().attributes,t=tf().descriptionOnlyNumbers,r=G.exports=S({domain:e({name:"table",trace:!0}),columnwidth:{valType:"number",arrayOk:!0,dflt:null},columnorder:{valType:"data_array"},header:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:t("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:28},align:x({},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:x({},E({arrayOk:!0}))},cells:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:t("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:20},align:x({},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:x({},E({arrayOk:!0}))}},"calc","from-root")}}),MG=Xe({"src/traces/table/defaults.js"(Z,G){"use strict";var v=sa(),x=H6(),S=wc().defaults;function E(e,t){for(var r=e.columnorder||[],o=e.header.values.length,a=r.slice(0,o),n=a.slice().sort(function(h,c){return h-c}),i=a.map(function(h){return n.indexOf(h)}),s=i.length;s",maxDimensionCount:60,overdrag:45,releaseTransitionDuration:120,releaseTransitionEase:"cubic-out",scrollbarCaptureWidth:18,scrollbarHideDelay:1e3,scrollbarHideDuration:1e3,scrollbarOffset:5,scrollbarWidth:8,transitionDuration:100,transitionEase:"cubic-out",uplift:5,wrapSpacer:" ",wrapSplitCharacter:" ",cn:{table:"table",tableControlView:"table-control-view",scrollBackground:"scroll-background",yColumn:"y-column",columnBlock:"column-block",scrollAreaClip:"scroll-area-clip",scrollAreaClipRect:"scroll-area-clip-rect",columnBoundary:"column-boundary",columnBoundaryClippath:"column-boundary-clippath",columnBoundaryRect:"column-boundary-rect",columnCells:"column-cells",columnCell:"column-cell",cellRect:"cell-rect",cellText:"cell-text",cellTextHolder:"cell-text-holder",scrollbarKit:"scrollbar-kit",scrollbar:"scrollbar",scrollbarSlider:"scrollbar-slider",scrollbarGlyph:"scrollbar-glyph",scrollbarCaptureZone:"scrollbar-capture-zone"}}}}),kG=Xe({"src/traces/table/data_preparation_helper.js"(Z,G){"use strict";var v=W6(),x=Qo().extendFlat,S=rs(),E=bp().isTypedArray,e=bp().isArrayOrTypedArray;G.exports=function(m,p){var T=o(p.cells.values),l=function($){return $.slice(p.header.values.length,$.length)},_=o(p.header.values);_.length&&!_[0].length&&(_[0]=[""],_=o(_));var w=_.concat(l(T).map(function(){return a((_[0]||[""]).length)})),A=p.domain,M=Math.floor(m._fullLayout._size.w*(A.x[1]-A.x[0])),g=Math.floor(m._fullLayout._size.h*(A.y[1]-A.y[0])),b=p.header.values.length?w[0].map(function(){return p.header.height}):[v.emptyHeaderHeight],d=T.length?T[0].map(function(){return p.cells.height}):[],u=b.reduce(r,0),y=g-u,f=y+v.uplift,R=s(d,f),L=s(b,u),z=i(L,[]),F=i(R,z),N={},O=p._fullInput.columnorder;e(O)&&(O=Array.from(O)),O=O.concat(l(T.map(function($,se){return se})));var P=w.map(function($,se){var le=e(p.columnwidth)?p.columnwidth[Math.min(se,p.columnwidth.length-1)]:p.columnwidth;return S(le)?Number(le):1}),U=P.reduce(r,0);P=P.map(function($){return $/U*M});var B=Math.max(t(p.header.line.width),t(p.cells.line.width)),X={key:p.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:M,maxLineWidth:B,height:g,columnOrder:O,groupHeight:g,rowBlocks:F,headerRowBlocks:z,scrollY:0,cells:x({},p.cells,{values:T}),headerCells:x({},p.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($,se){var le=N[$];N[$]=(le||0)+1;var fe=$+"__"+N[$];return{key:fe,label:$,specIndex:se,xIndex:O[se],xScale:n,x:void 0,calcdata:void 0,columnWidth:P[se]}})};return X.columns.forEach(function($){$.calcdata=X,$.x=n($)}),X};function t(c){if(e(c)){for(var m=0,p=0;p=m||g===c.length-1)&&(p[l]=w,w.key=M++,w.firstRowIndex=A,w.lastRowIndex=g,w=h(),l+=_,A=g+1,_=0);return p}function h(){return{firstRowIndex:null,lastRowIndex:null,rows:[]}}}}),CG=Xe({"src/traces/table/data_split_helpers.js"(Z){"use strict";var G=Qo().extendFlat;Z.splitToPanels=function(x){var S=[0,0],E=G({},x,{key:"header",type:"header",page:0,prevPages:S,currentRepaint:[null,null],dragHandle:!0,values:x.calcdata.headerCells.values[x.specIndex],rowBlocks:x.calcdata.headerRowBlocks,calcdata:G({},x.calcdata,{cells:x.calcdata.headerCells})}),e=G({},x,{key:"cells1",type:"cells",page:0,prevPages:S,currentRepaint:[null,null],dragHandle:!1,values:x.calcdata.cells.values[x.specIndex],rowBlocks:x.calcdata.rowBlocks}),t=G({},x,{key:"cells2",type:"cells",page:1,prevPages:S,currentRepaint:[null,null],dragHandle:!1,values:x.calcdata.cells.values[x.specIndex],rowBlocks:x.calcdata.rowBlocks});return[e,t,E]},Z.splitToCells=function(x){var S=v(x);return(x.values||[]).slice(S[0],S[1]).map(function(E,e){var t=typeof E=="string"&&E.match(/[<$&> ]/)?"_keybuster_"+Math.random():"";return{keyWithinBlock:e+t,key:S[0]+e,column:x,calcdata:x.calcdata,page:x.page,rowBlocks:x.rowBlocks,value:E}})};function v(x){var S=x.rowBlocks[x.page],E=S?S.rows[0].rowIndex:0,e=S?E+S.rows.length:0;return[E,e]}}}),X6=Xe({"src/traces/table/plot.js"(Z,G){"use strict";var v=W6(),x=Hn(),S=sa(),E=S.numberFormat,e=kv(),t=es(),r=ou(),o=sa().raiseToTop,a=sa().strTranslate,n=sa().cancelTransition,i=kG(),s=CG(),h=$n();G.exports=function(re,ce){var be=!re._context.staticPlot,Ae=re._fullLayout._paper.selectAll("."+v.cn.table).data(ce.map(function(Qe){var Pt=e.unwrap(Qe),It=Pt.trace;return i(re,It)}),e.keyFun);Ae.exit().remove(),Ae.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"),Ae.attr("width",function(Qe){return Qe.width+Qe.size.l+Qe.size.r}).attr("height",function(Qe){return Qe.height+Qe.size.t+Qe.size.b}).attr("transform",function(Qe){return a(Qe.translateX,Qe.translateY)});var De=Ae.selectAll("."+v.cn.tableControlView).data(e.repeat,e.keyFun),ze=De.enter().append("g").classed(v.cn.tableControlView,!0).style("box-sizing","content-box");if(be){var Ze="onwheel"in document?"wheel":"mousewheel";ze.on("mousemove",function(Qe){De.filter(function(Pt){return Qe===Pt}).call(l,re)}).on(Ze,function(Qe){if(!Qe.scrollbarState.wheeling){Qe.scrollbarState.wheeling=!0;var Pt=Qe.scrollY+x.event.deltaY,It=$(re,De,null,Pt)(Qe);It||(x.event.stopPropagation(),x.event.preventDefault()),Qe.scrollbarState.wheeling=!1}}).call(l,re,!0)}De.attr("transform",function(Qe){return a(Qe.size.l,Qe.size.t)});var at=De.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(Qe){return Qe.width}).attr("height",function(Qe){return Qe.height}),De.each(function(Qe){t.setClipUrl(x.select(this),m(re,Qe),re)});var nt=De.selectAll("."+v.cn.yColumn).data(function(Qe){return Qe.columns},e.keyFun);nt.enter().append("g").classed(v.cn.yColumn,!0),nt.exit().remove(),nt.attr("transform",function(Qe){return a(Qe.x,0)}),be&&nt.call(x.behavior.drag().origin(function(Qe){var Pt=x.select(this);return N(Pt,Qe,-v.uplift),o(this),Qe.calcdata.columnDragInProgress=!0,l(De.filter(function(It){return Qe.calcdata.key===It.key}),re),Qe}).on("drag",function(Qe){var Pt=x.select(this),It=function(kr){return(Qe===kr?x.event.x:kr.x)+kr.columnWidth/2};Qe.x=Math.max(-v.overdrag,Math.min(Qe.calcdata.width+v.overdrag-Qe.columnWidth,x.event.x));var qt=T(nt).filter(function(kr){return kr.calcdata.key===Qe.calcdata.key}),Wt=qt.sort(function(kr,mr){return It(kr)-It(mr)});Wt.forEach(function(kr,mr){kr.xIndex=mr,kr.x=Qe===kr?kr.x:kr.xScale(kr)}),nt.filter(function(kr){return Qe!==kr}).transition().ease(v.transitionEase).duration(v.transitionDuration).attr("transform",function(kr){return a(kr.x,0)}),Pt.call(n).attr("transform",a(Qe.x,-v.uplift))}).on("dragend",function(Qe){var Pt=x.select(this),It=Qe.calcdata;Qe.x=Qe.xScale(Qe),Qe.calcdata.columnDragInProgress=!1,N(Pt,Qe,0),z(re,It,It.columns.map(function(qt){return qt.xIndex}))})),nt.each(function(Qe){t.setClipUrl(x.select(this),p(re,Qe),re)});var rt=nt.selectAll("."+v.cn.columnBlock).data(s.splitToPanels,e.keyFun);rt.enter().append("g").classed(v.cn.columnBlock,!0).attr("id",function(Qe){return Qe.key}),rt.style("cursor",function(Qe){return Qe.dragHandle?"ew-resize":Qe.calcdata.scrollbarState.barWiggleRoom?"ns-resize":"default"});var st=rt.filter(P),Me=rt.filter(O);be&&Me.call(x.behavior.drag().origin(function(Qe){return x.event.stopPropagation(),Qe}).on("drag",$(re,De,-1)).on("dragend",function(){})),_(re,De,st,rt),_(re,De,Me,rt);var ye=De.selectAll("."+v.cn.scrollAreaClip).data(e.repeat,e.keyFun);ye.enter().append("clipPath").classed(v.cn.scrollAreaClip,!0).attr("id",function(Qe){return m(re,Qe)});var he=ye.selectAll("."+v.cn.scrollAreaClipRect).data(e.repeat,e.keyFun);he.enter().append("rect").classed(v.cn.scrollAreaClipRect,!0).attr("x",-v.overdrag).attr("y",-v.uplift).attr("fill","none"),he.attr("width",function(Qe){return Qe.width+2*v.overdrag}).attr("height",function(Qe){return Qe.height+v.uplift});var Oe=nt.selectAll("."+v.cn.columnBoundary).data(e.repeat,e.keyFun);Oe.enter().append("g").classed(v.cn.columnBoundary,!0);var tt=nt.selectAll("."+v.cn.columnBoundaryClippath).data(e.repeat,e.keyFun);tt.enter().append("clipPath").classed(v.cn.columnBoundaryClippath,!0),tt.attr("id",function(Qe){return p(re,Qe)});var ot=tt.selectAll("."+v.cn.columnBoundaryRect).data(e.repeat,e.keyFun);ot.enter().append("rect").classed(v.cn.columnBoundaryRect,!0).attr("fill","none"),ot.attr("width",function(Qe){return Qe.columnWidth+2*c(Qe)}).attr("height",function(Qe){return Qe.calcdata.height+2*c(Qe)+v.uplift}).attr("x",function(Qe){return-c(Qe)}).attr("y",function(Qe){return-c(Qe)}),X(null,Me,De)};function c(Q){return Math.ceil(Q.calcdata.maxLineWidth/2)}function m(Q,re){return"clip"+Q._fullLayout._uid+"_scrollAreaBottomClip_"+re.key}function p(Q,re){return"clip"+Q._fullLayout._uid+"_columnBoundaryClippath_"+re.calcdata.key+"_"+re.specIndex}function T(Q){return[].concat.apply([],Q.map(function(re){return re})).map(function(re){return re.__data__})}function l(Q,re,ce){function be(nt){var rt=nt.rowBlocks;return ee(rt,rt.length-1)+(rt.length?q(rt[rt.length-1],1/0):1)}var Ae=Q.selectAll("."+v.cn.scrollbarKit).data(e.repeat,e.keyFun);Ae.enter().append("g").classed(v.cn.scrollbarKit,!0).style("shape-rendering","geometricPrecision"),Ae.each(function(nt){var rt=nt.scrollbarState;rt.totalHeight=be(nt),rt.scrollableAreaHeight=nt.groupHeight-U(nt),rt.currentlyVisibleHeight=Math.min(rt.totalHeight,rt.scrollableAreaHeight),rt.ratio=rt.currentlyVisibleHeight/rt.totalHeight,rt.barLength=Math.max(rt.ratio*rt.currentlyVisibleHeight,v.goldenRatio*v.scrollbarWidth),rt.barWiggleRoom=rt.currentlyVisibleHeight-rt.barLength,rt.wiggleRoom=Math.max(0,rt.totalHeight-rt.scrollableAreaHeight),rt.topY=rt.barWiggleRoom===0?0:nt.scrollY/rt.wiggleRoom*rt.barWiggleRoom,rt.bottomY=rt.topY+rt.barLength,rt.dragMultiplier=rt.wiggleRoom/rt.barWiggleRoom}).attr("transform",function(nt){var rt=nt.width+v.scrollbarWidth/2+v.scrollbarOffset;return a(rt,U(nt))});var De=Ae.selectAll("."+v.cn.scrollbar).data(e.repeat,e.keyFun);De.enter().append("g").classed(v.cn.scrollbar,!0);var ze=De.selectAll("."+v.cn.scrollbarSlider).data(e.repeat,e.keyFun);ze.enter().append("g").classed(v.cn.scrollbarSlider,!0),ze.attr("transform",function(nt){return a(0,nt.scrollbarState.topY||0)});var Ze=ze.selectAll("."+v.cn.scrollbarGlyph).data(e.repeat,e.keyFun);Ze.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),Ze.attr("y2",function(nt){return nt.scrollbarState.barLength-v.scrollbarWidth/2}).attr("stroke-opacity",function(nt){return nt.columnDragInProgress||!nt.scrollbarState.barWiggleRoom||ce?0:.4}),Ze.transition().delay(0).duration(0),Ze.transition().delay(v.scrollbarHideDelay).duration(v.scrollbarHideDuration).attr("stroke-opacity",0);var at=De.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 rt=x.event.y,st=this.getBoundingClientRect(),Me=nt.scrollbarState,ye=rt-st.top,he=x.scale.linear().domain([0,Me.scrollableAreaHeight]).range([0,Me.totalHeight]).clamp(!0);Me.topY<=ye&&ye<=Me.bottomY||$(re,Q,null,he(ye-Me.barLength/2))(nt)}).call(x.behavior.drag().origin(function(nt){return x.event.stopPropagation(),nt.scrollbarState.scrollbarScrollInProgress=!0,nt}).on("drag",$(re,Q)).on("dragend",function(){})),at.attr("y2",function(nt){return nt.scrollbarState.scrollableAreaHeight}),re._context.staticPlot&&(Ze.remove(),at.remove())}function _(Q,re,ce,be){var Ae=w(ce),De=A(Ae);d(De);var ze=M(De);y(ze);var Ze=b(De),at=g(Ze);u(at),f(at,re,be,Q),Y(De)}function w(Q){var re=Q.selectAll("."+v.cn.columnCells).data(e.repeat,e.keyFun);return re.enter().append("g").classed(v.cn.columnCells,!0),re.exit().remove(),re}function A(Q){var re=Q.selectAll("."+v.cn.columnCell).data(s.splitToCells,function(ce){return ce.keyWithinBlock});return re.enter().append("g").classed(v.cn.columnCell,!0),re.exit().remove(),re}function M(Q){var re=Q.selectAll("."+v.cn.cellRect).data(e.repeat,function(ce){return ce.keyWithinBlock});return re.enter().append("rect").classed(v.cn.cellRect,!0),re}function g(Q){var re=Q.selectAll("."+v.cn.cellText).data(e.repeat,function(ce){return ce.keyWithinBlock});return re.enter().append("text").classed(v.cn.cellText,!0).style("cursor",function(){return"auto"}).on("mousedown",function(){x.event.stopPropagation()}),re}function b(Q){var re=Q.selectAll("."+v.cn.cellTextHolder).data(e.repeat,function(ce){return ce.keyWithinBlock});return re.enter().append("g").classed(v.cn.cellTextHolder,!0).style("shape-rendering","geometricPrecision"),re}function d(Q){Q.each(function(re,ce){var be=re.calcdata.cells.font,Ae=re.column.specIndex,De={size:F(be.size,Ae,ce),color:F(be.color,Ae,ce),family:F(be.family,Ae,ce),weight:F(be.weight,Ae,ce),style:F(be.style,Ae,ce),variant:F(be.variant,Ae,ce),textcase:F(be.textcase,Ae,ce),lineposition:F(be.lineposition,Ae,ce),shadow:F(be.shadow,Ae,ce)};re.rowNumber=re.key,re.align=F(re.calcdata.cells.align,Ae,ce),re.cellBorderWidth=F(re.calcdata.cells.line.width,Ae,ce),re.font=De})}function u(Q){Q.each(function(re){t.font(x.select(this),re.font)})}function y(Q){Q.attr("width",function(re){return re.column.columnWidth}).attr("stroke-width",function(re){return re.cellBorderWidth}).each(function(re){var ce=x.select(this);h.stroke(ce,F(re.calcdata.cells.line.color,re.column.specIndex,re.rowNumber)),h.fill(ce,F(re.calcdata.cells.fill.color,re.column.specIndex,re.rowNumber))})}function f(Q,re,ce,be){Q.text(function(Ae){var De=Ae.column.specIndex,ze=Ae.rowNumber,Ze=Ae.value,at=typeof Ze=="string",nt=at&&Ze.match(/
/i),rt=!at||nt;Ae.mayHaveMarkup=at&&Ze.match(/[<&>]/);var st=R(Ze);Ae.latex=st;var Me=st?"":F(Ae.calcdata.cells.prefix,De,ze)||"",ye=st?"":F(Ae.calcdata.cells.suffix,De,ze)||"",he=st?null:F(Ae.calcdata.cells.format,De,ze)||null,Oe=Me+(he?E(he)(Ae.value):Ae.value)+ye,tt;Ae.wrappingNeeded=!Ae.wrapped&&!rt&&!st&&(tt=L(Oe)),Ae.cellHeightMayIncrease=nt||st||Ae.mayHaveMarkup||(tt===void 0?L(Oe):tt),Ae.needsConvertToTspans=Ae.mayHaveMarkup||Ae.wrappingNeeded||Ae.latex;var ot;if(Ae.wrappingNeeded){var Qe=v.wrapSplitCharacter===" "?Oe.replace(/Ae&&be.push(De),Ae+=at}return be}function X(Q,re,ce){var be=T(re)[0];if(be!==void 0){var Ae=be.rowBlocks,De=be.calcdata,ze=ee(Ae,Ae.length),Ze=be.calcdata.groupHeight-U(be),at=De.scrollY=Math.max(0,Math.min(ze-Ze,De.scrollY)),nt=B(Ae,at,Ze);nt.length===1&&(nt[0]===Ae.length-1?nt.unshift(nt[0]-1):nt.push(nt[0]+1)),nt[0]%2&&nt.reverse(),re.each(function(rt,st){rt.page=nt[st],rt.scrollY=at}),re.attr("transform",function(rt){var st=ee(rt.rowBlocks,rt.page)-rt.scrollY;return a(0,st)}),Q&&(se(Q,ce,re,nt,be.prevPages,be,0),se(Q,ce,re,nt,be.prevPages,be,1),l(ce,Q))}}function $(Q,re,ce,be){return function(De){var ze=De.calcdata?De.calcdata:De,Ze=re.filter(function(st){return ze.key===st.key}),at=ce||ze.scrollbarState.dragMultiplier,nt=ze.scrollY;ze.scrollY=be===void 0?ze.scrollY+at*x.event.dy:be;var rt=Ze.selectAll("."+v.cn.yColumn).selectAll("."+v.cn.columnBlock).filter(O);return X(Q,rt,Ze),ze.scrollY===nt}}function se(Q,re,ce,be,Ae,De,ze){var Ze=be[ze]!==Ae[ze];Ze&&(clearTimeout(De.currentRepaint[ze]),De.currentRepaint[ze]=setTimeout(function(){var at=ce.filter(function(nt,rt){return rt===ze&&be[rt]!==Ae[rt]});_(Q,re,at,ce),Ae[ze]=be[ze]}))}function le(Q,re,ce,be){return function(){var De=x.select(re.parentNode);De.each(function(ze){var Ze=ze.fragments;De.selectAll("tspan.line").each(function(Oe,tt){Ze[tt].width=this.getComputedTextLength()});var at=Ze[Ze.length-1].width,nt=Ze.slice(0,-1),rt=[],st,Me,ye=0,he=ze.column.columnWidth-2*v.cellPad;for(ze.value="";nt.length;)st=nt.shift(),Me=st.width+at,ye+Me>he&&(ze.value+=rt.join(v.wrapSpacer)+v.lineBreaker,rt=[],ye=0),rt.push(st.text),ye+=Me;ye&&(ze.value+=rt.join(v.wrapSpacer)),ze.wrapped=!0}),De.selectAll("tspan.line").remove(),f(De.select("."+v.cn.cellText),ce,Q,be),x.select(re.parentNode.parentNode).call(Y)}}function fe(Q,re,ce,be,Ae){return function(){if(!Ae.settledY){var ze=x.select(re.parentNode),Ze=ae(Ae),at=Ae.key-Ze.firstRowIndex,nt=Ze.rows[at].rowHeight,rt=Ae.cellHeightMayIncrease?re.parentNode.getBoundingClientRect().height+2*v.cellPad:nt,st=Math.max(rt,nt),Me=st-Ze.rows[at].rowHeight;Me&&(Ze.rows[at].rowHeight=st,Q.selectAll("."+v.cn.columnCell).call(Y),X(null,Q.filter(O),0),l(ce,be,!0)),ze.attr("transform",function(){var ye=this,he=ye.parentNode,Oe=he.getBoundingClientRect(),tt=x.select(ye.parentNode).select("."+v.cn.cellRect).node().getBoundingClientRect(),ot=ye.transform.baseVal.consolidate(),Qe=tt.top-Oe.top+(ot?ot.matrix.f:v.cellPad);return a(V(Ae,x.select(ye.parentNode).select("."+v.cn.cellTextHolder).node().getBoundingClientRect().width),Qe)}),Ae.settledY=!0}}}function V(Q,re){switch(Q.align){case"left":return v.cellPad;case"right":return Q.column.columnWidth-(re||0)-v.cellPad;case"center":return(Q.column.columnWidth-(re||0))/2;default:return v.cellPad}}function Y(Q){Q.attr("transform",function(re){var ce=re.rowBlocks[0].auxiliaryBlocks.reduce(function(ze,Ze){return ze+q(Ze,1/0)},0),be=ae(re),Ae=q(be,re.key),De=Ae+ce;return a(0,De)}).selectAll("."+v.cn.cellRect).attr("height",function(re){return j(ae(re),re.key).rowHeight})}function ee(Q,re){for(var ce=0,be=re-1;be>=0;be--)ce+=oe(Q[be]);return ce}function q(Q,re){for(var ce=0,be=0;beE.length&&(S=S.slice(0,E.length)):S=[],t=0;t90&&(m-=180,n=-n),{angle:m,flip:n,p:x.c2p(e,S,E),offsetMultplier:i}}}}),NG=Xe({"src/traces/carpet/plot.js"(Z,G){"use strict";var v=Hn(),x=es(),S=Z6(),E=Y6(),e=BG(),t=ou(),r=sa(),o=r.strRotate,a=r.strTranslate,n=uh();G.exports=function(_,w,A,M){var g=_._context.staticPlot,b=w.xaxis,d=w.yaxis,u=_._fullLayout,y=u._clips;r.makeTraceGroups(M,A,"trace").each(function(f){var R=v.select(this),L=f[0],z=L.trace,F=z.aaxis,N=z.baxis,O=r.ensureSingle(R,"g","minorlayer"),P=r.ensureSingle(R,"g","majorlayer"),U=r.ensureSingle(R,"g","boundarylayer"),B=r.ensureSingle(R,"g","labellayer");R.style("opacity",z.opacity),s(b,d,P,F,"a",F._gridlines,!0,g),s(b,d,P,N,"b",N._gridlines,!0,g),s(b,d,O,F,"a",F._minorgridlines,!0,g),s(b,d,O,N,"b",N._minorgridlines,!0,g),s(b,d,U,F,"a-boundary",F._boundarylines,g),s(b,d,U,N,"b-boundary",N._boundarylines,g);var X=h(_,b,d,z,L,B,F._labels,"a-label"),$=h(_,b,d,z,L,B,N._labels,"b-label");c(_,B,z,L,b,d,X,$),i(z,L,y,b,d)})};function i(l,_,w,A,M){var g,b,d,u,y=w.select("#"+l._clipPathId);y.size()||(y=w.append("clipPath").classed("carpetclip",!0));var f=r.ensureSingle(y,"path","carpetboundary"),R=_.clipsegments,L=[];for(u=0;u0?"start":"end","data-notex":1}).call(x.font,R.font).text(R.text).call(t.convertToTspans,l),P=x.bBox(this);O.attr("transform",a(z.p[0],z.p[1])+o(z.angle)+a(R.axis.labelpadding*N,P.height*.3)),y=Math.max(y,P.width+R.axis.labelpadding)}),u.exit().remove(),f.maxExtent=y,f}function c(l,_,w,A,M,g,b,d){var u,y,f,R,L=r.aggNums(Math.min,null,w.a),z=r.aggNums(Math.max,null,w.a),F=r.aggNums(Math.min,null,w.b),N=r.aggNums(Math.max,null,w.b);u=.5*(L+z),y=F,f=w.ab2xy(u,y,!0),R=w.dxyda_rough(u,y),b.angle===void 0&&r.extendFlat(b,e(w,M,g,f,w.dxydb_rough(u,y))),T(l,_,w,A,f,R,w.aaxis,M,g,b,"a-title"),u=L,y=.5*(F+N),f=w.ab2xy(u,y,!0),R=w.dxydb_rough(u,y),d.angle===void 0&&r.extendFlat(d,e(w,M,g,f,w.dxyda_rough(u,y))),T(l,_,w,A,f,R,w.baxis,M,g,d,"b-title")}var m=n.LINE_SPACING,p=(1-n.MID_SHIFT)/m+1;function T(l,_,w,A,M,g,b,d,u,y,f){var R=[];b.title.text&&R.push(b.title.text);var L=_.selectAll("text."+f).data(R),z=y.maxExtent;L.enter().append("text").classed(f,!0),L.each(function(){var F=e(w,d,u,M,g);["start","both"].indexOf(b.showticklabels)===-1&&(z=0);var N=b.title.font.size;z+=N+b.title.offset;var O=y.angle+(y.flip<0?180:0),P=(O-F.angle+450)%360,U=P>90&&P<270,B=v.select(this);B.text(b.title.text).call(t.convertToTspans,l),U&&(z=(-t.lineCount(B)+p)*m*N-z),B.attr("transform",a(F.p[0],F.p[1])+o(F.angle)+a(0,z)).attr("text-anchor","middle").call(x.font,b.title.font)}),L.exit().remove()}}}),UG=Xe({"src/traces/carpet/cheater_basis.js"(Z,G){"use strict";var v=sa().isArrayOrTypedArray;G.exports=function(x,S,E){var e,t,r,o,a,n,i=[],s=v(x)?x.length:x,h=v(S)?S.length:S,c=v(x)?x:null,m=v(S)?S:null;c&&(r=(c.length-1)/(c[c.length-1]-c[0])/(s-1)),m&&(o=(m.length-1)/(m[m.length-1]-m[0])/(h-1));var p,T=1/0,l=-1/0;for(t=0;t=10)return null;for(var e=1/0,t=-1/0,r=S.length,o=0;o0&&(q=E.dxydi([],X-1,se,0,le),Q.push(fe[0]+q[0]/3),re.push(fe[1]+q[1]/3),oe=E.dxydi([],X-1,se,1,le),Q.push(ee[0]-oe[0]/3),re.push(ee[1]-oe[1]/3)),Q.push(ee[0]),re.push(ee[1]),fe=ee;else for(X=E.a2i(B),V=Math.floor(Math.max(0,Math.min(F-2,X))),Y=X-V,ce.length=F,ce.crossLength=N,ce.xy=function(be){return E.evalxy([],X,be)},ce.dxy=function(be,Ae){return E.dxydj([],V,be,Y,Ae)},$=0;$0&&(ae=E.dxydj([],V,$-1,Y,0),Q.push(fe[0]+ae[0]/3),re.push(fe[1]+ae[1]/3),j=E.dxydj([],V,$-1,Y,1),Q.push(ee[0]-j[0]/3),re.push(ee[1]-j[1]/3)),Q.push(ee[0]),re.push(ee[1]),fe=ee;return ce.axisLetter=e,ce.axis=M,ce.crossAxis=y,ce.value=B,ce.constvar=t,ce.index=c,ce.x=Q,ce.y=re,ce.smoothing=y.smoothing,ce}function U(B){var X,$,se,le,fe,V=[],Y=[],ee={};if(ee.length=A.length,ee.crossLength=u.length,e==="b")for(se=Math.max(0,Math.min(N-2,B)),fe=Math.min(1,Math.max(0,B-se)),ee.xy=function(q){return E.evalxy([],q,B)},ee.dxy=function(q,oe){return E.dxydi([],q,se,oe,fe)},X=0;XA.length-1)&&g.push(x(U(o),{color:M.gridcolor,width:M.gridwidth,dash:M.griddash}));for(c=s;cA.length-1)&&!(T<0||T>A.length-1))for(l=A[a],_=A[T],r=0;rA[A.length-1])&&b.push(x(P(p),{color:M.minorgridcolor,width:M.minorgridwidth,dash:M.minorgriddash})));M.startline&&d.push(x(U(0),{color:M.startlinecolor,width:M.startlinewidth})),M.endline&&d.push(x(U(A.length-1),{color:M.endlinecolor,width:M.endlinewidth}))}else{for(n=5e-15,i=[Math.floor((A[A.length-1]-M.tick0)/M.dtick*(1+n)),Math.ceil((A[0]-M.tick0)/M.dtick/(1+n))].sort(function(B,X){return B-X}),s=i[0],h=i[1],c=s;c<=h;c++)m=M.tick0+M.dtick*c,g.push(x(P(m),{color:M.gridcolor,width:M.gridwidth,dash:M.griddash}));for(c=s-1;cA[A.length-1])&&b.push(x(P(p),{color:M.minorgridcolor,width:M.minorgridwidth,dash:M.minorgriddash}));M.startline&&d.push(x(P(A[0]),{color:M.startlinecolor,width:M.startlinewidth})),M.endline&&d.push(x(P(A[A.length-1]),{color:M.endlinecolor,width:M.endlinewidth}))}}}}),VG=Xe({"src/traces/carpet/calc_labels.js"(Z,G){"use strict";var v=Go(),x=Qo().extendFlat;G.exports=function(E,e){var t,r,o,a,n,i=e._labels=[],s=e._gridlines;for(t=0;t=0;t--)r[s-t]=x[h][t],o[s-t]=S[h][t];for(a.push({x:r,y:o,bicubic:n}),t=h,r=[],o=[];t>=0;t--)r[h-t]=x[t][0],o[h-t]=S[t][0];return a.push({x:r,y:o,bicubic:i}),a}}}),HG=Xe({"src/traces/carpet/smooth_fill_2d_array.js"(Z,G){"use strict";var v=sa();G.exports=function(S,E,e){var t,r,o,a=[],n=[],i=S[0].length,s=S.length;function h($,se){var le=0,fe,V=0;return $>0&&(fe=S[se][$-1])!==void 0&&(V++,le+=fe),$0&&(fe=S[se-1][$])!==void 0&&(V++,le+=fe),se0&&r0&&tu);return v.log("Smoother converged to",y,"after",R,"iterations"),S}}}),WG=Xe({"src/traces/carpet/constants.js"(Z,G){"use strict";G.exports={RELATIVE_CULL_TOLERANCE:1e-6}}}),XG=Xe({"src/traces/carpet/catmull_rom.js"(Z,G){"use strict";var v=.5;G.exports=function(S,E,e,t){var r=S[0]-E[0],o=S[1]-E[1],a=e[0]-E[0],n=e[1]-E[1],i=Math.pow(r*r+o*o,v/2),s=Math.pow(a*a+n*n,v/2),h=(s*s*r-i*i*a)*t,c=(s*s*o-i*i*n)*t,m=s*(i+s)*3,p=i*(i+s)*3;return[[E[0]+(m&&h/m),E[1]+(m&&c/m)],[E[0]-(p&&h/p),E[1]-(p&&c/p)]]}}}),ZG=Xe({"src/traces/carpet/compute_control_points.js"(Z,G){"use strict";var v=XG(),x=sa().ensureArray;function S(E,e,t){var r=-.5*t[0]+1.5*e[0],o=-.5*t[1]+1.5*e[1];return[(2*r+E[0])/3,(2*o+E[1])/3]}G.exports=function(e,t,r,o,a,n){var i,s,h,c,m,p,T,l,_,w,A=r[0].length,M=r.length,g=a?3*A-2:A,b=n?3*M-2:M;for(e=x(e,b),t=x(t,b),h=0;hm&&gT&&bp||bl},o.setScale=function(){var g=o._x,b=o._y,d=S(o._xctrl,o._yctrl,g,b,h.smoothing,c.smoothing);o._xctrl=d[0],o._yctrl=d[1],o.evalxy=E([o._xctrl,o._yctrl],i,s,h.smoothing,c.smoothing),o.dxydi=e([o._xctrl,o._yctrl],h.smoothing,c.smoothing),o.dxydj=t([o._xctrl,o._yctrl],h.smoothing,c.smoothing)},o.i2a=function(g){var b=Math.max(0,Math.floor(g[0]),i-2),d=g[0]-b;return(1-d)*a[b]+d*a[b+1]},o.j2b=function(g){var b=Math.max(0,Math.floor(g[1]),i-2),d=g[1]-b;return(1-d)*n[b]+d*n[b+1]},o.ij2ab=function(g){return[o.i2a(g[0]),o.j2b(g[1])]},o.a2i=function(g){var b=Math.max(0,Math.min(x(g,a),i-2)),d=a[b],u=a[b+1];return Math.max(0,Math.min(i-1,b+(g-d)/(u-d)))},o.b2j=function(g){var b=Math.max(0,Math.min(x(g,n),s-2)),d=n[b],u=n[b+1];return Math.max(0,Math.min(s-1,b+(g-d)/(u-d)))},o.ab2ij=function(g){return[o.a2i(g[0]),o.b2j(g[1])]},o.i2c=function(g,b){return o.evalxy([],g,b)},o.ab2xy=function(g,b,d){if(!d&&(ga[i-1]|bn[s-1]))return[!1,!1];var u=o.a2i(g),y=o.b2j(b),f=o.evalxy([],u,y);if(d){var R=0,L=0,z=[],F,N,O,P;ga[i-1]?(F=i-2,N=1,R=(g-a[i-1])/(a[i-1]-a[i-2])):(F=Math.max(0,Math.min(i-2,Math.floor(u))),N=u-F),bn[s-1]?(O=s-2,P=1,L=(b-n[s-1])/(n[s-1]-n[s-2])):(O=Math.max(0,Math.min(s-2,Math.floor(y))),P=y-O),R&&(o.dxydi(z,F,O,N,P),f[0]+=z[0]*R,f[1]+=z[1]*R),L&&(o.dxydj(z,F,O,N,P),f[0]+=z[0]*L,f[1]+=z[1]*L)}return f},o.c2p=function(g,b,d){return[b.c2p(g[0]),d.c2p(g[1])]},o.p2x=function(g,b,d){return[b.p2c(g[0]),d.p2c(g[1])]},o.dadi=function(g){var b=Math.max(0,Math.min(a.length-2,g));return a[b+1]-a[b]},o.dbdj=function(g){var b=Math.max(0,Math.min(n.length-2,g));return n[b+1]-n[b]},o.dxyda=function(g,b,d,u){var y=o.dxydi(null,g,b,d,u),f=o.dadi(g,d);return[y[0]/f,y[1]/f]},o.dxydb=function(g,b,d,u){var y=o.dxydj(null,g,b,d,u),f=o.dbdj(b,u);return[y[0]/f,y[1]/f]},o.dxyda_rough=function(g,b,d){var u=_*(d||.1),y=o.ab2xy(g+u,b,!0),f=o.ab2xy(g-u,b,!0);return[(y[0]-f[0])*.5/u,(y[1]-f[1])*.5/u]},o.dxydb_rough=function(g,b,d){var u=w*(d||.1),y=o.ab2xy(g,b+u,!0),f=o.ab2xy(g,b-u,!0);return[(y[0]-f[0])*.5/u,(y[1]-f[1])*.5/u]},o.dpdx=function(g){return g._m},o.dpdy=function(g){return g._m}}}}),QG=Xe({"src/traces/carpet/calc.js"(Z,G){"use strict";var v=Go(),x=sa().isArray1D,S=UG(),E=jG(),e=qG(),t=VG(),r=GG(),o=Y2(),a=HG(),n=Z2(),i=$G();G.exports=function(h,c){var m=v.getFromId(h,c.xaxis),p=v.getFromId(h,c.yaxis),T=c.aaxis,l=c.baxis,_=c.x,w=c.y,A=[];_&&x(_)&&A.push("x"),w&&x(w)&&A.push("y"),A.length&&n(c,T,l,"a","b",A);var M=c._a=c._a||c.a,g=c._b=c._b||c.b;_=c._x||c.x,w=c._y||c.y;var b={};if(c._cheater){var d=T.cheatertype==="index"?M.length:M,u=l.cheatertype==="index"?g.length:g;_=S(d,u,c.cheaterslope)}c._x=_=o(_),c._y=w=o(w),a(_,M,g),a(w,M,g),i(c),c.setScale();var y=E(_),f=E(w),R=.5*(y[1]-y[0]),L=.5*(y[1]+y[0]),z=.5*(f[1]-f[0]),F=.5*(f[1]+f[0]),N=1.3;return y=[L-R*N,L+R*N],f=[F-z*N,F+z*N],c._extremes[m._id]=v.findExtremes(m,y,{padded:!0}),c._extremes[p._id]=v.findExtremes(p,f,{padded:!0}),e(c,"a","b"),e(c,"b","a"),t(c,T),t(c,l),b.clipsegments=r(c._xctrl,c._yctrl,T,l),b.x=_,b.y=w,b.a=M,b.b=g,[b]}}}),eH=Xe({"src/traces/carpet/index.js"(Z,G){"use strict";G.exports={attributes:PT(),supplyDefaults:OG(),plot:NG(),calc:QG(),animatable:!0,isContainer:!0,moduleType:"trace",name:"carpet",basePlotModule:Kf(),categories:["cartesian","svg","carpet","carpetAxis","notLegendIsolatable","noMultiCategory","noHover","noSortingByValue"],meta:{}}}}),tH=Xe({"lib/carpet.js"(Z,G){"use strict";G.exports=eH()}}),K6=Xe({"src/traces/scattercarpet/attributes.js"(Z,G){"use strict";var v=$d(),x=af(),S=ru(),{hovertemplateAttrs:E,texttemplateAttrs:e,templatefallbackAttrs:t}=Jl(),r=ku(),o=Qo().extendFlat,a=x.marker,n=x.line,i=a.line;G.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:o({},x.mode,{dflt:"markers"}),text:o({},x.text,{}),texttemplate:e({editType:"plot"},{keys:["a","b","text"]}),texttemplatefallback:t({editType:"plot"}),hovertext:o({},x.hovertext,{}),line:{color:n.color,width:n.width,dash:n.dash,backoff:n.backoff,shape:o({},n.shape,{values:["linear","spline"]}),smoothing:n.smoothing,editType:"calc"},connectgaps:x.connectgaps,fill:o({},x.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor: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:i.width,dash:i.dash,editType:"calc"},r("marker.line")),gradient:a.gradient,editType:"calc"},r("marker")),textfont:x.textfont,textposition:x.textposition,selected:x.selected,unselected:x.unselected,hoverinfo:o({},S.hoverinfo,{flags:["a","b","text","name"]}),hoveron:x.hoveron,hovertemplate:E(),hovertemplatefallback:t(),zorder:x.zorder}}}),rH=Xe({"src/traces/scattercarpet/defaults.js"(Z,G){"use strict";var v=sa(),x=Tv(),S=Fu(),E=md(),e=Dd(),t=o1(),r=zd(),o=ev(),a=K6();G.exports=function(i,s,h,c){function m(M,g){return v.coerce(i,s,a,M,g)}m("carpet"),s.xaxis="x",s.yaxis="y";var p=m("a"),T=m("b"),l=Math.min(p.length,T.length);if(!l){s.visible=!1;return}s._length=l,m("text"),m("texttemplate"),m("texttemplatefallback"),m("hovertext");var _=l0?b=M.labelprefix.replace(/ = $/,""):b=M._hovertitle,l.push(b+": "+g.toFixed(3)+M.labelsuffix)}if(!m.hovertemplate){var w=c.hi||m.hoverinfo,A=w.split("+");A.indexOf("all")!==-1&&(A=["a","b","text"]),A.indexOf("a")!==-1&&_(p.aaxis,c.a),A.indexOf("b")!==-1&&_(p.baxis,c.b),l.push("y: "+a.yLabel),A.indexOf("text")!==-1&&x(c,m,l),a.extraText=l.join("
")}return o}}}),sH=Xe({"src/traces/scattercarpet/event_data.js"(Z,G){"use strict";G.exports=function(x,S,E,e,t){var r=e[t];return x.a=r.a,x.b=r.b,x.y=r.y,x}}}),lH=Xe({"src/traces/scattercarpet/index.js"(Z,G){"use strict";G.exports={attributes:K6(),supplyDefaults:rH(),colorbar:pp(),formatLabels:aH(),calc:iH(),plot:nH(),style:Qp().style,styleOnSelect:Qp().styleOnSelect,hoverPoints:oH(),selectPoints:c1(),eventData:sH(),moduleType:"trace",name:"scattercarpet",basePlotModule:Kf(),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}}}),uH=Xe({"lib/scattercarpet.js"(Z,G){"use strict";G.exports=lH()}}),J6=Xe({"src/traces/contourcarpet/attributes.js"(Z,G){"use strict";var v=p1(),x=V_(),S=ku(),E=Qo().extendFlat,e=x.contours;G.exports=E({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:x.fillcolor,autocontour:x.autocontour,ncontours:x.ncontours,contours:{type:e.type,start:e.start,end:e.end,size:e.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:e.showlines,showlabels:e.showlabels,labelfont:e.labelfont,labelformat:e.labelformat,operation:e.operation,value:e.value,editType:"calc",impliedEdits:{autocontour:!1}},line:{color:x.line.color,width:x.line.width,dash:x.line.dash,smoothing:x.line.smoothing,editType:"plot"},zorder:x.zorder},S("",{cLetter:"z",autoColorDflt:!1}))}}),$6=Xe({"src/traces/contourcarpet/defaults.js"(Z,G){"use strict";var v=sa(),x=X2(),S=J6(),E=TS(),e=s3(),t=l3();G.exports=function(o,a,n,i){function s(p,T){return v.coerce(o,a,S,p,T)}function h(p){return v.coerce2(o,a,S,p)}if(s("carpet"),o.a&&o.b){var c=x(o,a,s,i,"a","b");if(!c){a.visible=!1;return}s("text");var m=s("contours.type")==="constraint";m?E(o,a,s,i,n,{hasHover:!1}):(e(o,a,s,h),t(o,a,s,i,{hasHover:!1}))}else a._defaultColor=n,a._length=null;s("zorder")}}}),cH=Xe({"src/traces/contourcarpet/calc.js"(Z,G){"use strict";var v=Tp(),x=sa(),S=Z2(),E=Y2(),e=K2(),t=J2(),r=sS(),o=$6(),a=IT(),n=dS();G.exports=function(h,c){var m=c._carpetTrace=a(h,c);if(!(!m||!m.visible||m.visible==="legendonly")){if(!c.a||!c.b){var p=h.data[m.index],T=h.data[c.index];T.a||(T.a=p.a),T.b||(T.b=p.b),o(T,c,c._defaultColor,h._fullLayout)}var l=i(h,c);return n(c,c._z),l}};function i(s,h){var c=h._carpetTrace,m=c.aaxis,p=c.baxis,T,l,_,w,A,M,g;m._minDtick=0,p._minDtick=0,x.isArray1D(h.z)&&S(h,m,p,"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?p.makeCalcdata(h,"_b"):[],l=h.a0||0,_=h.da||1,A=h.b0||0,M=h.db||1,g=h._z=E(h._z||h.z,h.transpose),h._emptypoints=t(g),e(g,h._emptypoints);var b=x.maxRowLength(g),d=h.xtype==="scaled"?"":T,u=r(h,d,l,_,b,m),y=h.ytype==="scaled"?"":w,f=r(h,y,A,M,g.length,p),R={a:u,b:f,z:g};return h.contours.type==="levels"&&h.contours.coloring!=="none"&&v(s,h,{vals:g,containerStr:"",cLetter:"z"}),[R]}}}),fH=Xe({"src/traces/carpet/axis_aligned_line.js"(Z,G){"use strict";var v=sa().isArrayOrTypedArray;G.exports=function(x,S,E,e){var t,r,o,a,n,i,s,h,c,m,p,T,l,_=v(E)?"a":"b",w=_==="a"?x.aaxis:x.baxis,A=w.smoothing,M=_==="a"?x.a2i:x.b2j,g=_==="a"?E:e,b=_==="a"?e:E,d=_==="a"?S.a.length:S.b.length,u=_==="a"?S.b.length:S.a.length,y=Math.floor(_==="a"?x.b2j(b):x.a2i(b)),f=_==="a"?function(se){return x.evalxy([],se,y)}:function(se){return x.evalxy([],y,se)};A&&(o=Math.max(0,Math.min(u-2,y)),a=y-o,r=_==="a"?function(se,le){return x.dxydi([],se,o,le,a)}:function(se,le){return x.dxydj([],o,se,a,le)});var R=M(g[0]),L=M(g[1]),z=R0?Math.floor:Math.ceil,O=z>0?Math.ceil:Math.floor,P=z>0?Math.min:Math.max,U=z>0?Math.max:Math.min,B=N(R+F),X=O(L-F);s=f(R);var $=[[s]];for(t=B;t*z=0;ce--)j=U.clipsegments[ce],Q=x([],j.x,R.c2p),re=x([],j.y,L.c2p),Q.reverse(),re.reverse(),be.push(S(Q,re,j.bicubic));var Ae="M"+be.join("L")+"Z";A(F,U.clipsegments,R,L,le,V),M(O,F,R,L,ae,ee,Y,P,U,V,Ae),p(F,se,d,N,$,u,P),E.setClipUrl(F,P._clipPathId,d)})};function m(b,d){var u,y,f,R,L,z,F,N,O;for(u=0;use&&(y.max=se),y.len=y.max-y.min}function l(b,d,u){var y=b.getPointAtLength(d),f=b.getPointAtLength(u),R=f.x-y.x,L=f.y-y.y,z=Math.sqrt(R*R+L*L);return[R/z,L/z]}function _(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]),y=Math.sqrt(1-u*u);return y/u}function A(b,d,u,y,f,R){var L,z,F,N,O=e.ensureSingle(b,"g","contourbg"),P=O.selectAll("path").data(R==="fill"&&!f?[0]:[]);P.enter().append("path"),P.exit().remove();var U=[];for(N=0;N=0&&(B=Q,$=se):Math.abs(U[1]-B[1])=0&&(B=Q,$=se):e.log("endpt to newendpt is not vert. or horz.",U,B,Q)}if($>=0)break;N+=ae(U,B),U=B}if($===d.edgepaths.length){e.log("unclosed perimeter path");break}F=$,P=O.indexOf(F)===-1,P&&(F=O[0],N+=ae(U,B)+"Z",U=null)}for(F=0;Fg):M=z>f,g=z;var F=m(f,R,L,z);F.pos=y,F.yc=(f+z)/2,F.i=u,F.dir=M?"increasing":"decreasing",F.x=F.pos,F.y=[L,R],b&&(F.orig_p=s[u]),w&&(F.tx=i.text[u]),A&&(F.htx=i.hovertext[u]),d.push(F)}else d.push({pos:y,empty:!0})}return i._extremes[c._id]=S.findExtremes(c,v.concat(l,T),{padded:!0}),d.length&&(d[0].t={labels:{open:x(n,"open:")+" ",high:x(n,"high:")+" ",low:x(n,"low:")+" ",close:x(n,"close:")+" "}}),d}function a(n,i,s){var h=s._minDiff;if(!h){var c=n._fullData,m=[];h=1/0;var p;for(p=0;p"+_.labels[y]+v.hoverLabelText(T,f,l.yhoverformat)):(L=x.extendFlat({},A),L.y0=L.y1=R,L.yLabelVal=f,L.yLabel=_.labels[y]+v.hoverLabelText(T,f,l.yhoverformat),L.name="",w.push(L),d[f]=L)}return w}function i(s,h,c,m){var p=s.cd,T=s.ya,l=p[0].trace,_=p[0].t,w=a(s,h,c,m);if(!w)return[];var A=w.index,M=p[A],g=w.index=M.i,b=M.dir;function d(F){return _.labels[F]+v.hoverLabelText(T,l[F][g],l.yhoverformat)}var u=M.hi||l.hoverinfo||"",y=u.split("+"),f=u==="all",R=f||y.indexOf("y")!==-1,L=f||y.indexOf("text")!==-1,z=R?[d("open"),d("high"),d("low"),d("close")+" "+r[b]]:[];return L&&e(M,l,z),w.extraText=z.join("
"),w.y0=w.y1=T.c2p(M.yc,!0),[w]}G.exports={hoverPoints:o,hoverSplit:n,hoverOnPoints:i}}}),rk=Xe({"src/traces/ohlc/select.js"(Z,G){"use strict";G.exports=function(x,S){var E=x.cd,e=x.xaxis,t=x.yaxis,r=[],o,a=E[0].t.bPos||0;if(S===!1)for(o=0;oh?function(l){return l<=0}:function(l){return l>=0};a.c2g=function(l){var _=a.c2l(l)-s;return(T(_)?_:0)+p},a.g2c=function(l){return a.l2c(l+s-p)},a.g2p=function(l){return l*m},a.c2p=function(l){return a.g2p(a.c2g(l))}}}function t(a,n){return n==="degrees"?S(a):a}function r(a,n){return n==="degrees"?E(a):a}function o(a,n){var i=a.type;if(i==="linear"){var s=a.d2c,h=a.c2d;a.d2c=function(c,m){return t(s(c),m)},a.c2d=function(c,m){return h(r(c,m))}}a.makeCalcdata=function(c,m){var p=c[m],T=c._length,l,_,w=function(d){return a.d2c(d,c.thetaunit)};if(p)for(l=new Array(T),_=0;_0?d:1/0},M=S(w,A),g=v.mod(M+1,w.length);return[w[M],w[g]]}function m(_){return Math.abs(_)>1e-10?_:0}function p(_,w,A){w=w||0,A=A||0;for(var M=_.length,g=new Array(M),b=0;b0?1:0}function x(r){var o=r[0],a=r[1];if(!isFinite(o)||!isFinite(a))return[1,0];var n=(o+1)*(o+1)+a*a;return[(o*o+a*a-1)/n,2*a/n]}function S(r,o){var a=o[0],n=o[1];return[a*r.radius+r.cx,-n*r.radius+r.cy]}function E(r,o){return o*r.radius}function e(r,o,a,n){var i=S(r,x([a,o])),s=i[0],h=i[1],c=S(r,x([n,o])),m=c[0],p=c[1];if(o===0)return["M"+s+","+h,"L"+m+","+p].join(" ");var T=E(r,1/Math.abs(o));return["M"+s+","+h,"A"+T+","+T+" 0 0,"+(o<0?1:0)+" "+m+","+p].join(" ")}function t(r,o,a,n){var i=E(r,1/(o+1)),s=S(r,x([o,a])),h=s[0],c=s[1],m=S(r,x([o,n])),p=m[0],T=m[1];if(v(a)!==v(n)){var l=S(r,x([o,0])),_=l[0],w=l[1];return["M"+h+","+c,"A"+i+","+i+" 0 0,"+(0at?(nt=re,rt=re*at,ye=(ce-rt)/q.h/2,st=[j[0],j[1]],Me=[Q[0]+ye,Q[1]-ye]):(nt=ce/at,rt=ce,ye=(re-nt)/q.w/2,st=[j[0]+ye,j[1]-ye],Me=[Q[0],Q[1]]),Y.xLength2=nt,Y.yLength2=rt,Y.xDomain2=st,Y.yDomain2=Me;var he=Y.xOffset2=q.l+q.w*st[0],Oe=Y.yOffset2=q.t+q.h*(1-Me[1]),tt=Y.radius=nt/De,ot=Y.innerRadius=Y.getHole(V)*tt,Qe=Y.cx=he-tt*Ae[0],Pt=Y.cy=Oe+tt*Ae[3],It=Y.cxx=Qe-he,qt=Y.cyy=Pt-Oe,Wt=oe.side,kr;Wt==="counterclockwise"?(kr=Wt,Wt="top"):Wt==="clockwise"&&(kr=Wt,Wt="bottom"),Y.radialAxis=Y.mockAxis(fe,V,oe,{_id:"x",side:Wt,_trueSide:kr,domain:[ot/q.w,tt/q.w]}),Y.angularAxis=Y.mockAxis(fe,V,ae,{side:"right",domain:[0,Math.PI],autorange:!1}),Y.doAutoRange(fe,V),Y.updateAngularAxis(fe,V),Y.updateRadialAxis(fe,V),Y.updateRadialAxisTitle(fe,V),Y.xaxis=Y.mockCartesianAxis(fe,V,{_id:"x",domain:st}),Y.yaxis=Y.mockCartesianAxis(fe,V,{_id:"y",domain:Me});var mr=Y.pathSubplot();Y.clipPaths.forTraces.select("path").attr("d",mr).attr("transform",t(It,qt)),ee.frontplot.attr("transform",t(he,Oe)).call(o.setClipUrl,Y._hasClipOnAxisFalse?null:Y.clipIds.forTraces,Y.gd),ee.bg.attr("d",mr).attr("transform",t(Qe,Pt)).call(r.fill,V.bgcolor)},B.mockAxis=function(fe,V,Y,ee){var q=E.extendFlat({},Y,ee);return s(q,V,fe),q},B.mockCartesianAxis=function(fe,V,Y){var ee=this,q=ee.isSmith,oe=Y._id,ae=E.extendFlat({type:"linear"},Y);i(ae,fe);var j={x:[0,2],y:[1,3]};return ae.setRange=function(){var Q=ee.sectorBBox,re=j[oe],ce=ee.radialAxis._rl,be=(ce[1]-ce[0])/(1-ee.getHole(V));ae.range=[Q[re[0]]*be,Q[re[1]]*be]},ae.isPtWithinRange=oe==="x"&&!q?function(Q){return ee.isPtInside(Q)}:function(){return!0},ae.setRange(),ae.setScale(),ae},B.doAutoRange=function(fe,V){var Y=this,ee=Y.gd,q=Y.radialAxis,oe=Y.getRadial(V);h(ee,q);var ae=q.range;if(oe.range=ae.slice(),oe._input.range=ae.slice(),q._rl=[q.r2l(ae[0],null,"gregorian"),q.r2l(ae[1],null,"gregorian")],q.minallowed!==void 0){var j=q.r2l(q.minallowed);q._rl[0]>q._rl[1]?q._rl[1]=Math.max(q._rl[1],j):q._rl[0]=Math.max(q._rl[0],j)}if(q.maxallowed!==void 0){var Q=q.r2l(q.maxallowed);q._rl[0]90&&ce<=270&&(be.tickangle=180);var ze=De?function(tt){var ot=z(Y,f([tt.x,0]));return t(ot[0]-j,ot[1]-Q)}:function(tt){return t(be.l2p(tt.x)+ae,0)},Ze=De?function(tt){return L(Y,tt.x,-1/0,1/0)}:function(tt){return Y.pathArc(be.r2p(tt.x)+ae)},at=X(re);if(Y.radialTickLayout!==at&&(q["radial-axis"].selectAll(".xtick").remove(),Y.radialTickLayout=at),Ae){be.setScale();var nt=0,rt=De?(be.tickvals||[]).filter(function(tt){return tt>=0}).map(function(tt){return n.tickText(be,tt,!0,!1)}):n.calcTicks(be),st=De?rt:n.clipEnds(be,rt),Me=n.getTickSigns(be)[2];De&&((be.ticks==="top"&&be.side==="bottom"||be.ticks==="bottom"&&be.side==="top")&&(Me=-Me),be.ticks==="top"&&be.side==="top"&&(nt=-be.ticklen),be.ticks==="bottom"&&be.side==="bottom"&&(nt=be.ticklen)),n.drawTicks(ee,be,{vals:rt,layer:q["radial-axis"],path:n.makeTickPath(be,0,Me),transFn:ze,crisp:!1}),n.drawGrid(ee,be,{vals:st,layer:q["radial-grid"],path:Ze,transFn:E.noop,crisp:!1}),n.drawLabels(ee,be,{vals:rt,layer:q["radial-axis"],transFn:ze,labelFns:n.makeLabelFns(be,nt)})}var ye=Y.radialAxisAngle=Y.vangles?P(se(O(re.angle),Y.vangles)):re.angle,he=t(j,Q),Oe=he+e(-ye);le(q["radial-axis"],Ae&&(re.showticklabels||re.ticks),{transform:Oe}),le(q["radial-grid"],Ae&&re.showgrid,{transform:De?"":he}),le(q["radial-line"].select("line"),Ae&&re.showline,{x1:De?-oe:ae,y1:0,x2:oe,y2:0,transform:Oe}).attr("stroke-width",re.linewidth).call(r.stroke,re.linecolor)},B.updateRadialAxisTitle=function(fe,V,Y){if(!this.isSmith){var ee=this,q=ee.gd,oe=ee.radius,ae=ee.cx,j=ee.cy,Q=ee.getRadial(V),re=ee.id+"title",ce=0;if(Q.title){var be=o.bBox(ee.layers["radial-axis"].node()).height,Ae=Q.title.font.size,De=Q.side;ce=De==="top"?Ae:De==="counterclockwise"?-(be+Ae*.4):be+Ae*.8}var ze=Y!==void 0?Y:ee.radialAxisAngle,Ze=O(ze),at=Math.cos(Ze),nt=Math.sin(Ze),rt=ae+oe/2*at+ce*nt,st=j-oe/2*nt+ce*at;ee.layers["radial-axis-title"]=T.draw(q,re,{propContainer:Q,propName:ee.id+".radialaxis.title.text",placeholder:F(q,"Click to enter radial axis title"),attributes:{x:rt,y:st,"text-anchor":"middle"},transform:{rotate:-ze}})}},B.updateAngularAxis=function(fe,V){var Y=this,ee=Y.gd,q=Y.layers,oe=Y.radius,ae=Y.innerRadius,j=Y.cx,Q=Y.cy,re=Y.getAngular(V),ce=Y.angularAxis,be=Y.isSmith;be||(Y.fillViewInitialKey("angularaxis.rotation",re.rotation),ce.setGeometry(),ce.setScale());var Ae=be?function(ot){var Qe=z(Y,f([0,ot.x]));return Math.atan2(Qe[0]-j,Qe[1]-Q)-Math.PI/2}:function(ot){return ce.t2g(ot.x)};ce.type==="linear"&&ce.thetaunit==="radians"&&(ce.tick0=P(ce.tick0),ce.dtick=P(ce.dtick));var De=function(ot){return t(j+oe*Math.cos(ot),Q-oe*Math.sin(ot))},ze=be?function(ot){var Qe=z(Y,f([0,ot.x]));return t(Qe[0],Qe[1])}:function(ot){return De(Ae(ot))},Ze=be?function(ot){var Qe=z(Y,f([0,ot.x])),Pt=Math.atan2(Qe[0]-j,Qe[1]-Q)-Math.PI/2;return t(Qe[0],Qe[1])+e(-P(Pt))}:function(ot){var Qe=Ae(ot);return De(Qe)+e(-P(Qe))},at=be?function(ot){return R(Y,ot.x,0,1/0)}:function(ot){var Qe=Ae(ot),Pt=Math.cos(Qe),It=Math.sin(Qe);return"M"+[j+ae*Pt,Q-ae*It]+"L"+[j+oe*Pt,Q-oe*It]},nt=n.makeLabelFns(ce,0),rt=nt.labelStandoff,st={};st.xFn=function(ot){var Qe=Ae(ot);return Math.cos(Qe)*rt},st.yFn=function(ot){var Qe=Ae(ot),Pt=Math.sin(Qe)>0?.2:1;return-Math.sin(Qe)*(rt+ot.fontSize*Pt)+Math.abs(Math.cos(Qe))*(ot.fontSize*b)},st.anchorFn=function(ot){var Qe=Ae(ot),Pt=Math.cos(Qe);return Math.abs(Pt)<.1?"middle":Pt>0?"start":"end"},st.heightFn=function(ot,Qe,Pt){var It=Ae(ot);return-.5*(1+Math.sin(It))*Pt};var Me=X(re);Y.angularTickLayout!==Me&&(q["angular-axis"].selectAll("."+ce._id+"tick").remove(),Y.angularTickLayout=Me);var ye=be?[1/0].concat(ce.tickvals||[]).map(function(ot){return n.tickText(ce,ot,!0,!1)}):n.calcTicks(ce);be&&(ye[0].text="\u221E",ye[0].fontSize*=1.75);var he;if(V.gridshape==="linear"?(he=ye.map(Ae),E.angleDelta(he[0],he[1])<0&&(he=he.slice().reverse())):he=null,Y.vangles=he,ce.type==="category"&&(ye=ye.filter(function(ot){return E.isAngleInsideSector(Ae(ot),Y.sectorInRad)})),ce.visible){var Oe=ce.ticks==="inside"?-1:1,tt=(ce.linewidth||1)/2;n.drawTicks(ee,ce,{vals:ye,layer:q["angular-axis"],path:"M"+Oe*tt+",0h"+Oe*ce.ticklen,transFn:Ze,crisp:!1}),n.drawGrid(ee,ce,{vals:ye,layer:q["angular-grid"],path:at,transFn:E.noop,crisp:!1}),n.drawLabels(ee,ce,{vals:ye,layer:q["angular-axis"],repositionOnUpdate:!0,transFn:ze,labelFns:st})}le(q["angular-line"].select("path"),re.showline,{d:Y.pathSubplot(),transform:t(j,Q)}).attr("stroke-width",re.linewidth).call(r.stroke,re.linecolor)},B.updateFx=function(fe,V){if(!this.gd._context.staticPlot){var Y=!this.isSmith;Y&&(this.updateAngularDrag(fe),this.updateRadialDrag(fe,V,0),this.updateRadialDrag(fe,V,1)),this.updateHoverAndMainDrag(fe)}},B.updateHoverAndMainDrag=function(fe){var V=this,Y=V.isSmith,ee=V.gd,q=V.layers,oe=fe._zoomlayer,ae=d.MINZOOM,j=d.OFFEDGE,Q=V.radius,re=V.innerRadius,ce=V.cx,be=V.cy,Ae=V.cxx,De=V.cyy,ze=V.sectorInRad,Ze=V.vangles,at=V.radialAxis,nt=u.clampTiny,rt=u.findXYatLength,st=u.findEnclosingVertexAngles,Me=d.cornerHalfWidth,ye=d.cornerLen/2,he,Oe,tt=c.makeDragger(q,"path","maindrag",fe.dragmode===!1?"none":"crosshair");v.select(tt).attr("d",V.pathSubplot()).attr("transform",t(ce,be)),tt.onmousemove=function(rr){p.hover(ee,rr,V.id),ee._fullLayout._lasthover=tt,ee._fullLayout._hoversubplot=V.id},tt.onmouseout=function(rr){ee._dragging||m.unhover(ee,rr)};var ot={element:tt,gd:ee,subplot:V.id,plotinfo:{id:V.id,xaxis:V.xaxis,yaxis:V.yaxis},xaxes:[V.xaxis],yaxes:[V.yaxis]},Qe,Pt,It,qt,Wt,kr,mr,qr,Sr;function Rr(rr,er){return Math.sqrt(rr*rr+er*er)}function wt(rr,er){return Rr(rr-Ae,er-De)}function Ne(rr,er){return Math.atan2(De-er,rr-Ae)}function Ke(rr,er){return[rr*Math.cos(er),rr*Math.sin(-er)]}function Te(rr,er){if(rr===0)return V.pathSector(2*Me);var Lr=ye/rr,fa=er-Lr,Da=er+Lr,Ia=Math.max(0,Math.min(rr,Q)),qa=Ia-Me,Wa=Ia+Me;return"M"+Ke(qa,fa)+"A"+[qa,qa]+" 0,0,0 "+Ke(qa,Da)+"L"+Ke(Wa,Da)+"A"+[Wa,Wa]+" 0,0,1 "+Ke(Wa,fa)+"Z"}function Ie(rr,er,Lr){if(rr===0)return V.pathSector(2*Me);var fa=Ke(rr,er),Da=Ke(rr,Lr),Ia=nt((fa[0]+Da[0])/2),qa=nt((fa[1]+Da[1])/2),Wa,Ca;if(Ia&&qa){var hi=qa/Ia,wi=-1/hi,Kt=rt(Me,hi,Ia,qa);Wa=rt(ye,wi,Kt[0][0],Kt[0][1]),Ca=rt(ye,wi,Kt[1][0],Kt[1][1])}else{var Ft,Yt;qa?(Ft=ye,Yt=Me):(Ft=Me,Yt=ye),Wa=[[Ia-Ft,qa-Yt],[Ia+Ft,qa-Yt]],Ca=[[Ia-Ft,qa+Yt],[Ia+Ft,qa+Yt]]}return"M"+Wa.join("L")+"L"+Ca.reverse().join("L")+"Z"}function Ve(){It=null,qt=null,Wt=V.pathSubplot(),kr=!1;var rr=ee._fullLayout[V.id];mr=x(rr.bgcolor).getLuminance(),qr=c.makeZoombox(oe,mr,ce,be,Wt),qr.attr("fill-rule","evenodd"),Sr=c.makeCorners(oe,ce,be),w(ee)}function Ce(rr,er){return er=Math.max(Math.min(er,Q),re),rrae?(rr-1&&rr===1&&_(er,ee,[V.xaxis],[V.yaxis],V.id,ot),Lr.indexOf("event")>-1&&p.click(ee,er,V.id)}ot.prepFn=function(rr,er,Lr){var fa=ee._fullLayout.dragmode,Da=tt.getBoundingClientRect();ee._fullLayout._calcInverseTransform(ee);var Ia=ee._fullLayout._invTransform;he=ee._fullLayout._invScaleX,Oe=ee._fullLayout._invScaleY;var qa=E.apply3DTransform(Ia)(er-Da.left,Lr-Da.top);if(Qe=qa[0],Pt=qa[1],Ze){var Wa=u.findPolygonOffset(Q,ze[0],ze[1],Ze);Qe+=Ae+Wa[0],Pt+=De+Wa[1]}switch(fa){case"zoom":ot.clickFn=ir,Y||(Ze?ot.moveFn=ct:ot.moveFn=Pe,ot.doneFn=_t,Ve(rr,er,Lr));break;case"select":case"lasso":l(rr,er,Lr,ot,fa);break}},m.init(ot)},B.updateRadialDrag=function(fe,V,Y){var ee=this,q=ee.gd,oe=ee.layers,ae=ee.radius,j=ee.innerRadius,Q=ee.cx,re=ee.cy,ce=ee.radialAxis,be=d.radialDragBoxSize,Ae=be/2;if(!ce.visible)return;var De=O(ee.radialAxisAngle),ze=ce._rl,Ze=ze[0],at=ze[1],nt=ze[Y],rt=.75*(ze[1]-ze[0])/(1-ee.getHole(V))/ae,st,Me,ye;Y?(st=Q+(ae+Ae)*Math.cos(De),Me=re-(ae+Ae)*Math.sin(De),ye="radialdrag"):(st=Q+(j-Ae)*Math.cos(De),Me=re-(j-Ae)*Math.sin(De),ye="radialdrag-inner");var he=c.makeRectDragger(oe,ye,"crosshair",-Ae,-Ae,be,be),Oe={element:he,gd:q};fe.dragmode===!1&&(Oe.dragmode=!1),le(v.select(he),ce.visible&&j0!=(Y?Qe>Ze:Qe=90||q>90&&oe>=450?De=1:j<=0&&re<=0?De=0:De=Math.max(j,re),q<=180&&oe>=180||q>180&&oe>=540?ce=-1:ae>=0&&Q>=0?ce=0:ce=Math.min(ae,Q),q<=270&&oe>=270||q>270&&oe>=630?be=-1:j>=0&&re>=0?be=0:be=Math.min(j,re),oe>=360?Ae=1:ae<=0&&Q<=0?Ae=0:Ae=Math.max(ae,Q),[ce,be,Ae,De]}function se(fe,V){var Y=function(q){return E.angleDist(fe,q)},ee=E.findIndexOfMin(V,Y);return V[ee]}function le(fe,V,Y){return V?(fe.attr("display",null),fe.attr(Y)):fe&&fe.attr("display","none"),fe}}}),sk=Xe({"src/plots/polar/layout_attributes.js"(Z,G){"use strict";var v=sh(),x=Wh(),S=wc().attributes,E=sa().extendFlat,e=pc().overrideAll,t=e({color:x.color,showline:E({},x.showline,{dflt:!0}),linecolor:x.linecolor,linewidth:x.linewidth,showgrid:E({},x.showgrid,{dflt:!0}),gridcolor:x.gridcolor,gridwidth:x.gridwidth,griddash:x.griddash},"plot","from-root"),r=e({tickmode:x.minor.tickmode,nticks:x.nticks,tick0:x.tick0,dtick:x.dtick,tickvals:x.tickvals,ticktext:x.ticktext,ticks:x.ticks,ticklen:x.ticklen,tickwidth:x.tickwidth,tickcolor:x.tickcolor,ticklabelstep:x.ticklabelstep,showticklabels:x.showticklabels,labelalias:x.labelalias,minorloglabels:x.minorloglabels,showtickprefix:x.showtickprefix,tickprefix:x.tickprefix,showticksuffix:x.showticksuffix,ticksuffix:x.ticksuffix,showexponent:x.showexponent,exponentformat:x.exponentformat,minexponent:x.minexponent,separatethousands:x.separatethousands,tickfont:x.tickfont,tickangle:x.tickangle,tickformat:x.tickformat,tickformatstops:x.tickformatstops,layer:x.layer},"plot","from-root"),o={visible:E({},x.visible,{dflt:!0}),type:E({},x.type,{values:["-","linear","log","date","category"]}),autotypenumbers:x.autotypenumbers,autorangeoptions:{minallowed:x.autorangeoptions.minallowed,maxallowed:x.autorangeoptions.maxallowed,clipmin:x.autorangeoptions.clipmin,clipmax:x.autorangeoptions.clipmax,include:x.autorangeoptions.include,editType:"plot"},autorange:E({},x.autorange,{editType:"plot"}),rangemode:{valType:"enumerated",values:["tozero","nonnegative","normal"],dflt:"tozero",editType:"calc"},minallowed:E({},x.minallowed,{editType:"plot"}),maxallowed:E({},x.maxallowed,{editType:"plot"}),range:E({},x.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],editType:"plot"}),categoryorder:x.categoryorder,categoryarray:x.categoryarray,angle:{valType:"angle",editType:"plot"},autotickangles:x.autotickangles,side:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"clockwise",editType:"plot"},title:{text:E({},x.title.text,{editType:"plot",dflt:""}),font:E({},x.title.font,{editType:"plot"}),editType:"plot"},hoverformat:x.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};E(o,t,r);var a={visible:E({},x.visible,{dflt:!0}),type:{valType:"enumerated",values:["-","linear","category"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:x.autotypenumbers,categoryorder:x.categoryorder,categoryarray:x.categoryarray,thetaunit:{valType:"enumerated",values:["radians","degrees"],dflt:"degrees",editType:"calc"},period:{valType:"number",editType:"calc",min:0},direction:{valType:"enumerated",values:["counterclockwise","clockwise"],dflt:"counterclockwise",editType:"calc"},rotation:{valType:"angle",editType:"calc"},hoverformat:x.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};E(a,t,r),G.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"}}}),AH=Xe({"src/plots/polar/layout_defaults.js"(Z,G){"use strict";var v=sa(),x=$n(),S=zl(),E=o0(),e=Hh().getSubplotData,t=Y0(),r=t1(),o=Qm(),a=e0(),n=I2(),i=z_(),s=f5(),h=a1(),c=sk(),m=ik(),p=DT(),T=p.axisNames;function l(w,A,M,g){var b=M("bgcolor");g.bgColor=x.combine(b,g.paper_bgcolor);var d=M("sector");M("hole");var u=e(g.fullData,p.name,g.id),y=g.layoutOut,f;function R(be,Ae){return M(f+"."+be,Ae)}for(var L=0;L")}}G.exports={hoverPoints:x,makeHoverPointText:S}}}),EH=Xe({"src/traces/scatterpolar/index.js"(Z,G){"use strict";G.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:FT(),categories:["polar","symbols","showLegend","scatter-like"],attributes:Cx(),supplyDefaults:OT().supplyDefaults,colorbar:pp(),formatLabels:BT(),calc:SH(),plot:MH(),style:Qp().style,styleOnSelect:Qp().styleOnSelect,hoverPoints:NT().hoverPoints,selectPoints:c1(),meta:{}}}}),kH=Xe({"lib/scatterpolar.js"(Z,G){"use strict";G.exports=EH()}}),lk=Xe({"src/traces/scatterpolargl/attributes.js"(Z,G){"use strict";var v=Cx(),{cliponaxis:x,hoveron:S}=v,E=Qs(v,["cliponaxis","hoveron"]),{connectgaps:e,line:{color:t,dash:r,width:o},fill:a,fillcolor:n,marker:i,textfont:s,textposition:h}=xx();G.exports=ds(To({},E),{connectgaps:e,fill:a,fillcolor:n,line:{color:t,dash:r,editType:"calc",width:o},marker:i,textfont:s,textposition:h})}}),CH=Xe({"src/traces/scatterpolargl/defaults.js"(Z,G){"use strict";var v=sa(),x=Fu(),S=OT().handleRThetaDefaults,E=md(),e=Dd(),t=zd(),r=ev(),o=Tv().PTS_LINESONLY,a=lk();G.exports=function(i,s,h,c){function m(T,l){return v.coerce(i,s,a,T,l)}var p=S(i,s,c,m);if(!p){s.visible=!1;return}m("thetaunit"),m("mode",p=r&&(g.marker.cluster=_.tree),g.marker&&(g.markerSel.positions=g.markerUnsel.positions=g.marker.positions=y),g.line&&y.length>1&&t.extendFlat(g.line,e.linePositions(n,l,y)),g.text&&(t.extendFlat(g.text,{positions:y},e.textPosition(n,l,g.text,g.marker)),t.extendFlat(g.textSel,{positions:y},e.textPosition(n,l,g.text,g.markerSel)),t.extendFlat(g.textUnsel,{positions:y},e.textPosition(n,l,g.text,g.markerUnsel))),g.fill&&!m.fill2d&&(m.fill2d=!0),g.marker&&!m.scatter2d&&(m.scatter2d=!0),g.line&&!m.line2d&&(m.line2d=!0),g.text&&!m.glText&&(m.glText=!0),m.lineOptions.push(g.line),m.fillOptions.push(g.fill),m.markerOptions.push(g.marker),m.markerSelectedOptions.push(g.markerSel),m.markerUnselectedOptions.push(g.markerUnsel),m.textOptions.push(g.text),m.textSelectedOptions.push(g.textSel),m.textUnselectedOptions.push(g.textUnsel),m.selectBatch.push([]),m.unselectBatch.push([]),_.x=f,_.y=R,_.rawx=f,_.rawy=R,_.r=A,_.theta=M,_.positions=y,_._scene=m,_.index=m.count,m.count++}}),S(n,i,s)}},G.exports.reglPrecompiled=o}}),zH=Xe({"src/traces/scatterpolargl/index.js"(Z,G){"use strict";var v=RH();v.plot=DH(),G.exports=v}}),FH=Xe({"lib/scatterpolargl.js"(Z,G){"use strict";G.exports=zH()}}),uk=Xe({"src/traces/barpolar/attributes.js"(Z,G){"use strict";var{hovertemplateAttrs:v,templatefallbackAttrs:x}=Jl(),S=Qo().extendFlat,E=Cx(),e=Sv();G.exports={r:E.r,theta:E.theta,r0:E.r0,dr:E.dr,theta0:E.theta0,dtheta:E.dtheta,thetaunit:E.thetaunit,base:S({},e.base,{}),offset:S({},e.offset,{}),width:S({},e.width,{}),text:S({},e.text,{}),hovertext:S({},e.hovertext,{}),marker:t(),hoverinfo:E.hoverinfo,hovertemplate:v(),hovertemplatefallback:x(),selected:e.selected,unselected:e.unselected};function t(){var r=S({},e.marker);return delete r.cornerradius,r}}}),ck=Xe({"src/traces/barpolar/layout_attributes.js"(Z,G){"use strict";G.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}}}),OH=Xe({"src/traces/barpolar/defaults.js"(Z,G){"use strict";var v=sa(),x=OT().handleRThetaDefaults,S=j2(),E=uk();G.exports=function(t,r,o,a){function n(s,h){return v.coerce(t,r,E,s,h)}var i=x(t,r,a,n);if(!i){r.visible=!1;return}n("thetaunit"),n("base"),n("offset"),n("width"),n("text"),n("hovertext"),n("hovertemplate"),n("hovertemplatefallback"),S(t,r,n,o,a),v.coerceSelectionMarkerOpacity(r,n)}}}),BH=Xe({"src/traces/barpolar/layout_defaults.js"(Z,G){"use strict";var v=sa(),x=ck();G.exports=function(S,E,e){var t={},r;function o(i,s){return v.coerce(S[r]||{},E[r],x,i,s)}for(var a=0;a0?(c=s,m=h):(c=h,m=s);var p=e.findEnclosingVertexAngles(c,r.vangles)[0],T=e.findEnclosingVertexAngles(m,r.vangles)[1],l=[p,(c+m)/2,T];return e.pathPolygonAnnulus(n,i,c,m,l,o,a)}:function(n,i,s,h){return S.pathAnnulus(n,i,s,h,o,a)}}}}),UH=Xe({"src/traces/barpolar/hover.js"(Z,G){"use strict";var v=rf(),x=sa(),S=f1().getTraceColor,E=x.fillText,e=NT().makeHoverPointText,t=zT().isPtInsidePolygon;G.exports=function(o,a,n){var i=o.cd,s=i[0].trace,h=o.subplot,c=h.radialAxis,m=h.angularAxis,p=h.vangles,T=p?t:x.isPtInsideSector,l=o.maxHoverDistance,_=m._period||2*Math.PI,w=Math.abs(c.g2p(Math.sqrt(a*a+n*n))),A=Math.atan2(n,a);c.range[0]>c.range[1]&&(A+=Math.PI);var M=function(u){return T(w,A,[u.rp0,u.rp1],[u.thetag0,u.thetag1],p)?l+Math.min(1,Math.abs(u.thetag1-u.thetag0)/_)-1+(u.rp1-w)/(u.rp1-u.rp0)-1:1/0};if(v.getClosest(i,M,o),o.index!==!1){var g=o.index,b=i[g];o.x0=o.x1=b.ct[0],o.y0=o.y1=b.ct[1];var d=x.extendFlat({},b,{r:b.s,theta:b.p});return E(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]}}}}),jH=Xe({"src/traces/barpolar/index.js"(Z,G){"use strict";G.exports={moduleType:"trace",name:"barpolar",basePlotModule:FT(),categories:["polar","bar","showLegend"],attributes:uk(),layoutAttributes:ck(),supplyDefaults:OH(),supplyLayoutDefaults:BH(),calc:fk().calc,crossTraceCalc:fk().crossTraceCalc,plot:NH(),colorbar:pp(),formatLabels:BT(),style:Nd().style,styleOnSelect:Nd().styleOnSelect,hoverPoints:UH(),selectPoints:h1(),meta:{}}}}),qH=Xe({"lib/barpolar.js"(Z,G){"use strict";G.exports=jH()}}),hk=Xe({"src/plots/smith/constants.js"(Z,G){"use strict";G.exports={attr:"subplot",name:"smith",axisNames:["realaxis","imaginaryaxis"],axisName2dataArray:{imaginaryaxis:"imag",realaxis:"real"}}}}),pk=Xe({"src/plots/smith/layout_attributes.js"(Z,G){"use strict";var v=sh(),x=Wh(),S=wc().attributes,E=sa().extendFlat,e=pc().overrideAll,t=e({color:x.color,showline:E({},x.showline,{dflt:!0}),linecolor:x.linecolor,linewidth:x.linewidth,showgrid:E({},x.showgrid,{dflt:!0}),gridcolor:x.gridcolor,gridwidth:x.gridwidth,griddash:x.griddash},"plot","from-root"),r=e({ticklen:x.ticklen,tickwidth:E({},x.tickwidth,{dflt:2}),tickcolor:x.tickcolor,showticklabels:x.showticklabels,labelalias:x.labelalias,showtickprefix:x.showtickprefix,tickprefix:x.tickprefix,showticksuffix:x.showticksuffix,ticksuffix:x.ticksuffix,tickfont:x.tickfont,tickformat:x.tickformat,hoverformat:x.hoverformat,layer:x.layer},"plot","from-root"),o=E({visible:E({},x.visible,{dflt:!0}),tickvals:{dflt:[.2,.5,1,2,5],valType:"data_array",editType:"plot"},tickangle:E({},x.tickangle,{dflt:90}),ticks:{valType:"enumerated",values:["top","bottom",""],editType:"ticks"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},editType:"calc"},t,r),a=E({visible:E({},x.visible,{dflt:!0}),tickvals:{valType:"data_array",editType:"plot"},ticks:x.ticks,editType:"calc"},t,r);G.exports={domain:S({name:"smith",editType:"plot"}),bgcolor:{valType:"color",editType:"plot",dflt:v.background},realaxis:o,imaginaryaxis:a,editType:"calc"}}}),VH=Xe({"src/plots/smith/layout_defaults.js"(Z,G){"use strict";var v=sa(),x=$n(),S=zl(),E=o0(),e=Hh().getSubplotData,t=e0(),r=Qm(),o=z_(),a=wv(),n=pk(),i=hk(),s=i.axisNames,h=m(function(p){return v.isTypedArray(p)&&(p=Array.from(p)),p.slice().reverse().map(function(T){return-T}).concat([0]).concat(p)},String);function c(p,T,l,_){var w=l("bgcolor");_.bgColor=x.combine(w,_.paper_bgcolor);var A=e(_.fullData,i.name,_.id),M=_.layoutOut,g;function b(B,X){return l(g+"."+B,X)}for(var d=0;d")}}G.exports={hoverPoints:x,makeHoverPointText:S}}}),KH=Xe({"src/traces/scattersmith/index.js"(Z,G){"use strict";G.exports={moduleType:"trace",name:"scattersmith",basePlotModule:GH(),categories:["smith","symbols","showLegend","scatter-like"],attributes:dk(),supplyDefaults:HH(),colorbar:pp(),formatLabels:WH(),calc:XH(),plot:ZH(),style:Qp().style,styleOnSelect:Qp().styleOnSelect,hoverPoints:YH().hoverPoints,selectPoints:c1(),meta:{}}}}),JH=Xe({"lib/scattersmith.js"(Z,G){"use strict";G.exports=KH()}}),Mp=Xe({"node_modules/world-calendars/dist/main.js"(Z,G){var v=ch();function x(){this.regionalOptions=[],this.regionalOptions[""]={invalidCalendar:"Calendar {0} not found",invalidDate:"Invalid {0} date",invalidMonth:"Invalid {0} month",invalidYear:"Invalid {0} year",differentCalendars:"Cannot mix {0} and {1} dates"},this.local=this.regionalOptions[""],this.calendars={},this._localCals={}}v(x.prototype,{instance:function(o,a){o=(o||"gregorian").toLowerCase(),a=a||"";var n=this._localCals[o+"-"+a];if(!n&&this.calendars[o]&&(n=new this.calendars[o](a),this._localCals[o+"-"+a]=n),!n)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,o);return n},newDate:function(o,a,n,i,s){return i=(o!=null&&o.year?o.calendar():typeof i=="string"?this.instance(i,s):i)||this.instance(),i.newDate(o,a,n)},substituteDigits:function(o){return function(a){return(a+"").replace(/[0-9]/g,function(n){return o[n]})}},substituteChineseDigits:function(o,a){return function(n){for(var i="",s=0;n>0;){var h=n%10;i=(h===0?"":o[h]+a[s])+i,s++,n=Math.floor(n/10)}return i.indexOf(o[1]+a[1])===0&&(i=i.substr(1)),i||o[0]}}});function S(o,a,n,i){if(this._calendar=o,this._year=a,this._month=n,this._day=i,this._calendar._validateLevel===0&&!this._calendar.isValid(this._year,this._month,this._day))throw(r.local.invalidDate||r.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function E(o,a){return o=""+o,"000000".substring(0,a-o.length)+o}v(S.prototype,{newDate:function(o,a,n){return this._calendar.newDate(o??this,a,n)},year:function(o){return arguments.length===0?this._year:this.set(o,"y")},month:function(o){return arguments.length===0?this._month:this.set(o,"m")},day:function(o){return arguments.length===0?this._day:this.set(o,"d")},date:function(o,a,n){if(!this._calendar.isValid(o,a,n))throw(r.local.invalidDate||r.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=o,this._month=a,this._day=n,this},leapYear:function(){return this._calendar.leapYear(this)},epoch:function(){return this._calendar.epoch(this)},formatYear:function(){return this._calendar.formatYear(this)},monthOfYear:function(){return this._calendar.monthOfYear(this)},weekOfYear:function(){return this._calendar.weekOfYear(this)},daysInYear:function(){return this._calendar.daysInYear(this)},dayOfYear:function(){return this._calendar.dayOfYear(this)},daysInMonth:function(){return this._calendar.daysInMonth(this)},dayOfWeek:function(){return this._calendar.dayOfWeek(this)},weekDay:function(){return this._calendar.weekDay(this)},extraInfo:function(){return this._calendar.extraInfo(this)},add:function(o,a){return this._calendar.add(this,o,a)},set:function(o,a){return this._calendar.set(this,o,a)},compareTo:function(o){if(this._calendar.name!==o._calendar.name)throw(r.local.differentCalendars||r.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,o._calendar.local.name);var a=this._year!==o._year?this._year-o._year:this._month!==o._month?this.monthOfYear()-o.monthOfYear():this._day-o._day;return a===0?0:a<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(o){return this._calendar.fromJD(o)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(o){return this._calendar.fromJSDate(o)},toString:function(){return(this.year()<0?"-":"")+E(Math.abs(this.year()),4)+"-"+E(this.month(),2)+"-"+E(this.day(),2)}});function e(){this.shortYearCutoff="+10"}v(e.prototype,{_validateLevel:0,newDate:function(o,a,n){return o==null?this.today():(o.year&&(this._validate(o,a,n,r.local.invalidDate||r.regionalOptions[""].invalidDate),n=o.day(),a=o.month(),o=o.year()),new S(this,o,a,n))},today:function(){return this.fromJSDate(new Date)},epoch:function(o){var a=this._validate(o,this.minMonth,this.minDay,r.local.invalidYear||r.regionalOptions[""].invalidYear);return a.year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(o){var a=this._validate(o,this.minMonth,this.minDay,r.local.invalidYear||r.regionalOptions[""].invalidYear);return(a.year()<0?"-":"")+E(Math.abs(a.year()),4)},monthsInYear:function(o){return this._validate(o,this.minMonth,this.minDay,r.local.invalidYear||r.regionalOptions[""].invalidYear),12},monthOfYear:function(o,a){var n=this._validate(o,a,this.minDay,r.local.invalidMonth||r.regionalOptions[""].invalidMonth);return(n.month()+this.monthsInYear(n)-this.firstMonth)%this.monthsInYear(n)+this.minMonth},fromMonthOfYear:function(o,a){var n=(a+this.firstMonth-2*this.minMonth)%this.monthsInYear(o)+this.minMonth;return this._validate(o,n,this.minDay,r.local.invalidMonth||r.regionalOptions[""].invalidMonth),n},daysInYear:function(o){var a=this._validate(o,this.minMonth,this.minDay,r.local.invalidYear||r.regionalOptions[""].invalidYear);return this.leapYear(a)?366:365},dayOfYear:function(o,a,n){var i=this._validate(o,a,n,r.local.invalidDate||r.regionalOptions[""].invalidDate);return i.toJD()-this.newDate(i.year(),this.fromMonthOfYear(i.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(o,a,n){var i=this._validate(o,a,n,r.local.invalidDate||r.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(i))+2)%this.daysInWeek()},extraInfo:function(o,a,n){return this._validate(o,a,n,r.local.invalidDate||r.regionalOptions[""].invalidDate),{}},add:function(o,a,n){return this._validate(o,this.minMonth,this.minDay,r.local.invalidDate||r.regionalOptions[""].invalidDate),this._correctAdd(o,this._add(o,a,n),a,n)},_add:function(o,a,n){if(this._validateLevel++,n==="d"||n==="w"){var i=o.toJD()+a*(n==="w"?this.daysInWeek():1),s=o.calendar().fromJD(i);return this._validateLevel--,[s.year(),s.month(),s.day()]}try{var h=o.year()+(n==="y"?a:0),c=o.monthOfYear()+(n==="m"?a:0),s=o.day(),m=function(l){for(;c_-1+l.minMonth;)h++,c-=_,_=l.monthsInYear(h)};n==="y"?(o.month()!==this.fromMonthOfYear(h,c)&&(c=this.newDate(h,o.month(),this.minDay).monthOfYear()),c=Math.min(c,this.monthsInYear(h)),s=Math.min(s,this.daysInMonth(h,this.fromMonthOfYear(h,c)))):n==="m"&&(m(this),s=Math.min(s,this.daysInMonth(h,this.fromMonthOfYear(h,c))));var p=[h,this.fromMonthOfYear(h,c),s];return this._validateLevel--,p}catch(T){throw this._validateLevel--,T}},_correctAdd:function(o,a,n,i){if(!this.hasYearZero&&(i==="y"||i==="m")&&(a[0]===0||o.year()>0!=a[0]>0)){var s={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[i],h=n<0?-1:1;a=this._add(o,n*s[0]+h*s[1],s[2])}return o.date(a[0],a[1],a[2])},set:function(o,a,n){this._validate(o,this.minMonth,this.minDay,r.local.invalidDate||r.regionalOptions[""].invalidDate);var i=n==="y"?a:o.year(),s=n==="m"?a:o.month(),h=n==="d"?a:o.day();return(n==="y"||n==="m")&&(h=Math.min(h,this.daysInMonth(i,s))),o.date(i,s,h)},isValid:function(o,a,n){this._validateLevel++;var i=this.hasYearZero||o!==0;if(i){var s=this.newDate(o,a,this.minDay);i=a>=this.minMonth&&a-this.minMonth=this.minDay&&n-this.minDay13.5?13:1),T=s-(p>2.5?4716:4715);return T<=0&&T--,this.newDate(T,p,m)},toJSDate:function(o,a,n){var i=this._validate(o,a,n,r.local.invalidDate||r.regionalOptions[""].invalidDate),s=new Date(i.year(),i.month()-1,i.day());return s.setHours(0),s.setMinutes(0),s.setSeconds(0),s.setMilliseconds(0),s.setHours(s.getHours()>12?s.getHours()+2:0),s},fromJSDate:function(o){return this.newDate(o.getFullYear(),o.getMonth()+1,o.getDate())}});var r=G.exports=new x;r.cdate=S,r.baseCalendar=e,r.calendars.gregorian=t}}),$H=Xe({"node_modules/world-calendars/dist/plus.js"(){var Z=ch(),G=Mp();Z(G.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"}),G.local=G.regionalOptions[""],Z(G.cdate.prototype,{formatDate:function(v,x){return typeof v!="string"&&(x=v,v=""),this._calendar.formatDate(v||"",this,x)}}),Z(G.baseCalendar.prototype,{UNIX_EPOCH:G.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:24*60*60,TICKS_EPOCH:G.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,x,S){if(typeof v!="string"&&(S=x,x=v,v=""),!x)return"";if(x.calendar()!==this)throw G.local.invalidFormat||G.regionalOptions[""].invalidFormat;v=v||this.local.dateFormat,S=S||{};for(var E=S.dayNamesShort||this.local.dayNamesShort,e=S.dayNames||this.local.dayNames,t=S.monthNumbers||this.local.monthNumbers,r=S.monthNamesShort||this.local.monthNamesShort,o=S.monthNames||this.local.monthNames,a=S.calculateWeek||this.local.calculateWeek,n=function(A,M){for(var g=1;w+g1},i=function(A,M,g,b){var d=""+M;if(n(A,b))for(;d.length1},_=function(R,L){var z=l(R,L),F=[2,3,z?4:2,z?4:2,10,11,20]["oyYJ@!".indexOf(R)+1],N=new RegExp("^-?\\d{1,"+F+"}"),O=x.substring(d).match(N);if(!O)throw(G.local.missingNumberAt||G.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 R=o.call(w,x.substring(d));return d+=R.length,R}return _("m")},M=function(R,L,z,F){for(var N=l(R,F)?z:L,O=0;O-1){h=1,c=m;for(var f=this.daysInMonth(s,h);c>f;f=this.daysInMonth(s,h))h++,c-=f}return i>-1?this.fromJD(i):this.newDate(s,h,c)},determineDate:function(v,x,S,E,e){S&&typeof S!="object"&&(e=E,E=S,S=null),typeof E!="string"&&(e=E,E="");var t=this,r=function(o){try{return t.parseDate(E,o,e)}catch{}o=o.toLowerCase();for(var a=(o.match(/^c/)&&S?S.newDate():null)||t.today(),n=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,i=n.exec(o);i;)a.add(parseInt(i[1],10),i[2]||"d"),i=n.exec(o);return a};return x=x?x.newDate():null,v=v==null?x:typeof v=="string"?r(v):typeof v=="number"?isNaN(v)||v===1/0||v===-1/0?x:t.today().add(v,"d"):t.newDate(v),v}})}}),QH=Xe({"node_modules/world-calendars/dist/calendars/chinese.js"(){var Z=Mp(),G=ch(),v=Z.instance();function x(i){this.local=this.regionalOptions[i||""]||this.regionalOptions[""]}x.prototype=new Z.baseCalendar,G(x.prototype,{name:"Chinese",jdEpoch:17214255e-1,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(i,s){if(typeof i=="string"){var h=i.match(E);return h?h[0]:""}var c=this._validateYear(i),m=i.month(),p=""+this.toChineseMonth(c,m);return s&&p.length<2&&(p="0"+p),this.isIntercalaryMonth(c,m)&&(p+="i"),p},monthNames:function(i){if(typeof i=="string"){var s=i.match(e);return s?s[0]:""}var h=this._validateYear(i),c=i.month(),m=this.toChineseMonth(h,c),p=["\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,c)&&(p="\u95F0"+p),p},monthNamesShort:function(i){if(typeof i=="string"){var s=i.match(t);return s?s[0]:""}var h=this._validateYear(i),c=i.month(),m=this.toChineseMonth(h,c),p=["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"][m-1];return this.isIntercalaryMonth(h,c)&&(p="\u95F0"+p),p},parseMonth:function(i,s){i=this._validateYear(i);var h=parseInt(s),c;if(isNaN(h))s[0]==="\u95F0"&&(c=!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];c=m==="i"||m==="I"}var p=this.toMonthIndex(i,h,c);return p},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},_validateYear:function(i,s){if(i.year&&(i=i.year()),typeof i!="number"||i<1888||i>2111)throw s.replace(/\{0\}/,this.local.name);return i},toMonthIndex:function(i,s,h){var c=this.intercalaryMonth(i),m=h&&s!==c;if(m||s<1||s>12)throw Z.local.invalidMonth.replace(/\{0\}/,this.local.name);var p;return c?!h&&s<=c?p=s-1:p=s:p=s-1,p},toChineseMonth:function(i,s){i.year&&(i=i.year(),s=i.month());var h=this.intercalaryMonth(i),c=h?12:11;if(s<0||s>c)throw Z.local.invalidMonth.replace(/\{0\}/,this.local.name);var m;return h?s>13;return h},isIntercalaryMonth:function(i,s){i.year&&(i=i.year(),s=i.month());var h=this.intercalaryMonth(i);return!!h&&h===s},leapYear:function(i){return this.intercalaryMonth(i)!==0},weekOfYear:function(i,s,h){var c=this._validateYear(i,Z.local.invalidyear),m=o[c-o[0]],p=m>>9&4095,T=m>>5&15,l=m&31,_;_=v.newDate(p,T,l),_.add(4-(_.dayOfWeek()||7),"d");var w=this.toJD(i,s,h)-_.toJD();return 1+Math.floor(w/7)},monthsInYear:function(i){return this.leapYear(i)?13:12},daysInMonth:function(i,s){i.year&&(s=i.month(),i=i.year()),i=this._validateYear(i);var h=r[i-r[0]],c=h>>13,m=c?12:11;if(s>m)throw Z.local.invalidMonth.replace(/\{0\}/,this.local.name);var p=h&1<<12-s?30:29;return p},weekDay:function(i,s,h){return(this.dayOfWeek(i,s,h)||7)<6},toJD:function(i,s,h){var c=this._validate(i,p,h,Z.local.invalidDate);i=this._validateYear(c.year()),s=c.month(),h=c.day();var m=this.isIntercalaryMonth(i,s),p=this.toChineseMonth(i,s),T=n(i,p,h,m);return v.toJD(T.year,T.month,T.day)},fromJD:function(i){var s=v.fromJD(i),h=a(s.year(),s.month(),s.day()),c=this.toMonthIndex(h.year,h.month,h.isIntercalary);return this.newDate(h.year,c,h.day)},fromString:function(i){var s=i.match(S),h=this._validateYear(+s[1]),c=+s[2],m=!!s[3],p=this.toMonthIndex(h,c,m),T=+s[4];return this.newDate(h,p,T)},add:function(i,s,h){var c=i.year(),m=i.month(),p=this.isIntercalaryMonth(c,m),T=this.toChineseMonth(c,m),l=Object.getPrototypeOf(x.prototype).add.call(this,i,s,h);if(h==="y"){var _=l.year(),w=l.month(),A=this.isIntercalaryMonth(_,T),M=p&&A?this.toMonthIndex(_,T,!0):this.toMonthIndex(_,T,!1);M!==w&&l.month(M)}return l}});var S=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,E=/^\d?\d[iI]?/m,e=/^闰?十?[一二三四五六七八九]?月/m,t=/^闰?十?[一二三四五六七八九]?/m;Z.calendars.chinese=x;var r=[1887,5780,5802,19157,2742,50359,1198,2646,46378,7466,3412,30122,5482,67949,2396,5294,43597,6732,6954,36181,2772,4954,18781,2396,54427,5274,6730,47781,5800,6868,21210,4790,59703,2350,5270,46667,3402,3496,38325,1388,4782,18735,2350,52374,6804,7498,44457,2906,1388,29294,4700,63789,6442,6804,56138,5802,2772,38235,1210,4698,22827,5418,63125,3476,5802,43701,2484,5302,27223,2646,70954,7466,3412,54698,5482,2412,38062,5294,2636,32038,6954,60245,2772,4826,43357,2394,5274,39501,6730,72357,5800,5844,53978,4790,2358,38039,5270,87627,3402,3496,54708,5484,4782,43311,2350,3222,27978,7498,68965,2904,5484,45677,4700,6444,39573,6804,6986,19285,2772,62811,1210,4698,47403,5418,5780,38570,5546,76469,2420,5302,51799,2646,5414,36501,3412,5546,18869,2412,54446,5276,6732,48422,6822,2900,28010,4826,92509,2394,5274,55883,6730,6820,47956,5812,2778,18779,2358,62615,5270,5450,46757,3492,5556,27318,4718,67887,2350,3222,52554,7498,3428,38252,5468,4700,31022,6444,64149,6804,6986,43861,2772,5338,35421,2650,70955,5418,5780,54954,5546,2740,38074,5302,2646,29991,3366,61011,3412,5546,43445,2412,5294,35406,6732,72998,6820,6996,52586,2778,2396,38045,5274,6698,23333,6820,64338,5812,2746,43355,2358,5270,39499,5450,79525,3492,5548],o=[1887,966732,967231,967733,968265,968766,969297,969798,970298,970829,971330,971830,972362,972863,973395,973896,974397,974928,975428,975929,976461,976962,977462,977994,978494,979026,979526,980026,980558,981059,981559,982091,982593,983124,983624,984124,984656,985157,985656,986189,986690,987191,987722,988222,988753,989254,989754,990286,990788,991288,991819,992319,992851,993352,993851,994383,994885,995385,995917,996418,996918,997450,997949,998481,998982,999483,1000014,1000515,1001016,1001548,1002047,1002578,1003080,1003580,1004111,1004613,1005113,1005645,1006146,1006645,1007177,1007678,1008209,1008710,1009211,1009743,1010243,1010743,1011275,1011775,1012306,1012807,1013308,1013840,1014341,1014841,1015373,1015874,1016404,1016905,1017405,1017937,1018438,1018939,1019471,1019972,1020471,1021002,1021503,1022035,1022535,1023036,1023568,1024069,1024568,1025100,1025601,1026102,1026633,1027133,1027666,1028167,1028666,1029198,1029699,1030199,1030730,1031231,1031763,1032264,1032764,1033296,1033797,1034297,1034828,1035329,1035830,1036362,1036861,1037393,1037894,1038394,1038925,1039427,1039927,1040459,1040959,1041491,1041992,1042492,1043023,1043524,1044024,1044556,1045057,1045558,1046090,1046590,1047121,1047622,1048122,1048654,1049154,1049655,1050187,1050689,1051219,1051720,1052220,1052751,1053252,1053752,1054284,1054786,1055285,1055817,1056317,1056849,1057349,1057850,1058382,1058883,1059383,1059915,1060415,1060947,1061447,1061947,1062479,1062981,1063480,1064012,1064514,1065014,1065545,1066045,1066577,1067078,1067578,1068110,1068611,1069112,1069642,1070142,1070674,1071175,1071675,1072207,1072709,1073209,1073740,1074241,1074741,1075273,1075773,1076305,1076807,1077308,1077839,1078340,1078840,1079372,1079871,1080403,1080904];function a(i,s,h,c){var m,p;if(typeof i=="object")m=i,p=s||{};else{var T=typeof i=="number"&&i>=1888&&i<=2111;if(!T)throw new Error("Solar year outside range 1888-2111");var l=typeof s=="number"&&s>=1&&s<=12;if(!l)throw new Error("Solar month outside range 1 - 12");var _=typeof h=="number"&&h>=1&&h<=31;if(!_)throw new Error("Solar day outside range 1 - 31");m={year:i,month:s,day:h},p=c||{}}var w=o[m.year-o[0]],A=m.year<<9|m.month<<5|m.day;p.year=A>=w?m.year:m.year-1,w=o[p.year-o[0]];var M=w>>9&4095,g=w>>5&15,b=w&31,d,u=new Date(M,g-1,b),y=new Date(m.year,m.month-1,m.day);d=Math.round((y-u)/(24*3600*1e3));var f=r[p.year-r[0]],R;for(R=0;R<13;R++){var L=f&1<<12-R?30:29;if(d>13;return!z||R=1888&&i<=2111;if(!l)throw new Error("Lunar year outside range 1888-2111");var _=typeof s=="number"&&s>=1&&s<=12;if(!_)throw new Error("Lunar month outside range 1 - 12");var w=typeof h=="number"&&h>=1&&h<=30;if(!w)throw new Error("Lunar day outside range 1 - 30");var A;typeof c=="object"?(A=!1,p=c):(A=!!c,p=m||{}),T={year:i,month:s,day:h,isIntercalary:A}}var M;M=T.day-1;var g=r[T.year-r[0]],b=g>>13,d;b&&(T.month>b||T.isIntercalary)?d=T.month:d=T.month-1;for(var u=0;u>9&4095,L=f>>5&15,z=f&31,F=new Date(R,L-1,z+M);return p.year=F.getFullYear(),p.month=1+F.getMonth(),p.day=F.getDate(),p}}}),eW=Xe({"node_modules/world-calendars/dist/calendars/coptic.js"(){var Z=Mp(),G=ch();function v(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}v.prototype=new Z.baseCalendar,G(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(E){var S=this._validate(E,this.minMonth,this.minDay,Z.local.invalidYear),E=S.year()+(S.year()<0?1:0);return E%4===3||E%4===-1},monthsInYear:function(x){return this._validate(x,this.minMonth,this.minDay,Z.local.invalidYear||Z.regionalOptions[""].invalidYear),13},weekOfYear:function(x,S,E){var e=this.newDate(x,S,E);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInMonth:function(x,S){var E=this._validate(x,S,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[E.month()-1]+(E.month()===13&&this.leapYear(E.year())?1:0)},weekDay:function(x,S,E){return(this.dayOfWeek(x,S,E)||7)<6},toJD:function(x,S,E){var e=this._validate(x,S,E,Z.local.invalidDate);return x=e.year(),x<0&&x++,e.day()+(e.month()-1)*30+(x-1)*365+Math.floor(x/4)+this.jdEpoch-1},fromJD:function(x){var S=Math.floor(x)+.5-this.jdEpoch,E=Math.floor((S-Math.floor((S+366)/1461))/365)+1;E<=0&&E--,S=Math.floor(x)+.5-this.newDate(E,1,1).toJD();var e=Math.floor(S/30)+1,t=S-(e-1)*30+1;return this.newDate(E,e,t)}}),Z.calendars.coptic=v}}),tW=Xe({"node_modules/world-calendars/dist/calendars/discworld.js"(){var Z=Mp(),G=ch();function v(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}v.prototype=new Z.baseCalendar,G(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,E,e){var t=this.newDate(S,E,e);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/8)+1},daysInMonth:function(S,E){var e=this._validate(S,E,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[e.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(S,E,e){var t=this._validate(S,E,e,Z.local.invalidDate);return(t.day()+1)%8},weekDay:function(S,E,e){var t=this.dayOfWeek(S,E,e);return t>=2&&t<=6},extraInfo:function(S,E,e){var t=this._validate(S,E,e,Z.local.invalidDate);return{century:x[Math.floor((t.year()-1)/100)+1]||""}},toJD:function(S,E,e){var t=this._validate(S,E,e,Z.local.invalidDate);return S=t.year()+(t.year()<0?1:0),E=t.month(),e=t.day(),e+(E>1?16:0)+(E>2?(E-2)*32:0)+(S-1)*400+this.jdEpoch-1},fromJD:function(S){S=Math.floor(S+.5)-Math.floor(this.jdEpoch)-1;var E=Math.floor(S/400)+1;S-=(E-1)*400,S+=S>15?16:0;var e=Math.floor(S/32)+1,t=S-(e-1)*32+1;return this.newDate(E<=0?E-1:E,e,t)}});var x={20:"Fruitbat",21:"Anchovy"};Z.calendars.discworld=v}}),rW=Xe({"node_modules/world-calendars/dist/calendars/ethiopian.js"(){var Z=Mp(),G=ch();function v(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}v.prototype=new Z.baseCalendar,G(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(E){var S=this._validate(E,this.minMonth,this.minDay,Z.local.invalidYear),E=S.year()+(S.year()<0?1:0);return E%4===3||E%4===-1},monthsInYear:function(x){return this._validate(x,this.minMonth,this.minDay,Z.local.invalidYear||Z.regionalOptions[""].invalidYear),13},weekOfYear:function(x,S,E){var e=this.newDate(x,S,E);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInMonth:function(x,S){var E=this._validate(x,S,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[E.month()-1]+(E.month()===13&&this.leapYear(E.year())?1:0)},weekDay:function(x,S,E){return(this.dayOfWeek(x,S,E)||7)<6},toJD:function(x,S,E){var e=this._validate(x,S,E,Z.local.invalidDate);return x=e.year(),x<0&&x++,e.day()+(e.month()-1)*30+(x-1)*365+Math.floor(x/4)+this.jdEpoch-1},fromJD:function(x){var S=Math.floor(x)+.5-this.jdEpoch,E=Math.floor((S-Math.floor((S+366)/1461))/365)+1;E<=0&&E--,S=Math.floor(x)+.5-this.newDate(E,1,1).toJD();var e=Math.floor(S/30)+1,t=S-(e-1)*30+1;return this.newDate(E,e,t)}}),Z.calendars.ethiopian=v}}),aW=Xe({"node_modules/world-calendars/dist/calendars/hebrew.js"(){var Z=Mp(),G=ch();function v(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}v.prototype=new Z.baseCalendar,G(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 E=this._validate(S,this.minMonth,this.minDay,Z.local.invalidYear);return this._leapYear(E.year())},_leapYear:function(S){return S=S<0?S+1:S,x(S*7+1,19)<7},monthsInYear:function(S){return this._validate(S,this.minMonth,this.minDay,Z.local.invalidYear),this._leapYear(S.year?S.year():S)?13:12},weekOfYear:function(S,E,e){var t=this.newDate(S,E,e);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInYear:function(S){var E=this._validate(S,this.minMonth,this.minDay,Z.local.invalidYear);return S=E.year(),this.toJD(S===-1?1:S+1,7,1)-this.toJD(S,7,1)},daysInMonth:function(S,E){return S.year&&(E=S.month(),S=S.year()),this._validate(S,E,this.minDay,Z.local.invalidMonth),E===12&&this.leapYear(S)||E===8&&x(this.daysInYear(S),10)===5?30:E===9&&x(this.daysInYear(S),10)===3?29:this.daysPerMonth[E-1]},weekDay:function(S,E,e){return this.dayOfWeek(S,E,e)!==6},extraInfo:function(S,E,e){var t=this._validate(S,E,e,Z.local.invalidDate);return{yearType:(this.leapYear(t)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(t)%10-3]}},toJD:function(S,E,e){var t=this._validate(S,E,e,Z.local.invalidDate);S=t.year(),E=t.month(),e=t.day();var r=S<=0?S+1:S,o=this.jdEpoch+this._delay1(r)+this._delay2(r)+e+1;if(E<7){for(var a=7;a<=this.monthsInYear(S);a++)o+=this.daysInMonth(S,a);for(var a=1;a=this.toJD(E===-1?1:E+1,7,1);)E++;for(var e=Sthis.toJD(E,e,this.daysInMonth(E,e));)e++;var t=S-this.toJD(E,e,1)+1;return this.newDate(E,e,t)}});function x(S,E){return S-E*Math.floor(S/E)}Z.calendars.hebrew=v}}),iW=Xe({"node_modules/world-calendars/dist/calendars/islamic.js"(){var Z=Mp(),G=ch();function v(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}v.prototype=new Z.baseCalendar,G(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(x){var S=this._validate(x,this.minMonth,this.minDay,Z.local.invalidYear);return(S.year()*11+14)%30<11},weekOfYear:function(x,S,E){var e=this.newDate(x,S,E);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInYear:function(x){return this.leapYear(x)?355:354},daysInMonth:function(x,S){var E=this._validate(x,S,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[E.month()-1]+(E.month()===12&&this.leapYear(E.year())?1:0)},weekDay:function(x,S,E){return this.dayOfWeek(x,S,E)!==5},toJD:function(x,S,E){var e=this._validate(x,S,E,Z.local.invalidDate);return x=e.year(),S=e.month(),E=e.day(),x=x<=0?x+1:x,E+Math.ceil(29.5*(S-1))+(x-1)*354+Math.floor((3+11*x)/30)+this.jdEpoch-1},fromJD:function(x){x=Math.floor(x)+.5;var S=Math.floor((30*(x-this.jdEpoch)+10646)/10631);S=S<=0?S-1:S;var E=Math.min(12,Math.ceil((x-29-this.toJD(S,1,1))/29.5)+1),e=x-this.toJD(S,E,1)+1;return this.newDate(S,E,e)}}),Z.calendars.islamic=v}}),nW=Xe({"node_modules/world-calendars/dist/calendars/julian.js"(){var Z=Mp(),G=ch();function v(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}v.prototype=new Z.baseCalendar,G(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(E){var S=this._validate(E,this.minMonth,this.minDay,Z.local.invalidYear),E=S.year()<0?S.year()+1:S.year();return E%4===0},weekOfYear:function(x,S,E){var e=this.newDate(x,S,E);return e.add(4-(e.dayOfWeek()||7),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInMonth:function(x,S){var E=this._validate(x,S,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[E.month()-1]+(E.month()===2&&this.leapYear(E.year())?1:0)},weekDay:function(x,S,E){return(this.dayOfWeek(x,S,E)||7)<6},toJD:function(x,S,E){var e=this._validate(x,S,E,Z.local.invalidDate);return x=e.year(),S=e.month(),E=e.day(),x<0&&x++,S<=2&&(x--,S+=12),Math.floor(365.25*(x+4716))+Math.floor(30.6001*(S+1))+E-1524.5},fromJD:function(x){var S=Math.floor(x+.5),E=S+1524,e=Math.floor((E-122.1)/365.25),t=Math.floor(365.25*e),r=Math.floor((E-t)/30.6001),o=r-Math.floor(r<14?1:13),a=e-Math.floor(o>2?4716:4715),n=E-t-Math.floor(30.6001*r);return a<=0&&a--,this.newDate(a,o,n)}}),Z.calendars.julian=v}}),oW=Xe({"node_modules/world-calendars/dist/calendars/mayan.js"(){var Z=Mp(),G=ch();function v(E){this.local=this.regionalOptions[E||""]||this.regionalOptions[""]}v.prototype=new Z.baseCalendar,G(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(E){return this._validate(E,this.minMonth,this.minDay,Z.local.invalidYear),!1},formatYear:function(E){var e=this._validate(E,this.minMonth,this.minDay,Z.local.invalidYear);E=e.year();var t=Math.floor(E/400);E=E%400,E+=E<0?400:0;var r=Math.floor(E/20);return t+"."+r+"."+E%20},forYear:function(E){if(E=E.split("."),E.length<3)throw"Invalid Mayan year";for(var e=0,t=0;t19||t>0&&r<0)throw"Invalid Mayan year";e=e*20+r}return e},monthsInYear:function(E){return this._validate(E,this.minMonth,this.minDay,Z.local.invalidYear),18},weekOfYear:function(E,e,t){return this._validate(E,e,t,Z.local.invalidDate),0},daysInYear:function(E){return this._validate(E,this.minMonth,this.minDay,Z.local.invalidYear),360},daysInMonth:function(E,e){return this._validate(E,e,this.minDay,Z.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(E,e,t){var r=this._validate(E,e,t,Z.local.invalidDate);return r.day()},weekDay:function(E,e,t){return this._validate(E,e,t,Z.local.invalidDate),!0},extraInfo:function(E,e,t){var r=this._validate(E,e,t,Z.local.invalidDate),o=r.toJD(),a=this._toHaab(o),n=this._toTzolkin(o);return{haabMonthName:this.local.haabMonths[a[0]-1],haabMonth:a[0],haabDay:a[1],tzolkinDayName:this.local.tzolkinMonths[n[0]-1],tzolkinDay:n[0],tzolkinTrecena:n[1]}},_toHaab:function(E){E-=this.jdEpoch;var e=x(E+8+17*20,365);return[Math.floor(e/20)+1,x(e,20)]},_toTzolkin:function(E){return E-=this.jdEpoch,[S(E+20,20),S(E+4,13)]},toJD:function(E,e,t){var r=this._validate(E,e,t,Z.local.invalidDate);return r.day()+r.month()*20+r.year()*360+this.jdEpoch},fromJD:function(E){E=Math.floor(E)+.5-this.jdEpoch;var e=Math.floor(E/360);E=E%360,E+=E<0?360:0;var t=Math.floor(E/20),r=E%20;return this.newDate(e,t,r)}});function x(E,e){return E-e*Math.floor(E/e)}function S(E,e){return x(E-1,e)+1}Z.calendars.mayan=v}}),sW=Xe({"node_modules/world-calendars/dist/calendars/nanakshahi.js"(){var Z=Mp(),G=ch();function v(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}v.prototype=new Z.baseCalendar;var x=Z.instance("gregorian");G(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 E=this._validate(S,this.minMonth,this.minDay,Z.local.invalidYear||Z.regionalOptions[""].invalidYear);return x.leapYear(E.year()+(E.year()<1?1:0)+1469)},weekOfYear:function(S,E,e){var t=this.newDate(S,E,e);return t.add(1-(t.dayOfWeek()||7),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInMonth:function(S,E){var e=this._validate(S,E,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[e.month()-1]+(e.month()===12&&this.leapYear(e.year())?1:0)},weekDay:function(S,E,e){return(this.dayOfWeek(S,E,e)||7)<6},toJD:function(r,E,e){var t=this._validate(r,E,e,Z.local.invalidMonth),r=t.year();r<0&&r++;for(var o=t.day(),a=1;a=this.toJD(E+1,1,1);)E++;for(var e=S-Math.floor(this.toJD(E,1,1)+.5)+1,t=1;e>this.daysInMonth(E,t);)e-=this.daysInMonth(E,t),t++;return this.newDate(E,t,e)}}),Z.calendars.nanakshahi=v}}),lW=Xe({"node_modules/world-calendars/dist/calendars/nepali.js"(){var Z=Mp(),G=ch();function v(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}v.prototype=new Z.baseCalendar,G(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(x){return this.daysInYear(x)!==this.daysPerYear},weekOfYear:function(x,S,E){var e=this.newDate(x,S,E);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInYear:function(x){var S=this._validate(x,this.minMonth,this.minDay,Z.local.invalidYear);if(x=S.year(),typeof this.NEPALI_CALENDAR_DATA[x]>"u")return this.daysPerYear;for(var E=0,e=this.minMonth;e<=12;e++)E+=this.NEPALI_CALENDAR_DATA[x][e];return E},daysInMonth:function(x,S){return x.year&&(S=x.month(),x=x.year()),this._validate(x,S,this.minDay,Z.local.invalidMonth),typeof this.NEPALI_CALENDAR_DATA[x]>"u"?this.daysPerMonth[S-1]:this.NEPALI_CALENDAR_DATA[x][S]},weekDay:function(x,S,E){return this.dayOfWeek(x,S,E)!==6},toJD:function(x,S,E){var e=this._validate(x,S,E,Z.local.invalidDate);x=e.year(),S=e.month(),E=e.day();var t=Z.instance(),r=0,o=S,a=x;this._createMissingCalendarData(x);var n=x-(o>9||o===9&&E>=this.NEPALI_CALENDAR_DATA[a][0]?56:57);for(S!==9&&(r=E,o--);o!==9;)o<=0&&(o=12,a--),r+=this.NEPALI_CALENDAR_DATA[a][o],o--;return S===9?(r+=E-this.NEPALI_CALENDAR_DATA[a][0],r<0&&(r+=t.daysInYear(n))):r+=this.NEPALI_CALENDAR_DATA[a][9]-this.NEPALI_CALENDAR_DATA[a][0],t.newDate(n,1,1).add(r,"d").toJD()},fromJD:function(x){var S=Z.instance(),E=S.fromJD(x),e=E.year(),t=E.dayOfYear(),r=e+56;this._createMissingCalendarData(r);for(var o=9,a=this.NEPALI_CALENDAR_DATA[r][0],n=this.NEPALI_CALENDAR_DATA[r][o]-a+1;t>n;)o++,o>12&&(o=1,r++),n+=this.NEPALI_CALENDAR_DATA[r][o];var i=this.NEPALI_CALENDAR_DATA[r][o]-(n-t);return this.newDate(r,o,i)},_createMissingCalendarData:function(x){var S=this.daysPerMonth.slice(0);S.unshift(17);for(var E=x-1;E"u"&&(this.NEPALI_CALENDAR_DATA[E]=S)},NEPALI_CALENDAR_DATA:{1970:[18,31,31,32,31,31,31,30,29,30,29,30,30],1971:[18,31,31,32,31,32,30,30,29,30,29,30,30],1972:[17,31,32,31,32,31,30,30,30,29,29,30,30],1973:[19,30,32,31,32,31,30,30,30,29,30,29,31],1974:[19,31,31,32,30,31,31,30,29,30,29,30,30],1975:[18,31,31,32,32,30,31,30,29,30,29,30,30],1976:[17,31,32,31,32,31,30,30,30,29,29,30,31],1977:[18,31,32,31,32,31,31,29,30,29,30,29,31],1978:[18,31,31,32,31,31,31,30,29,30,29,30,30],1979:[18,31,31,32,32,31,30,30,29,30,29,30,30],1980:[17,31,32,31,32,31,30,30,30,29,29,30,31],1981:[18,31,31,31,32,31,31,29,30,30,29,30,30],1982:[18,31,31,32,31,31,31,30,29,30,29,30,30],1983:[18,31,31,32,32,31,30,30,29,30,29,30,30],1984:[17,31,32,31,32,31,30,30,30,29,29,30,31],1985:[18,31,31,31,32,31,31,29,30,30,29,30,30],1986:[18,31,31,32,31,31,31,30,29,30,29,30,30],1987:[18,31,32,31,32,31,30,30,29,30,29,30,30],1988:[17,31,32,31,32,31,30,30,30,29,29,30,31],1989:[18,31,31,31,32,31,31,30,29,30,29,30,30],1990:[18,31,31,32,31,31,31,30,29,30,29,30,30],1991:[18,31,32,31,32,31,30,30,29,30,29,30,30],1992:[17,31,32,31,32,31,30,30,30,29,30,29,31],1993:[18,31,31,31,32,31,31,30,29,30,29,30,30],1994:[18,31,31,32,31,31,31,30,29,30,29,30,30],1995:[17,31,32,31,32,31,30,30,30,29,29,30,30],1996:[17,31,32,31,32,31,30,30,30,29,30,29,31],1997:[18,31,31,32,31,31,31,30,29,30,29,30,30],1998:[18,31,31,32,31,31,31,30,29,30,29,30,30],1999:[17,31,32,31,32,31,30,30,30,29,29,30,31],2e3:[17,30,32,31,32,31,30,30,30,29,30,29,31],2001:[18,31,31,32,31,31,31,30,29,30,29,30,30],2002:[18,31,31,32,32,31,30,30,29,30,29,30,30],2003:[17,31,32,31,32,31,30,30,30,29,29,30,31],2004:[17,30,32,31,32,31,30,30,30,29,30,29,31],2005:[18,31,31,32,31,31,31,30,29,30,29,30,30],2006:[18,31,31,32,32,31,30,30,29,30,29,30,30],2007:[17,31,32,31,32,31,30,30,30,29,29,30,31],2008:[17,31,31,31,32,31,31,29,30,30,29,29,31],2009:[18,31,31,32,31,31,31,30,29,30,29,30,30],2010:[18,31,31,32,32,31,30,30,29,30,29,30,30],2011:[17,31,32,31,32,31,30,30,30,29,29,30,31],2012:[17,31,31,31,32,31,31,29,30,30,29,30,30],2013:[18,31,31,32,31,31,31,30,29,30,29,30,30],2014:[18,31,31,32,32,31,30,30,29,30,29,30,30],2015:[17,31,32,31,32,31,30,30,30,29,29,30,31],2016:[17,31,31,31,32,31,31,29,30,30,29,30,30],2017:[18,31,31,32,31,31,31,30,29,30,29,30,30],2018:[18,31,32,31,32,31,30,30,29,30,29,30,30],2019:[17,31,32,31,32,31,30,30,30,29,30,29,31],2020:[17,31,31,31,32,31,31,30,29,30,29,30,30],2021:[18,31,31,32,31,31,31,30,29,30,29,30,30],2022:[17,31,32,31,32,31,30,30,30,29,29,30,30],2023:[17,31,32,31,32,31,30,30,30,29,30,29,31],2024:[17,31,31,31,32,31,31,30,29,30,29,30,30],2025:[18,31,31,32,31,31,31,30,29,30,29,30,30],2026:[17,31,32,31,32,31,30,30,30,29,29,30,31],2027:[17,30,32,31,32,31,30,30,30,29,30,29,31],2028:[17,31,31,32,31,31,31,30,29,30,29,30,30],2029:[18,31,31,32,31,32,30,30,29,30,29,30,30],2030:[17,31,32,31,32,31,30,30,30,30,30,30,31],2031:[17,31,32,31,32,31,31,31,31,31,31,31,31],2032:[17,32,32,32,32,32,32,32,32,32,32,32,32],2033:[18,31,31,32,32,31,30,30,29,30,29,30,30],2034:[17,31,32,31,32,31,30,30,30,29,29,30,31],2035:[17,30,32,31,32,31,31,29,30,30,29,29,31],2036:[17,31,31,32,31,31,31,30,29,30,29,30,30],2037:[18,31,31,32,32,31,30,30,29,30,29,30,30],2038:[17,31,32,31,32,31,30,30,30,29,29,30,31],2039:[17,31,31,31,32,31,31,29,30,30,29,30,30],2040:[17,31,31,32,31,31,31,30,29,30,29,30,30],2041:[18,31,31,32,32,31,30,30,29,30,29,30,30],2042:[17,31,32,31,32,31,30,30,30,29,29,30,31],2043:[17,31,31,31,32,31,31,29,30,30,29,30,30],2044:[17,31,31,32,31,31,31,30,29,30,29,30,30],2045:[18,31,32,31,32,31,30,30,29,30,29,30,30],2046:[17,31,32,31,32,31,30,30,30,29,29,30,31],2047:[17,31,31,31,32,31,31,30,29,30,29,30,30],2048:[17,31,31,32,31,31,31,30,29,30,29,30,30],2049:[17,31,32,31,32,31,30,30,30,29,29,30,30],2050:[17,31,32,31,32,31,30,30,30,29,30,29,31],2051:[17,31,31,31,32,31,31,30,29,30,29,30,30],2052:[17,31,31,32,31,31,31,30,29,30,29,30,30],2053:[17,31,32,31,32,31,30,30,30,29,29,30,30],2054:[17,31,32,31,32,31,30,30,30,29,30,29,31],2055:[17,31,31,32,31,31,31,30,29,30,30,29,30],2056:[17,31,31,32,31,32,30,30,29,30,29,30,30],2057:[17,31,32,31,32,31,30,30,30,29,29,30,31],2058:[17,30,32,31,32,31,30,30,30,29,30,29,31],2059:[17,31,31,32,31,31,31,30,29,30,29,30,30],2060:[17,31,31,32,32,31,30,30,29,30,29,30,30],2061:[17,31,32,31,32,31,30,30,30,29,29,30,31],2062:[17,30,32,31,32,31,31,29,30,29,30,29,31],2063:[17,31,31,32,31,31,31,30,29,30,29,30,30],2064:[17,31,31,32,32,31,30,30,29,30,29,30,30],2065:[17,31,32,31,32,31,30,30,30,29,29,30,31],2066:[17,31,31,31,32,31,31,29,30,30,29,29,31],2067:[17,31,31,32,31,31,31,30,29,30,29,30,30],2068:[17,31,31,32,32,31,30,30,29,30,29,30,30],2069:[17,31,32,31,32,31,30,30,30,29,29,30,31],2070:[17,31,31,31,32,31,31,29,30,30,29,30,30],2071:[17,31,31,32,31,31,31,30,29,30,29,30,30],2072:[17,31,32,31,32,31,30,30,29,30,29,30,30],2073:[17,31,32,31,32,31,30,30,30,29,29,30,31],2074:[17,31,31,31,32,31,31,30,29,30,29,30,30],2075:[17,31,31,32,31,31,31,30,29,30,29,30,30],2076:[16,31,32,31,32,31,30,30,30,29,29,30,30],2077:[17,31,32,31,32,31,30,30,30,29,30,29,31],2078:[17,31,31,31,32,31,31,30,29,30,29,30,30],2079:[17,31,31,32,31,31,31,30,29,30,29,30,30],2080:[16,31,32,31,32,31,30,30,30,29,29,30,30],2081:[17,31,31,32,32,31,30,30,30,29,30,30,30],2082:[17,31,32,31,32,31,30,30,30,29,30,30,30],2083:[17,31,31,32,31,31,30,30,30,29,30,30,30],2084:[17,31,31,32,31,31,30,30,30,29,30,30,30],2085:[17,31,32,31,32,31,31,30,30,29,30,30,30],2086:[17,31,32,31,32,31,30,30,30,29,30,30,30],2087:[16,31,31,32,31,31,31,30,30,29,30,30,30],2088:[16,30,31,32,32,30,31,30,30,29,30,30,30],2089:[17,31,32,31,32,31,30,30,30,29,30,30,30],2090:[17,31,32,31,32,31,30,30,30,29,30,30,30],2091:[16,31,31,32,31,31,31,30,30,29,30,30,30],2092:[16,31,31,32,32,31,30,30,30,29,30,30,30],2093:[17,31,32,31,32,31,30,30,30,29,30,30,30],2094:[17,31,31,32,31,31,30,30,30,29,30,30,30],2095:[17,31,31,32,31,31,31,30,29,30,30,30,30],2096:[17,30,31,32,32,31,30,30,29,30,29,30,30],2097:[17,31,32,31,32,31,30,30,30,29,30,30,30],2098:[17,31,31,32,31,31,31,29,30,29,30,30,31],2099:[17,31,31,32,31,31,31,30,29,29,30,30,30],2100:[17,31,32,31,32,30,31,30,29,30,29,30,30]}}),Z.calendars.nepali=v}}),uW=Xe({"node_modules/world-calendars/dist/calendars/persian.js"(){var Z=Mp(),G=ch();function v(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}function x(S){var E=S-475;S<0&&E++;var e=.242197,t=e*E,r=e*(E+1),o=t-Math.floor(t),a=r-Math.floor(r);return o>a}v.prototype=new Z.baseCalendar,G(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 E=this._validate(S,this.minMonth,this.minDay,Z.local.invalidYear);return x(E.year())},weekOfYear:function(S,E,e){var t=this.newDate(S,E,e);return t.add(-((t.dayOfWeek()+1)%7),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInMonth:function(S,E){var e=this._validate(S,E,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[e.month()-1]+(e.month()===12&&this.leapYear(e.year())?1:0)},weekDay:function(S,E,e){return this.dayOfWeek(S,E,e)!==5},toJD:function(S,E,e){var t=this._validate(S,E,e,Z.local.invalidDate);S=t.year(),E=t.month(),e=t.day();var r=0;if(S>0)for(var o=1;o0?S-1:S)*365+r+this.jdEpoch-1},fromJD:function(S){S=Math.floor(S)+.5;var E=475+(S-this.toJD(475,1,1))/365.242197,e=Math.floor(E);e<=0&&e--,S>this.toJD(e,12,x(e)?30:29)&&(e++,e===0&&e++);var t=S-this.toJD(e,1,1)+1,r=t<=186?Math.ceil(t/31):Math.ceil((t-6)/30),o=S-this.toJD(e,r,1)+1;return this.newDate(e,r,o)}}),Z.calendars.persian=v,Z.calendars.jalali=v}}),cW=Xe({"node_modules/world-calendars/dist/calendars/taiwan.js"(){var Z=Mp(),G=ch(),v=Z.instance();function x(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}x.prototype=new Z.baseCalendar,G(x.prototype,{name:"Taiwan",jdEpoch:24194025e-1,yearsOffset:1911,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Taiwan",epochs:["BROC","ROC"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},leapYear:function(e){var E=this._validate(e,this.minMonth,this.minDay,Z.local.invalidYear),e=this._t2gYear(E.year());return v.leapYear(e)},weekOfYear:function(r,E,e){var t=this._validate(r,this.minMonth,this.minDay,Z.local.invalidYear),r=this._t2gYear(t.year());return v.weekOfYear(r,t.month(),t.day())},daysInMonth:function(S,E){var e=this._validate(S,E,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[e.month()-1]+(e.month()===2&&this.leapYear(e.year())?1:0)},weekDay:function(S,E,e){return(this.dayOfWeek(S,E,e)||7)<6},toJD:function(r,E,e){var t=this._validate(r,E,e,Z.local.invalidDate),r=this._t2gYear(t.year());return v.toJD(r,t.month(),t.day())},fromJD:function(S){var E=v.fromJD(S),e=this._g2tYear(E.year());return this.newDate(e,E.month(),E.day())},_t2gYear:function(S){return S+this.yearsOffset+(S>=-this.yearsOffset&&S<=-1?1:0)},_g2tYear:function(S){return S-this.yearsOffset-(S>=1&&S<=this.yearsOffset?1:0)}}),Z.calendars.taiwan=x}}),fW=Xe({"node_modules/world-calendars/dist/calendars/thai.js"(){var Z=Mp(),G=ch(),v=Z.instance();function x(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}x.prototype=new Z.baseCalendar,G(x.prototype,{name:"Thai",jdEpoch:15230985e-1,yearsOffset:543,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Thai",epochs:["BBE","BE"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(e){var E=this._validate(e,this.minMonth,this.minDay,Z.local.invalidYear),e=this._t2gYear(E.year());return v.leapYear(e)},weekOfYear:function(r,E,e){var t=this._validate(r,this.minMonth,this.minDay,Z.local.invalidYear),r=this._t2gYear(t.year());return v.weekOfYear(r,t.month(),t.day())},daysInMonth:function(S,E){var e=this._validate(S,E,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[e.month()-1]+(e.month()===2&&this.leapYear(e.year())?1:0)},weekDay:function(S,E,e){return(this.dayOfWeek(S,E,e)||7)<6},toJD:function(r,E,e){var t=this._validate(r,E,e,Z.local.invalidDate),r=this._t2gYear(t.year());return v.toJD(r,t.month(),t.day())},fromJD:function(S){var E=v.fromJD(S),e=this._g2tYear(E.year());return this.newDate(e,E.month(),E.day())},_t2gYear:function(S){return S-this.yearsOffset-(S>=1&&S<=this.yearsOffset?1:0)},_g2tYear:function(S){return S+this.yearsOffset+(S>=-this.yearsOffset&&S<=-1?1:0)}}),Z.calendars.thai=x}}),hW=Xe({"node_modules/world-calendars/dist/calendars/ummalqura.js"(){var Z=Mp(),G=ch();function v(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}v.prototype=new Z.baseCalendar,G(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 E=this._validate(S,this.minMonth,this.minDay,Z.local.invalidYear);return this.daysInYear(E.year())===355},weekOfYear:function(S,E,e){var t=this.newDate(S,E,e);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInYear:function(S){for(var E=0,e=1;e<=12;e++)E+=this.daysInMonth(S,e);return E},daysInMonth:function(S,E){for(var e=this._validate(S,E,this.minDay,Z.local.invalidMonth),t=e.toJD()-24e5+.5,r=0,o=0;ot)return x[r]-x[r-1];r++}return 30},weekDay:function(S,E,e){return this.dayOfWeek(S,E,e)!==5},toJD:function(S,E,e){var t=this._validate(S,E,e,Z.local.invalidDate),r=12*(t.year()-1)+t.month()-15292,o=t.day()+x[r-1]-1;return o+24e5-.5},fromJD:function(S){for(var E=S-24e5+.5,e=0,t=0;tE);t++)e++;var r=e+15292,o=Math.floor((r-1)/12),a=o+1,n=r-12*o,i=E-x[e-1]+1;return this.newDate(a,n,i)},isValid:function(S,E,e){var t=Z.baseCalendar.prototype.isValid.apply(this,arguments);return t&&(S=S.year!=null?S.year:S,t=S>=1276&&S<=1500),t},_validate:function(S,E,e,t){var r=Z.baseCalendar.prototype._validate.apply(this,arguments);if(r.year<1276||r.year>1500)throw t.replace(/\{0\}/,this.local.name);return r}}),Z.calendars.ummalqura=v;var x=[20,50,79,109,138,168,197,227,256,286,315,345,374,404,433,463,492,522,551,581,611,641,670,700,729,759,788,818,847,877,906,936,965,995,1024,1054,1083,1113,1142,1172,1201,1231,1260,1290,1320,1350,1379,1409,1438,1468,1497,1527,1556,1586,1615,1645,1674,1704,1733,1763,1792,1822,1851,1881,1910,1940,1969,1999,2028,2058,2087,2117,2146,2176,2205,2235,2264,2294,2323,2353,2383,2413,2442,2472,2501,2531,2560,2590,2619,2649,2678,2708,2737,2767,2796,2826,2855,2885,2914,2944,2973,3003,3032,3062,3091,3121,3150,3180,3209,3239,3268,3298,3327,3357,3386,3416,3446,3476,3505,3535,3564,3594,3623,3653,3682,3712,3741,3771,3800,3830,3859,3889,3918,3948,3977,4007,4036,4066,4095,4125,4155,4185,4214,4244,4273,4303,4332,4362,4391,4421,4450,4480,4509,4539,4568,4598,4627,4657,4686,4716,4745,4775,4804,4834,4863,4893,4922,4952,4981,5011,5040,5070,5099,5129,5158,5188,5218,5248,5277,5307,5336,5366,5395,5425,5454,5484,5513,5543,5572,5602,5631,5661,5690,5720,5749,5779,5808,5838,5867,5897,5926,5956,5985,6015,6044,6074,6103,6133,6162,6192,6221,6251,6281,6311,6340,6370,6399,6429,6458,6488,6517,6547,6576,6606,6635,6665,6694,6724,6753,6783,6812,6842,6871,6901,6930,6960,6989,7019,7048,7078,7107,7137,7166,7196,7225,7255,7284,7314,7344,7374,7403,7433,7462,7492,7521,7551,7580,7610,7639,7669,7698,7728,7757,7787,7816,7846,7875,7905,7934,7964,7993,8023,8053,8083,8112,8142,8171,8201,8230,8260,8289,8319,8348,8378,8407,8437,8466,8496,8525,8555,8584,8614,8643,8673,8702,8732,8761,8791,8821,8850,8880,8909,8938,8968,8997,9027,9056,9086,9115,9145,9175,9205,9234,9264,9293,9322,9352,9381,9410,9440,9470,9499,9529,9559,9589,9618,9648,9677,9706,9736,9765,9794,9824,9853,9883,9913,9943,9972,10002,10032,10061,10090,10120,10149,10178,10208,10237,10267,10297,10326,10356,10386,10415,10445,10474,10504,10533,10562,10592,10621,10651,10680,10710,10740,10770,10799,10829,10858,10888,10917,10947,10976,11005,11035,11064,11094,11124,11153,11183,11213,11242,11272,11301,11331,11360,11389,11419,11448,11478,11507,11537,11567,11596,11626,11655,11685,11715,11744,11774,11803,11832,11862,11891,11921,11950,11980,12010,12039,12069,12099,12128,12158,12187,12216,12246,12275,12304,12334,12364,12393,12423,12453,12483,12512,12542,12571,12600,12630,12659,12688,12718,12747,12777,12807,12837,12866,12896,12926,12955,12984,13014,13043,13072,13102,13131,13161,13191,13220,13250,13280,13310,13339,13368,13398,13427,13456,13486,13515,13545,13574,13604,13634,13664,13693,13723,13752,13782,13811,13840,13870,13899,13929,13958,13988,14018,14047,14077,14107,14136,14166,14195,14224,14254,14283,14313,14342,14372,14401,14431,14461,14490,14520,14550,14579,14609,14638,14667,14697,14726,14756,14785,14815,14844,14874,14904,14933,14963,14993,15021,15051,15081,15110,15140,15169,15199,15228,15258,15287,15317,15347,15377,15406,15436,15465,15494,15524,15553,15582,15612,15641,15671,15701,15731,15760,15790,15820,15849,15878,15908,15937,15966,15996,16025,16055,16085,16114,16144,16174,16204,16233,16262,16292,16321,16350,16380,16409,16439,16468,16498,16528,16558,16587,16617,16646,16676,16705,16734,16764,16793,16823,16852,16882,16912,16941,16971,17001,17030,17060,17089,17118,17148,17177,17207,17236,17266,17295,17325,17355,17384,17414,17444,17473,17502,17532,17561,17591,17620,17650,17679,17709,17738,17768,17798,17827,17857,17886,17916,17945,17975,18004,18034,18063,18093,18122,18152,18181,18211,18241,18270,18300,18330,18359,18388,18418,18447,18476,18506,18535,18565,18595,18625,18654,18684,18714,18743,18772,18802,18831,18860,18890,18919,18949,18979,19008,19038,19068,19098,19127,19156,19186,19215,19244,19274,19303,19333,19362,19392,19422,19452,19481,19511,19540,19570,19599,19628,19658,19687,19717,19746,19776,19806,19836,19865,19895,19924,19954,19983,20012,20042,20071,20101,20130,20160,20190,20219,20249,20279,20308,20338,20367,20396,20426,20455,20485,20514,20544,20573,20603,20633,20662,20692,20721,20751,20780,20810,20839,20869,20898,20928,20957,20987,21016,21046,21076,21105,21135,21164,21194,21223,21253,21282,21312,21341,21371,21400,21430,21459,21489,21519,21548,21578,21607,21637,21666,21696,21725,21754,21784,21813,21843,21873,21902,21932,21962,21991,22021,22050,22080,22109,22138,22168,22197,22227,22256,22286,22316,22346,22375,22405,22434,22464,22493,22522,22552,22581,22611,22640,22670,22700,22730,22759,22789,22818,22848,22877,22906,22936,22965,22994,23024,23054,23083,23113,23143,23173,23202,23232,23261,23290,23320,23349,23379,23408,23438,23467,23497,23527,23556,23586,23616,23645,23674,23704,23733,23763,23792,23822,23851,23881,23910,23940,23970,23999,24029,24058,24088,24117,24147,24176,24206,24235,24265,24294,24324,24353,24383,24413,24442,24472,24501,24531,24560,24590,24619,24648,24678,24707,24737,24767,24796,24826,24856,24885,24915,24944,24974,25003,25032,25062,25091,25121,25150,25180,25210,25240,25269,25299,25328,25358,25387,25416,25446,25475,25505,25534,25564,25594,25624,25653,25683,25712,25742,25771,25800,25830,25859,25888,25918,25948,25977,26007,26037,26067,26096,26126,26155,26184,26214,26243,26272,26302,26332,26361,26391,26421,26451,26480,26510,26539,26568,26598,26627,26656,26686,26715,26745,26775,26805,26834,26864,26893,26923,26952,26982,27011,27041,27070,27099,27129,27159,27188,27218,27248,27277,27307,27336,27366,27395,27425,27454,27484,27513,27542,27572,27602,27631,27661,27691,27720,27750,27779,27809,27838,27868,27897,27926,27956,27985,28015,28045,28074,28104,28134,28163,28193,28222,28252,28281,28310,28340,28369,28399,28428,28458,28488,28517,28547,28577,28607,28636,28665,28695,28724,28754,28783,28813,28843,28872,28901,28931,28960,28990,29019,29049,29078,29108,29137,29167,29196,29226,29255,29285,29315,29345,29375,29404,29434,29463,29492,29522,29551,29580,29610,29640,29669,29699,29729,29759,29788,29818,29847,29876,29906,29935,29964,29994,30023,30053,30082,30112,30141,30171,30200,30230,30259,30289,30318,30348,30378,30408,30437,30467,30496,30526,30555,30585,30614,30644,30673,30703,30732,30762,30791,30821,30850,30880,30909,30939,30968,30998,31027,31057,31086,31116,31145,31175,31204,31234,31263,31293,31322,31352,31381,31411,31441,31471,31500,31530,31559,31589,31618,31648,31676,31706,31736,31766,31795,31825,31854,31884,31913,31943,31972,32002,32031,32061,32090,32120,32150,32180,32209,32239,32268,32298,32327,32357,32386,32416,32445,32475,32504,32534,32563,32593,32622,32652,32681,32711,32740,32770,32799,32829,32858,32888,32917,32947,32976,33006,33035,33065,33094,33124,33153,33183,33213,33243,33272,33302,33331,33361,33390,33420,33450,33479,33509,33539,33568,33598,33627,33657,33686,33716,33745,33775,33804,33834,33863,33893,33922,33952,33981,34011,34040,34069,34099,34128,34158,34187,34217,34247,34277,34306,34336,34365,34395,34424,34454,34483,34512,34542,34571,34601,34631,34660,34690,34719,34749,34778,34808,34837,34867,34896,34926,34955,34985,35015,35044,35074,35103,35133,35162,35192,35222,35251,35280,35310,35340,35370,35399,35429,35458,35488,35517,35547,35576,35605,35635,35665,35694,35723,35753,35782,35811,35841,35871,35901,35930,35960,35989,36019,36048,36078,36107,36136,36166,36195,36225,36254,36284,36314,36343,36373,36403,36433,36462,36492,36521,36551,36580,36610,36639,36669,36698,36728,36757,36786,36816,36845,36875,36904,36934,36963,36993,37022,37052,37081,37111,37141,37170,37200,37229,37259,37288,37318,37347,37377,37406,37436,37465,37495,37524,37554,37584,37613,37643,37672,37701,37731,37760,37790,37819,37849,37878,37908,37938,37967,37997,38027,38056,38085,38115,38144,38174,38203,38233,38262,38292,38322,38351,38381,38410,38440,38469,38499,38528,38558,38587,38617,38646,38676,38705,38735,38764,38794,38823,38853,38882,38912,38941,38971,39001,39030,39059,39089,39118,39148,39178,39208,39237,39267,39297,39326,39355,39385,39414,39444,39473,39503,39532,39562,39592,39621,39650,39680,39709,39739,39768,39798,39827,39857,39886,39916,39946,39975,40005,40035,40064,40094,40123,40153,40182,40212,40241,40271,40300,40330,40359,40389,40418,40448,40477,40507,40536,40566,40595,40625,40655,40685,40714,40744,40773,40803,40832,40862,40892,40921,40951,40980,41009,41039,41068,41098,41127,41157,41186,41216,41245,41275,41304,41334,41364,41393,41422,41452,41481,41511,41540,41570,41599,41629,41658,41688,41718,41748,41777,41807,41836,41865,41894,41924,41953,41983,42012,42042,42072,42102,42131,42161,42190,42220,42249,42279,42308,42337,42367,42397,42426,42456,42485,42515,42545,42574,42604,42633,42662,42692,42721,42751,42780,42810,42839,42869,42899,42929,42958,42988,43017,43046,43076,43105,43135,43164,43194,43223,43253,43283,43312,43342,43371,43401,43430,43460,43489,43519,43548,43578,43607,43637,43666,43696,43726,43755,43785,43814,43844,43873,43903,43932,43962,43991,44021,44050,44080,44109,44139,44169,44198,44228,44258,44287,44317,44346,44375,44405,44434,44464,44493,44523,44553,44582,44612,44641,44671,44700,44730,44759,44788,44818,44847,44877,44906,44936,44966,44996,45025,45055,45084,45114,45143,45172,45202,45231,45261,45290,45320,45350,45380,45409,45439,45468,45498,45527,45556,45586,45615,45644,45674,45704,45733,45763,45793,45823,45852,45882,45911,45940,45970,45999,46028,46058,46088,46117,46147,46177,46206,46236,46265,46295,46324,46354,46383,46413,46442,46472,46501,46531,46560,46590,46620,46649,46679,46708,46738,46767,46797,46826,46856,46885,46915,46944,46974,47003,47033,47063,47092,47122,47151,47181,47210,47240,47269,47298,47328,47357,47387,47417,47446,47476,47506,47535,47565,47594,47624,47653,47682,47712,47741,47771,47800,47830,47860,47890,47919,47949,47978,48008,48037,48066,48096,48125,48155,48184,48214,48244,48273,48303,48333,48362,48392,48421,48450,48480,48509,48538,48568,48598,48627,48657,48687,48717,48746,48776,48805,48834,48864,48893,48922,48952,48982,49011,49041,49071,49100,49130,49160,49189,49218,49248,49277,49306,49336,49365,49395,49425,49455,49484,49514,49543,49573,49602,49632,49661,49690,49720,49749,49779,49809,49838,49868,49898,49927,49957,49986,50016,50045,50075,50104,50133,50163,50192,50222,50252,50281,50311,50340,50370,50400,50429,50459,50488,50518,50547,50576,50606,50635,50665,50694,50724,50754,50784,50813,50843,50872,50902,50931,50960,50990,51019,51049,51078,51108,51138,51167,51197,51227,51256,51286,51315,51345,51374,51403,51433,51462,51492,51522,51552,51582,51611,51641,51670,51699,51729,51758,51787,51816,51846,51876,51906,51936,51965,51995,52025,52054,52083,52113,52142,52171,52200,52230,52260,52290,52319,52349,52379,52408,52438,52467,52497,52526,52555,52585,52614,52644,52673,52703,52733,52762,52792,52822,52851,52881,52910,52939,52969,52998,53028,53057,53087,53116,53146,53176,53205,53235,53264,53294,53324,53353,53383,53412,53441,53471,53500,53530,53559,53589,53619,53648,53678,53708,53737,53767,53796,53825,53855,53884,53913,53943,53973,54003,54032,54062,54092,54121,54151,54180,54209,54239,54268,54297,54327,54357,54387,54416,54446,54476,54505,54535,54564,54593,54623,54652,54681,54711,54741,54770,54800,54830,54859,54889,54919,54948,54977,55007,55036,55066,55095,55125,55154,55184,55213,55243,55273,55302,55332,55361,55391,55420,55450,55479,55508,55538,55567,55597,55627,55657,55686,55716,55745,55775,55804,55834,55863,55892,55922,55951,55981,56011,56040,56070,56100,56129,56159,56188,56218,56247,56276,56306,56335,56365,56394,56424,56454,56483,56513,56543,56572,56601,56631,56660,56690,56719,56749,56778,56808,56837,56867,56897,56926,56956,56985,57015,57044,57074,57103,57133,57162,57192,57221,57251,57280,57310,57340,57369,57399,57429,57458,57487,57517,57546,57576,57605,57634,57664,57694,57723,57753,57783,57813,57842,57871,57901,57930,57959,57989,58018,58048,58077,58107,58137,58167,58196,58226,58255,58285,58314,58343,58373,58402,58432,58461,58491,58521,58551,58580,58610,58639,58669,58698,58727,58757,58786,58816,58845,58875,58905,58934,58964,58994,59023,59053,59082,59111,59141,59170,59200,59229,59259,59288,59318,59348,59377,59407,59436,59466,59495,59525,59554,59584,59613,59643,59672,59702,59731,59761,59791,59820,59850,59879,59909,59939,59968,59997,60027,60056,60086,60115,60145,60174,60204,60234,60264,60293,60323,60352,60381,60411,60440,60469,60499,60528,60558,60588,60618,60648,60677,60707,60736,60765,60795,60824,60853,60883,60912,60942,60972,61002,61031,61061,61090,61120,61149,61179,61208,61237,61267,61296,61326,61356,61385,61415,61445,61474,61504,61533,61563,61592,61621,61651,61680,61710,61739,61769,61799,61828,61858,61888,61917,61947,61976,62006,62035,62064,62094,62123,62153,62182,62212,62242,62271,62301,62331,62360,62390,62419,62448,62478,62507,62537,62566,62596,62625,62655,62685,62715,62744,62774,62803,62832,62862,62891,62921,62950,62980,63009,63039,63069,63099,63128,63157,63187,63216,63246,63275,63305,63334,63363,63393,63423,63453,63482,63512,63541,63571,63600,63630,63659,63689,63718,63747,63777,63807,63836,63866,63895,63925,63955,63984,64014,64043,64073,64102,64131,64161,64190,64220,64249,64279,64309,64339,64368,64398,64427,64457,64486,64515,64545,64574,64603,64633,64663,64692,64722,64752,64782,64811,64841,64870,64899,64929,64958,64987,65017,65047,65076,65106,65136,65166,65195,65225,65254,65283,65313,65342,65371,65401,65431,65460,65490,65520,65549,65579,65608,65638,65667,65697,65726,65755,65785,65815,65844,65874,65903,65933,65963,65992,66022,66051,66081,66110,66140,66169,66199,66228,66258,66287,66317,66346,66376,66405,66435,66465,66494,66524,66553,66583,66612,66641,66671,66700,66730,66760,66789,66819,66849,66878,66908,66937,66967,66996,67025,67055,67084,67114,67143,67173,67203,67233,67262,67292,67321,67351,67380,67409,67439,67468,67497,67527,67557,67587,67617,67646,67676,67705,67735,67764,67793,67823,67852,67882,67911,67941,67971,68e3,68030,68060,68089,68119,68148,68177,68207,68236,68266,68295,68325,68354,68384,68414,68443,68473,68502,68532,68561,68591,68620,68650,68679,68708,68738,68768,68797,68827,68857,68886,68916,68946,68975,69004,69034,69063,69092,69122,69152,69181,69211,69240,69270,69300,69330,69359,69388,69418,69447,69476,69506,69535,69565,69595,69624,69654,69684,69713,69743,69772,69802,69831,69861,69890,69919,69949,69978,70008,70038,70067,70097,70126,70156,70186,70215,70245,70274,70303,70333,70362,70392,70421,70451,70481,70510,70540,70570,70599,70629,70658,70687,70717,70746,70776,70805,70835,70864,70894,70924,70954,70983,71013,71042,71071,71101,71130,71159,71189,71218,71248,71278,71308,71337,71367,71397,71426,71455,71485,71514,71543,71573,71602,71632,71662,71691,71721,71751,71781,71810,71839,71869,71898,71927,71957,71986,72016,72046,72075,72105,72135,72164,72194,72223,72253,72282,72311,72341,72370,72400,72429,72459,72489,72518,72548,72577,72607,72637,72666,72695,72725,72754,72784,72813,72843,72872,72902,72931,72961,72991,73020,73050,73080,73109,73139,73168,73197,73227,73256,73286,73315,73345,73375,73404,73434,73464,73493,73523,73552,73581,73611,73640,73669,73699,73729,73758,73788,73818,73848,73877,73907,73936,73965,73995,74024,74053,74083,74113,74142,74172,74202,74231,74261,74291,74320,74349,74379,74408,74437,74467,74497,74526,74556,74586,74615,74645,74675,74704,74733,74763,74792,74822,74851,74881,74910,74940,74969,74999,75029,75058,75088,75117,75147,75176,75206,75235,75264,75294,75323,75353,75383,75412,75442,75472,75501,75531,75560,75590,75619,75648,75678,75707,75737,75766,75796,75826,75856,75885,75915,75944,75974,76003,76032,76062,76091,76121,76150,76180,76210,76239,76269,76299,76328,76358,76387,76416,76446,76475,76505,76534,76564,76593,76623,76653,76682,76712,76741,76771,76801,76830,76859,76889,76918,76948,76977,77007,77036,77066,77096,77125,77155,77185,77214,77243,77273,77302,77332,77361,77390,77420,77450,77479,77509,77539,77569,77598,77627,77657,77686,77715,77745,77774,77804,77833,77863,77893,77923,77952,77982,78011,78041,78070,78099,78129,78158,78188,78217,78247,78277,78307,78336,78366,78395,78425,78454,78483,78513,78542,78572,78601,78631,78661,78690,78720,78750,78779,78808,78838,78867,78897,78926,78956,78985,79015,79044,79074,79104,79133,79163,79192,79222,79251,79281,79310,79340,79369,79399,79428,79458,79487,79517,79546,79576,79606,79635,79665,79695,79724,79753,79783,79812,79841,79871,79900,79930,79960,79990]}}),pW=Xe({"src/components/calendars/calendars.js"(Z,G){"use strict";G.exports=Mp(),$H(),QH(),eW(),tW(),rW(),aW(),iW(),nW(),oW(),sW(),lW(),uW(),cW(),fW(),hW()}}),dW=Xe({"src/components/calendars/index.js"(Z,G){"use strict";var v=pW(),x=sa(),S=Hs(),E=S.EPOCHJD,e=S.ONEDAY,t={valType:"enumerated",values:x.sortObjectKeys(v.calendars),editType:"calc",dflt:"gregorian"},r=function(g,b,d,u){var y={};return y[d]=t,x.coerce(g,b,y,d,u)},o=function(g,b,d,u){for(var y=0;y0){if(++ge>=jZ)return arguments[0]}else ge=0;return ue.apply(void 0,arguments)}}var Pb=GZ;var HZ=Pb(Ab),Ib=HZ;var WZ=/\{\n\/\* \[wrapped with (.+)\] \*/,XZ=/,? & /;function ZZ(ue){var ge=ue.match(WZ);return ge?ge[1].split(XZ):[]}var cC=ZZ;var YZ=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;function KZ(ue,ge){var Ye=ge.length;if(!Ye)return ue;var Rt=Ye-1;return ge[Rt]=(Ye>1?"& ":"")+ge[Rt],ge=ge.join(Ye>2?", ":" "),ue.replace(YZ,`{ /* [wrapped with `+ge+`] */ `)}var fC=KZ;function JZ(ue){return function(){return ue}}var Qg=JZ;var $Z=function(){try{var ue=sd(Object,"defineProperty");return ue({},"",{}),ue}catch{}}(),ey=$Z;var QZ=ey?function(ue,ge){return ey(ue,"toString",{configurable:!0,enumerable:!1,value:Qg(ge),writable:!0})}:Bc,hC=QZ;var eY=Pb(hC),ty=eY;function tY(ue,ge){for(var Ye=-1,Rt=ue==null?0:ue.length;++Ye-1}var Mm=oY;var sY=1,lY=2,uY=8,cY=16,fY=32,hY=64,pY=128,dY=256,vY=512,mY=[["ary",pY],["bind",sY],["bindKey",lY],["curry",uY],["curryRight",cY],["flip",vY],["partial",fY],["partialRight",hY],["rearg",dY]];function gY(ue,ge){return Nh(mY,function(Ye){var Rt="_."+Ye[0];ge&Ye[1]&&!Mm(ue,Rt)&&ue.push(Rt)}),ue.sort()}var dC=gY;function yY(ue,ge,Ye){var Rt=ge+"";return ty(ue,fC(Rt,dC(cC(Rt),Ye)))}var Db=yY;var _Y=1,xY=2,bY=4,wY=8,vC=32,mC=64;function TY(ue,ge,Ye,Rt,gr,Yr,Ea,ei,oi,Cn){var bn=ge&wY,Fn=bn?Ea:void 0,To=bn?void 0:Ea,ds=bn?Yr:void 0,Qs=bn?void 0:Yr;ge|=bn?vC:mC,ge&=~(bn?mC:vC),ge&bY||(ge&=~(_Y|xY));var Vo=[ue,ge,gr,ds,Fn,Qs,To,ei,oi,Cn],Xe=Ye.apply(void 0,Vo);return i_(ue)&&Ib(Xe,Vo),Xe.placeholder=Rt,Db(Xe,ue,ge)}var zb=TY;function AY(ue){var ge=ue;return ge.placeholder}var Sd=AY;var SY=9007199254740991,MY=/^(?:0|[1-9]\d*)$/;function EY(ue,ge){var Ye=typeof ue;return ge=ge??SY,!!ge&&(Ye=="number"||Ye!="symbol"&&MY.test(ue))&&ue>-1&&ue%1==0&&ue1&&nu.reverse(),bn&&oi-1&&ue%1==0&&ue<=aK}var Em=iK;function nK(ue){return ue!=null&&Em(ue.length)&&!ap(ue)}var Vc=nK;function oK(ue,ge,Ye){if(!Ll(Ye))return!1;var Rt=typeof ge;return(Rt=="number"?Vc(Ye)&&ip(ge,Ye.length):Rt=="string"&&ge in Ye)?oh(Ye[ge],ue):!1}var Nc=oK;function sK(ue){return qo(function(ge,Ye){var Rt=-1,gr=Ye.length,Yr=gr>1?Ye[gr-1]:void 0,Ea=gr>2?Ye[2]:void 0;for(Yr=ue.length>3&&typeof Yr=="function"?(gr--,Yr):void 0,Ea&&Nc(Ye[0],Ye[1],Ea)&&(Yr=gr<3?void 0:Yr,gr=1),ge=Object(ge);++Rt-1}var KC=FJ;function OJ(ue,ge){var Ye=this.__data__,Rt=Cm(Ye,ue);return Rt<0?(++this.size,Ye.push([ue,ge])):Ye[Rt][1]=ge,this}var JC=OJ;function ly(ue){var ge=-1,Ye=ue==null?0:ue.length;for(this.clear();++ge0&&Ye(ei)?ge>1?sL(ei,ge-1,Ye,Rt,gr):Op(gr,ei):Rt||(gr[gr.length]=ei)}return gr}var Qu=sL;function s$(ue){var ge=ue==null?0:ue.length;return ge?Qu(ue,1):[]}var qb=s$;function l$(ue){return ty(Ob(ue,void 0,qb),ue+"")}var lp=l$;var u$=lp(fy),lL=u$;var c$=Nb(Object.getPrototypeOf,Object),Rm=c$;var f$="[object Object]",h$=Function.prototype,p$=Object.prototype,uL=h$.toString,d$=p$.hasOwnProperty,v$=uL.call(Object);function m$(ue){if(!Dl(ue)||Oc(ue)!=f$)return!1;var ge=Rm(ue);if(ge===null)return!0;var Ye=d$.call(ge,"constructor")&&ge.constructor;return typeof Ye=="function"&&Ye instanceof Ye&&uL.call(Ye)==v$}var gv=m$;var g$="[object DOMException]",y$="[object Error]";function _$(ue){if(!Dl(ue))return!1;var ge=Oc(ue);return ge==y$||ge==g$||typeof ue.message=="string"&&typeof ue.name=="string"&&!gv(ue)}var hy=_$;var x$=qo(function(ue,ge){try{return xf(ue,void 0,ge)}catch(Ye){return hy(Ye)?Ye:new Error(Ye)}}),Vb=x$;var b$="Expected a function";function w$(ue,ge){var Ye;if(typeof ge!="function")throw new TypeError(b$);return ue=jo(ue),function(){return--ue>0&&(Ye=ge.apply(this,arguments)),ue<=1&&(ge=void 0),Ye}}var Gb=w$;var T$=1,A$=32,PA=qo(function(ue,ge,Ye){var Rt=T$;if(Ye.length){var gr=Yp(Ye,Sd(PA));Rt|=A$}return np(ue,Rt,ge,Ye,gr)});PA.placeholder={};var Hb=PA;var S$=lp(function(ue,ge){return Nh(ge,function(Ye){Ye=Eh(Ye),op(ue,Ye,Hb(ue[Ye],ue))}),ue}),cL=S$;var M$=1,E$=2,k$=32,IA=qo(function(ue,ge,Ye){var Rt=M$|E$;if(Ye.length){var gr=Yp(Ye,Sd(IA));Rt|=k$}return np(ge,Rt,ue,Ye,gr)});IA.placeholder={};var fL=IA;function C$(ue,ge,Ye){var Rt=-1,gr=ue.length;ge<0&&(ge=-ge>gr?0:gr+ge),Ye=Ye>gr?gr:Ye,Ye<0&&(Ye+=gr),gr=ge>Ye?0:Ye-ge>>>0,ge>>>=0;for(var Yr=Array(gr);++Rt=Rt?ue:Yf(ue,ge,Ye)}var Bp=L$;var P$="\\ud800-\\udfff",I$="\\u0300-\\u036f",R$="\\ufe20-\\ufe2f",D$="\\u20d0-\\u20ff",z$=I$+R$+D$,F$="\\ufe0e\\ufe0f",O$="\\u200d",B$=RegExp("["+O$+P$+z$+F$+"]");function N$(ue){return B$.test(ue)}var kd=N$;function U$(ue){return ue.split("")}var hL=U$;var pL="\\ud800-\\udfff",j$="\\u0300-\\u036f",q$="\\ufe20-\\ufe2f",V$="\\u20d0-\\u20ff",G$=j$+q$+V$,H$="\\ufe0e\\ufe0f",W$="["+pL+"]",RA="["+G$+"]",DA="\\ud83c[\\udffb-\\udfff]",X$="(?:"+RA+"|"+DA+")",dL="[^"+pL+"]",vL="(?:\\ud83c[\\udde6-\\uddff]){2}",mL="[\\ud800-\\udbff][\\udc00-\\udfff]",Z$="\\u200d",gL=X$+"?",yL="["+H$+"]?",Y$="(?:"+Z$+"(?:"+[dL,vL,mL].join("|")+")"+yL+gL+")*",K$=yL+gL+Y$,J$="(?:"+[dL+RA+"?",RA,vL,mL,W$].join("|")+")",$$=RegExp(DA+"(?="+DA+")|"+J$+K$,"g");function Q$(ue){return ue.match($$)||[]}var _L=Q$;function eQ(ue){return kd(ue)?_L(ue):hL(ue)}var Uh=eQ;function tQ(ue){return function(ge){ge=Bs(ge);var Ye=kd(ge)?Uh(ge):void 0,Rt=Ye?Ye[0]:ge.charAt(0),gr=Ye?Bp(Ye,1).join(""):ge.slice(1);return Rt[ue]()+gr}}var Wb=tQ;var rQ=Wb("toUpperCase"),py=rQ;function aQ(ue){return py(Bs(ue).toLowerCase())}var Xb=aQ;function iQ(ue,ge,Ye,Rt){var gr=-1,Yr=ue==null?0:ue.length;for(Rt&&Yr&&(Ye=ue[++gr]);++gr=ge?ue:ge)),ue}var ud=aee;function iee(ue,ge,Ye){return Ye===void 0&&(Ye=ge,ge=void 0),Ye!==void 0&&(Ye=Sh(Ye),Ye=Ye===Ye?Ye:0),ge!==void 0&&(ge=Sh(ge),ge=ge===ge?ge:0),ud(Sh(ue),ge,Ye)}var HL=iee;function nee(){this.__data__=new Lm,this.size=0}var WL=nee;function oee(ue){var ge=this.__data__,Ye=ge.delete(ue);return this.size=ge.size,Ye}var XL=oee;function see(ue){return this.__data__.get(ue)}var ZL=see;function lee(ue){return this.__data__.has(ue)}var YL=lee;var uee=200;function cee(ue,ge){var Ye=this.__data__;if(Ye instanceof Lm){var Rt=Ye.__data__;if(!Pm||Rt.lengthei))return!1;var Cn=Yr.get(ue),bn=Yr.get(ge);if(Cn&&bn)return Cn==ge&&bn==ue;var Fn=-1,To=!0,ds=Ye&cre?new zm:void 0;for(Yr.set(ue,ge),Yr.set(ge,ue);++Fn=ge||Hn<0||Fn&&dd>=Yr}function Kl(){var Ff=Py();if(Xe(Ff))return nu(Ff);ei=setTimeout(Kl,Vo(Ff))}function nu(Ff){return ei=void 0,To&&Rt?ds(Ff):(Rt=gr=void 0,Ea)}function jp(){ei!==void 0&&clearTimeout(ei),Cn=0,Rt=oi=gr=ei=void 0}function zf(){return ei===void 0?Ea:nu(Py())}function fp(){var Ff=Py(),Hn=Xe(Ff);if(Rt=arguments,gr=this,oi=Ff,Hn){if(ei===void 0)return Qs(oi);if(Fn)return clearTimeout(ei),ei=setTimeout(Kl,ge),ds(oi)}return ei===void 0&&(ei=setTimeout(Kl,ge)),Ea}return fp.cancel=jp,fp.flush=zf,fp}var xw=Tae;function Aae(ue,ge){return ue==null||ue!==ue?ge:ue}var QP=Aae;var eI=Object.prototype,Sae=eI.hasOwnProperty,Mae=qo(function(ue,ge){ue=Object(ue);var Ye=-1,Rt=ge.length,gr=Rt>2?ge[2]:void 0;for(gr&&Nc(ge[0],ge[1],gr)&&(Rt=1);++Ye=Nae&&(Yr=Gv,Ea=!1,ge=new zm(ge));e:for(;++gr=0&&ue.slice(Ye,gr)==ge}var yI=iie;function nie(ue,ge){return Ml(ge,function(Ye){return[Ye,ue[Ye]]})}var _I=nie;function oie(ue){var ge=-1,Ye=Array(ue.size);return ue.forEach(function(Rt){Ye[++ge]=[Rt,Rt]}),Ye}var xI=oie;var sie="[object Map]",lie="[object Set]";function uie(ue){return function(ge){var Ye=jh(ge);return Ye==sie?Sy(ge):Ye==lie?xI(ge):_I(ge,ue(ge))}}var Mw=uie;var cie=Mw(gu),p_=cie;var fie=Mw(Gc),d_=fie;var hie={"&":"&","<":"<",">":">",'"':""","'":"'"},pie=vy(hie),bI=pie;var wI=/[&<>"']/g,die=RegExp(wI.source);function vie(ue){return ue=Bs(ue),ue&&die.test(ue)?ue.replace(wI,bI):ue}var Ew=vie;var TI=/[\\^$.*+?()[\]{}|]/g,mie=RegExp(TI.source);function gie(ue){return ue=Bs(ue),ue&&mie.test(ue)?ue.replace(TI,"\\$&"):ue}var AI=gie;function yie(ue,ge){for(var Ye=-1,Rt=ue==null?0:ue.length;++Yegr?0:gr+Ye),Rt=Rt===void 0||Rt>gr?gr:jo(Rt),Rt<0&&(Rt+=gr),Rt=Ye>Rt?0:Cw(Rt);Ye-1?gr[Yr?ge[Ea]:Ea]:void 0}}var Pw=Eie;var kie=Math.max;function Cie(ue,ge,Ye){var Rt=ue==null?0:ue.length;if(!Rt)return-1;var gr=Ye==null?0:jo(Ye);return gr<0&&(gr=kie(Rt+gr,0)),Sm(ue,xo(ge,3),gr)}var Iw=Cie;var Lie=Pw(Iw),LI=Lie;function Pie(ue,ge,Ye){var Rt;return Ye(ue,function(gr,Yr,Ea){if(ge(gr,Yr,Ea))return Rt=Yr,!1}),Rt}var Rw=Pie;function Iie(ue,ge){return Rw(ue,xo(ge,3),cp)}var PI=Iie;var Rie=Math.max,Die=Math.min;function zie(ue,ge,Ye){var Rt=ue==null?0:ue.length;if(!Rt)return-1;var gr=Rt-1;return Ye!==void 0&&(gr=jo(Ye),gr=Ye<0?Rie(Rt+gr,0):Die(gr,Rt-1)),Sm(ue,xo(ge,3),gr,!0)}var Dw=zie;var Fie=Pw(Dw),II=Fie;function Oie(ue,ge){return Rw(ue,xo(ge,3),Dy)}var RI=Oie;function Bie(ue){return ue&&ue.length?ue[0]:void 0}var v_=Bie;function Nie(ue,ge){var Ye=-1,Rt=Vc(ue)?Array(ue.length):[];return Up(ue,function(gr,Yr,Ea){Rt[++Ye]=ge(gr,Yr,Ea)}),Rt}var zw=Nie;function Uie(ue,ge){var Ye=Io(ue)?Ml:zw;return Ye(ue,xo(ge,3))}var Um=Uie;function jie(ue,ge){return Qu(Um(ue,ge),1)}var DI=jie;var qie=1/0;function Vie(ue,ge){return Qu(Um(ue,ge),qie)}var zI=Vie;function Gie(ue,ge,Ye){return Ye=Ye===void 0?1:jo(Ye),Qu(Um(ue,ge),Ye)}var FI=Gie;var Hie=1/0;function Wie(ue){var ge=ue==null?0:ue.length;return ge?Qu(ue,Hie):[]}var OI=Wie;function Xie(ue,ge){var Ye=ue==null?0:ue.length;return Ye?(ge=ge===void 0?1:jo(ge),Qu(ue,ge)):[]}var BI=Xie;var Zie=512;function Yie(ue){return np(ue,Zie)}var NI=Yie;var Kie=gy("floor"),UI=Kie;var Jie="Expected a function",$ie=8,Qie=32,ene=128,tne=256;function rne(ue){return lp(function(ge){var Ye=ge.length,Rt=Ye,gr=zp.prototype.thru;for(ue&&ge.reverse();Rt--;){var Yr=ge[Rt];if(typeof Yr!="function")throw new TypeError(Jie);if(gr&&!Ea&&$g(Yr)=="wrapper")var Ea=new zp([],!0)}for(Rt=Ea?Rt:Ye;++Rtge}var zy=mne;function gne(ue){return function(ge,Ye){return typeof ge=="string"&&typeof Ye=="string"||(ge=Sh(ge),Ye=Sh(Ye)),ue(ge,Ye)}}var qm=gne;var yne=qm(zy),JI=yne;var _ne=qm(function(ue,ge){return ue>=ge}),$I=_ne;var xne=Object.prototype,bne=xne.hasOwnProperty;function wne(ue,ge){return ue!=null&&bne.call(ue,ge)}var QI=wne;function Tne(ue,ge){return ue!=null&&dw(ue,ge,QI)}var e8=Tne;var Ane=Math.max,Sne=Math.min;function Mne(ue,ge,Ye){return ue>=Sne(ge,Ye)&&ue-1:!!gr&&Ad(ue,ge,Ye)>-1}var a8=Rne;var Dne=Math.max;function zne(ue,ge,Ye){var Rt=ue==null?0:ue.length;if(!Rt)return-1;var gr=Ye==null?0:jo(Ye);return gr<0&&(gr=Dne(Rt+gr,0)),Ad(ue,ge,gr)}var i8=zne;function Fne(ue){var ge=ue==null?0:ue.length;return ge?Yf(ue,0,-1):[]}var n8=Fne;var One=Math.min;function Bne(ue,ge,Ye){for(var Rt=Ye?Ry:Mm,gr=ue[0].length,Yr=ue.length,Ea=Yr,ei=Array(Yr),oi=1/0,Cn=[];Ea--;){var bn=ue[Ea];Ea&&ge&&(bn=Ml(bn,wf(ge))),oi=One(bn.length,oi),ei[Ea]=!Ye&&(ge||gr>=120&&bn.length>=120)?new zm(Ea&&bn):void 0}bn=ue[0];var Fn=-1,To=ei[0];e:for(;++Fn=-F8&&ue<=F8}var O8=Roe;function Doe(ue){return ue===void 0}var B8=Doe;var zoe="[object WeakMap]";function Foe(ue){return Dl(ue)&&jh(ue)==zoe}var N8=Foe;var Ooe="[object WeakSet]";function Boe(ue){return Dl(ue)&&Oc(ue)==Ooe}var U8=Boe;var Noe=1;function Uoe(ue){return xo(typeof ue=="function"?ue:up(ue,Noe))}var j8=Uoe;var joe=Array.prototype,qoe=joe.join;function Voe(ue,ge){return ue==null?"":qoe.call(ue,ge)}var q8=Voe;var Goe=Cd(function(ue,ge,Ye){return ue+(Ye?"-":"")+ge.toLowerCase()}),V8=Goe;var Hoe=Bm(function(ue,ge,Ye){op(ue,Ye,ge)}),G8=Hoe;function Woe(ue,ge,Ye){for(var Rt=Ye+1;Rt--;)if(ue[Rt]===ge)return Rt;return Rt}var H8=Woe;var Xoe=Math.max,Zoe=Math.min;function Yoe(ue,ge,Ye){var Rt=ue==null?0:ue.length;if(!Rt)return-1;var gr=Rt;return Ye!==void 0&&(gr=jo(Ye),gr=gr<0?Xoe(Rt+gr,0):Zoe(gr,Rt-1)),ge===ge?H8(ue,ge,gr):Sm(ue,Rb,gr,!0)}var W8=Yoe;var Koe=Cd(function(ue,ge,Ye){return ue+(Ye?" ":"")+ge.toLowerCase()}),X8=Koe;var Joe=Wb("toLowerCase"),Z8=Joe;function $oe(ue,ge){return ue=this.__values__.length,ge=ue?void 0:this.__values__[this.__index__++];return{done:ue,value:ge}}var hR=kse;function Cse(ue,ge){var Ye=ue.length;if(Ye)return ge+=ge<0?Ye:0,ip(ge,Ye)?ue[ge]:void 0}var Gw=Cse;function Lse(ue,ge){return ue&&ue.length?Gw(ue,jo(ge)):void 0}var pR=Lse;function Pse(ue){return ue=jo(ue),qo(function(ge){return Gw(ge,ue)})}var dR=Pse;function Ise(ue,ge){return ge=Fp(ge,ue),ue=Bw(ue,ge),ue==null||delete ue[Eh(Tf(ge))]}var qy=Ise;function Rse(ue){return gv(ue)?void 0:ue}var vR=Rse;var Dse=1,zse=2,Fse=4,Ose=lp(function(ue,ge){var Ye={};if(ue==null)return Ye;var Rt=!1;ge=Ml(ge,function(Yr){return Yr=Fp(Yr,ue),Rt||(Rt=Yr.length>1),Yr}),Mh(ue,by(ue),Ye),Rt&&(Ye=up(Ye,Dse|zse|Fse,vR));for(var gr=ge.length;gr--;)qy(Ye,ge[gr]);return Ye}),mR=Ose;function Bse(ue,ge,Ye,Rt){if(!Ll(ue))return ue;ge=Fp(ge,ue);for(var gr=-1,Yr=ge.length,Ea=Yr-1,ei=ue;ei!=null&&++grge||Yr&&Ea&&oi&&!ei&&!Cn||Rt&&Ea&&oi||!Ye&&oi||!gr)return 1;if(!Rt&&!Yr&&!Cn&&ue=ei)return oi;var Cn=Ye[Rt];return oi*(Cn=="desc"?-1:1)}}return ue.index-ge.index}var xR=Hse;function Wse(ue,ge,Ye){ge.length?ge=Ml(ge,function(Yr){return Io(Yr)?function(Ea){return ld(Ea,Yr.length===1?Yr[0]:Yr)}:Yr}):ge=[Bc];var Rt=-1;ge=Ml(ge,wf(xo));var gr=zw(ue,function(Yr,Ea,ei){var oi=Ml(ge,function(Cn){return Cn(Yr)});return{criteria:oi,index:++Rt,value:Yr}});return _R(gr,function(Yr,Ea){return xR(Yr,Ea,Ye)})}var Zw=Wse;function Xse(ue,ge,Ye,Rt){return ue==null?[]:(Io(ge)||(ge=ge==null?[]:[ge]),Ye=Rt?void 0:Ye,Io(Ye)||(Ye=Ye==null?[]:[Ye]),Zw(ue,ge,Ye))}var bR=Xse;function Zse(ue){return lp(function(ge){return ge=Ml(ge,wf(xo)),qo(function(Ye){var Rt=this;return ue(ge,function(gr){return xf(gr,Rt,Ye)})})})}var Vy=Zse;var Yse=Vy(Ml),wR=Yse;var Kse=qo,TR=Kse;var Jse=Math.min,$se=TR(function(ue,ge){ge=ge.length==1&&Io(ge[0])?Ml(ge[0],wf(xo)):Ml(Qu(ge,1),wf(xo));var Ye=ge.length;return qo(function(Rt){for(var gr=-1,Yr=Jse(Rt.length,Ye);++grtle)return Ye;do ge%2&&(Ye+=ue),ge=rle(ge/2),ge&&(ue+=ue);while(ge);return Ye}var m_=ale;var ile=Cy("length"),ER=ile;var CR="\\ud800-\\udfff",nle="\\u0300-\\u036f",ole="\\ufe20-\\ufe2f",sle="\\u20d0-\\u20ff",lle=nle+ole+sle,ule="\\ufe0e\\ufe0f",cle="["+CR+"]",NA="["+lle+"]",UA="\\ud83c[\\udffb-\\udfff]",fle="(?:"+NA+"|"+UA+")",LR="[^"+CR+"]",PR="(?:\\ud83c[\\udde6-\\uddff]){2}",IR="[\\ud800-\\udbff][\\udc00-\\udfff]",hle="\\u200d",RR=fle+"?",DR="["+ule+"]?",ple="(?:"+hle+"(?:"+[LR,PR,IR].join("|")+")"+DR+RR+")*",dle=DR+RR+ple,vle="(?:"+[LR+NA+"?",NA,PR,IR,cle].join("|")+")",kR=RegExp(UA+"(?="+UA+")|"+vle+dle,"g");function mle(ue){for(var ge=kR.lastIndex=0;kR.test(ue);)++ge;return ge}var zR=mle;function gle(ue){return kd(ue)?zR(ue):ER(ue)}var Pd=gle;var yle=Math.ceil;function _le(ue,ge){ge=ge===void 0?" ":nh(ge);var Ye=ge.length;if(Ye<2)return Ye?m_(ge,ue):ge;var Rt=m_(ge,yle(ue/Pd(ge)));return kd(ge)?Bp(Uh(Rt),0,ue).join(""):Rt.slice(0,ue)}var H0=_le;var xle=Math.ceil,ble=Math.floor;function wle(ue,ge,Ye){ue=Bs(ue),ge=jo(ge);var Rt=ge?Pd(ue):0;if(!ge||Rt>=ge)return ue;var gr=(ge-Rt)/2;return H0(ble(gr),Ye)+ue+H0(xle(gr),Ye)}var FR=wle;function Tle(ue,ge,Ye){ue=Bs(ue),ge=jo(ge);var Rt=ge?Pd(ue):0;return ge&&Rt-1;)ei!==ue&&XR.call(ei,oi,1),XR.call(ue,oi,1);return ue}var Gy=Ole;function Ble(ue,ge){return ue&&ue.length&&ge&&ge.length?Gy(ue,ge):ue}var Kw=Ble;var Nle=qo(Kw),ZR=Nle;function Ule(ue,ge,Ye){return ue&&ue.length&&ge&&ge.length?Gy(ue,ge,xo(Ye,2)):ue}var YR=Ule;function jle(ue,ge,Ye){return ue&&ue.length&&ge&&ge.length?Gy(ue,ge,void 0,Ye):ue}var KR=jle;var qle=Array.prototype,Vle=qle.splice;function Gle(ue,ge){for(var Ye=ue?ge.length:0,Rt=Ye-1;Ye--;){var gr=ge[Ye];if(Ye==Rt||gr!==Yr){var Yr=gr;ip(gr)?Vle.call(ue,gr,1):qy(ue,gr)}}return ue}var Jw=Gle;var Hle=lp(function(ue,ge){var Ye=ue==null?0:ue.length,Rt=fy(ue,ge);return Jw(ue,Ml(ge,function(gr){return ip(gr,Ye)?+gr:gr}).sort(Xw)),Rt}),JR=Hle;var Wle=Math.floor,Xle=Math.random;function Zle(ue,ge){return ue+Wle(Xle()*(ge-ue+1))}var Hy=Zle;var Yle=parseFloat,Kle=Math.min,Jle=Math.random;function $le(ue,ge,Ye){if(Ye&&typeof Ye!="boolean"&&Nc(ue,ge,Ye)&&(ge=Ye=void 0),Ye===void 0&&(typeof ge=="boolean"?(Ye=ge,ge=void 0):typeof ue=="boolean"&&(Ye=ue,ue=void 0)),ue===void 0&&ge===void 0?(ue=0,ge=1):(ue=od(ue),ge===void 0?(ge=ue,ue=0):ge=od(ge)),ue>ge){var Rt=ue;ue=ge,ge=Rt}if(Ye||ue%1||ge%1){var gr=Jle();return Kle(ue+gr*(ge-ue+Yle("1e-"+((gr+"").length-1))),ge)}return Hy(ue,ge)}var $R=$le;var Qle=Math.ceil,eue=Math.max;function tue(ue,ge,Ye,Rt){for(var gr=-1,Yr=eue(Qle((ge-ue)/(Ye||1)),0),Ea=Array(Yr);Yr--;)Ea[Rt?Yr:++gr]=ue,ue+=Ye;return Ea}var QR=tue;function rue(ue){return function(ge,Ye,Rt){return Rt&&typeof Rt!="number"&&Nc(ge,Ye,Rt)&&(Ye=Rt=void 0),ge=od(ge),Ye===void 0?(Ye=ge,ge=0):Ye=od(Ye),Rt=Rt===void 0?ge1&&Nc(ue,ge[0],ge[1])?ge=[]:Ye>2&&Nc(ge[0],ge[1],ge[2])&&(ge=[ge[0]]),Zw(ue,Qu(ge,1),[])}),k4=jue;var que=4294967295,Vue=que-1,Gue=Math.floor,Hue=Math.min;function Wue(ue,ge,Ye,Rt){var gr=0,Yr=ue==null?0:ue.length;if(Yr===0)return 0;ge=Ye(ge);for(var Ea=ge!==ge,ei=ge===null,oi=Rf(ge),Cn=ge===void 0;gr>>1;function Yue(ue,ge,Ye){var Rt=0,gr=ue==null?Rt:ue.length;if(typeof ge=="number"&&ge===ge&&gr<=Zue){for(;Rt>>1,Ea=ue[Yr];Ea!==null&&!Rf(Ea)&&(Ye?Ea<=ge:Ea>>0,Ye?(ue=Bs(ue),ue&&(typeof ge=="string"||ge!=null&&!Ny(ge))&&(ge=nh(ge),!ge&&kd(ue))?Bp(Uh(ue),0,Ye):ue.split(ge,Ye)):[]}var O4=oce;var sce="Expected a function",lce=Math.max;function uce(ue,ge){if(typeof ue!="function")throw new TypeError(sce);return ge=ge==null?0:lce(jo(ge),0),qo(function(Ye){var Rt=Ye[ge],gr=Bp(Ye,0,ge);return Rt&&Op(gr,Rt),xf(ue,this,gr)})}var B4=uce;var cce=Cd(function(ue,ge,Ye){return ue+(Ye?" ":"")+py(ge)}),N4=cce;function fce(ue,ge,Ye){return ue=Bs(ue),Ye=Ye==null?0:ud(jo(Ye),0,ue.length),ge=nh(ge),ue.slice(Ye,Ye+ge.length)==ge}var U4=fce;function hce(){return{}}var j4=hce;function pce(){return""}var q4=pce;function dce(){return!0}var V4=dce;var vce=wm(function(ue,ge){return ue-ge},0),G4=vce;function mce(ue){return ue&&ue.length?jy(ue,Bc):0}var H4=mce;function gce(ue,ge){return ue&&ue.length?jy(ue,xo(ge,2)):0}var W4=gce;function yce(ue){var ge=ue==null?0:ue.length;return ge?Yf(ue,1,ge):[]}var X4=yce;function _ce(ue,ge,Ye){return ue&&ue.length?(ge=Ye||ge===void 0?1:jo(ge),Yf(ue,0,ge<0?0:ge)):[]}var Z4=_ce;function xce(ue,ge,Ye){var Rt=ue==null?0:ue.length;return Rt?(ge=Ye||ge===void 0?1:jo(ge),ge=Rt-ge,Yf(ue,ge<0?0:ge,Rt)):[]}var Y4=xce;function bce(ue,ge){return ue&&ue.length?Nm(ue,xo(ge,3),!1,!0):[]}var K4=bce;function wce(ue,ge){return ue&&ue.length?Nm(ue,xo(ge,3)):[]}var J4=wce;function Tce(ue,ge){return ge(ue),ue}var $4=Tce;var Q4=Object.prototype,Ace=Q4.hasOwnProperty;function Sce(ue,ge,Ye,Rt){return ue===void 0||oh(ue,Q4[Ye])&&!Ace.call(Rt,Ye)?ge:ue}var VA=Sce;var Mce={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};function Ece(ue){return"\\"+Mce[ue]}var eD=Ece;var kce=/<%=([\s\S]+?)%>/g,r2=kce;var Cce=/<%-([\s\S]+?)%>/g,tD=Cce;var Lce=/<%([\s\S]+?)%>/g,rD=Lce;var Pce={escape:tD,evaluate:rD,interpolate:r2,variable:"",imports:{_:{escape:Ew}}},y_=Pce;var Ice="Invalid `variable` option passed into `_.template`",Rce=/\b__p \+= '';/g,Dce=/\b(__p \+=) '' \+/g,zce=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Fce=/[()=,{}\[\]\/\s]/,Oce=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,a2=/($^)/,Bce=/['\n\r\u2028\u2029\\]/g,Nce=Object.prototype,aD=Nce.hasOwnProperty;function Uce(ue,ge,Ye){var Rt=y_.imports._.templateSettings||y_;Ye&&Nc(ue,ge,Ye)&&(ge=void 0),ue=Bs(ue),ge=km({},ge,Rt,VA);var gr=km({},ge.imports,Rt.imports,VA),Yr=gu(gr),Ea=Fy(gr,Yr),ei,oi,Cn=0,bn=ge.interpolate||a2,Fn="__p += '",To=RegExp((ge.escape||a2).source+"|"+bn.source+"|"+(bn===r2?Oce:a2).source+"|"+(ge.evaluate||a2).source+"|$","g"),ds=aD.call(ge,"sourceURL")?"//# sourceURL="+(ge.sourceURL+"").replace(/\s/g," ")+` `:"";ue.replace(To,function(Xe,Kl,nu,jp,zf,fp){return nu||(nu=jp),Fn+=ue.slice(Cn,fp).replace(Bce,eD),Kl&&(ei=!0,Fn+=`' + __e(`+Kl+`) + '`),zf&&(oi=!0,Fn+=`'; `+zf+`; __p += '`),nu&&(Fn+=`' + ((__t = (`+nu+`)) == null ? '' : __t) + '`),Cn=fp+Xe.length,Xe}),Fn+=`'; `;var Qs=aD.call(ge,"variable")&&ge.variable;if(!Qs)Fn=`with (obj) { `+Fn+` } `;else if(Fce.test(Qs))throw new Error(Ice);Fn=(oi?Fn.replace(Rce,""):Fn).replace(Dce,"$1").replace(zce,"$1;"),Fn="function("+(Qs||"obj")+`) { `+(Qs?"":`obj || (obj = {}); `)+"var __t, __p = ''"+(ei?", __e = _.escape":"")+(oi?`, __j = Array.prototype.join; function print() { __p += __j.call(arguments, '') } `:`; `)+Fn+`return __p }`;var Vo=Vb(function(){return Function(Yr,ds+"return "+Fn).apply(void 0,Ea)});if(Vo.source=Fn,hy(Vo))throw Vo;return Vo}var iD=Uce;var jce="Expected a function";function qce(ue,ge,Ye){var Rt=!0,gr=!0;if(typeof ue!="function")throw new TypeError(jce);return Ll(Ye)&&(Rt="leading"in Ye?!!Ye.leading:Rt,gr="trailing"in Ye?!!Ye.trailing:gr),xw(ue,ge,{leading:Rt,maxWait:ge,trailing:gr})}var nD=qce;function Vce(ue,ge){return ge(ue)}var Wv=Vce;var Gce=9007199254740991,GA=4294967295,Hce=Math.min;function Wce(ue,ge){if(ue=jo(ue),ue<1||ue>Gce)return[];var Ye=GA,Rt=Hce(ue,GA);ge=kh(ge),ue-=GA;for(var gr=ay(Rt,ge);++Ye-1;);return Ye}var n2=tfe;function rfe(ue,ge){for(var Ye=-1,Rt=ue.length;++Ye-1;);return Ye}var o2=rfe;function afe(ue,ge,Ye){if(ue=Bs(ue),ue&&(Ye||ge===void 0))return wb(ue);if(!ue||!(ge=nh(ge)))return ue;var Rt=Uh(ue),gr=Uh(ge),Yr=o2(Rt,gr),Ea=n2(Rt,gr)+1;return Bp(Rt,Yr,Ea).join("")}var dD=afe;function ife(ue,ge,Ye){if(ue=Bs(ue),ue&&(Ye||ge===void 0))return ue.slice(0,bb(ue)+1);if(!ue||!(ge=nh(ge)))return ue;var Rt=Uh(ue),gr=n2(Rt,Uh(ge))+1;return Bp(Rt,0,gr).join("")}var vD=ife;var nfe=/^\s+/;function ofe(ue,ge,Ye){if(ue=Bs(ue),ue&&(Ye||ge===void 0))return ue.replace(nfe,"");if(!ue||!(ge=nh(ge)))return ue;var Rt=Uh(ue),gr=o2(Rt,Uh(ge));return Bp(Rt,gr).join("")}var mD=ofe;var sfe=30,lfe="...",ufe=/\w*$/;function cfe(ue,ge){var Ye=sfe,Rt=lfe;if(Ll(ge)){var gr="separator"in ge?ge.separator:gr;Ye="length"in ge?jo(ge.length):Ye,Rt="omission"in ge?nh(ge.omission):Rt}ue=Bs(ue);var Yr=ue.length;if(kd(ue)){var Ea=Uh(ue);Yr=Ea.length}if(Ye>=Yr)return ue;var ei=Ye-Pd(Rt);if(ei<1)return Rt;var oi=Ea?Bp(Ea,0,ei).join(""):ue.slice(0,ei);if(gr===void 0)return oi+Rt;if(Ea&&(ei+=oi.length-ei),Ny(gr)){if(ue.slice(ei).search(gr)){var Cn,bn=oi;for(gr.global||(gr=RegExp(gr.source,Bs(ufe.exec(gr))+"g")),gr.lastIndex=0;Cn=gr.exec(bn);)var Fn=Cn.index;oi=oi.slice(0,Fn===void 0?ei:Fn)}}else if(ue.indexOf(nh(gr),ei)!=ei){var To=oi.lastIndexOf(gr);To>-1&&(oi=oi.slice(0,To))}return oi+Rt}var gD=cfe;function ffe(ue){return Fb(ue,1)}var yD=ffe;var hfe={"&":"&","<":"<",">":">",""":'"',"'":"'"},pfe=vy(hfe),_D=pfe;var xD=/&(?:amp|lt|gt|quot|#39);/g,dfe=RegExp(xD.source);function vfe(ue){return ue=Bs(ue),ue&&dfe.test(ue)?ue.replace(xD,_D):ue}var bD=vfe;var mfe=1/0,gfe=Dm&&1/Fm(new Dm([,-0]))[1]==mfe?function(ue){return new Dm(ue)}:Kg,wD=gfe;var yfe=200;function _fe(ue,ge,Ye){var Rt=-1,gr=Mm,Yr=ue.length,Ea=!0,ei=[],oi=ei;if(Ye)Ea=!1,gr=Ry;else if(Yr>=yfe){var Cn=ge?null:wD(ue);if(Cn)return Fm(Cn);Ea=!1,gr=Gv,oi=new zm}else oi=ge?[]:ei;e:for(;++Rt1||this.__actions__.length||!(Rt instanceof Bl)||!ip(Ye)?this.thru(gr):(Rt=Rt.slice(Ye,+Ye+(ge?1:0)),Rt.__actions__.push({func:Wv,args:[gr],thisArg:void 0}),new zp(Rt,this.__chain__).thru(function(Yr){return ge&&!Yr.length&&Yr.push(void 0),Yr}))}),OD=Nfe;function Ufe(){return Kb(this)}var BD=Ufe;function jfe(){var ue=this.__wrapped__;if(ue instanceof Bl){var ge=ue;return this.__actions__.length&&(ge=new Bl(this)),ge=ge.reverse(),ge.__actions__.push({func:Wv,args:[g_],thisArg:void 0}),new zp(ge,this.__chain__)}return this.thru(g_)}var ND=jfe;function qfe(ue,ge,Ye){var Rt=ue.length;if(Rt<2)return Rt?Jp(ue[0]):[];for(var gr=-1,Yr=Array(Rt);++gr1?ue[ge-1]:void 0;return Ye=typeof Ye=="function"?(ue.pop(),Ye):void 0,s2(ue,Ye)}),WD=Kfe;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:Um,orderBy:bR,partition:jR,reduce:a4,reduceRight:n4,reject:o4,sample:d4,sampleSize:g4,shuffle:w4,size:T4,some:E4,sortBy:k4};var HA={now:Py};var Df={after:aC,ary:Fb,before:Gb,bind:Hb,bindKey:fL,curry:JP,curryRight:$P,debounce:xw,defer:sI,delay:lI,flip:NI,memoize:Ub,negate:Hv,once:yR,overArgs:AR,partial:Yw,partialRight:UR,rearg:r4,rest:c4,spread:B4,throttle:nD,unary:yD,wrap:FD};var Gs={castArray:qL,clone:AP,cloneDeep:SP,cloneDeepWith:MP,cloneWith:EP,conformsTo:WP,eq:oh,gt:JI,gte:$I,isArguments:pd,isArray:Io,isArrayBuffer:g8,isArrayLike:Vc,isArrayLikeObject:Eu,isBoolean:y8,isBuffer:Kp,isDate:b8,isElement:w8,isEmpty:T8,isEqual:A8,isEqualWith:S8,isError:hy,isFinite:M8,isFunction:ap,isInteger:Nw,isLength:Em,isMap:nw,isMatch:E8,isMatchWith:k8,isNaN:C8,isNative:P8,isNil:I8,isNull:R8,isNumber:Uw,isObject:Ll,isObjectLike:Dl,isPlainObject:gv,isRegExp:Ny,isSafeInteger:O8,isSet:ow,isString:Vm,isSymbol:Rf,isTypedArray:Ed,isUndefined:B8,isWeakMap:N8,isWeakSet:U8,lt:Y8,lte:K8,toArray:Vw,toFinite:od,toInteger:jo,toLength:Cw,toNumber:Sh,toPlainObject:bw,toSafeInteger:fD,toString:Bs};var xp={add:eC,ceil:VL,divide:hI,floor:UI,max:tR,maxBy:rR,mean:aR,meanBy:iR,min:lR,minBy:uR,multiply:cR,round:h4,subtract:G4,sum:H4,sumBy:W4};var __={clamp:HL,inRange:r8,random:$R};var dl={assign:BC,assignIn:s_,assignInWith:km,assignWith:jC,at:lL,create:KP,defaults:tI,defaultsDeep:oI,entries:p_,entriesIn:d_,extend:s_,extendWith:km,findKey:PI,findLastKey:RI,forIn:VI,forInRight:GI,forOwn:HI,forOwnRight:WI,functions:ZI,functionsIn:YI,get:cy,has:e8,hasIn:ky,invert:c8,invertBy:h8,invoke:p8,keys:gu,keysIn:Gc,mapKeys:J8,mapValues:$8,merge:nR,mergeWith:ww,omit:mR,omitBy:gR,pick:VR,pickBy:Ww,result:f4,set:y4,setWith:_4,toPairs:p_,toPairsIn:d_,transform:pD,unset:LD,update:PD,updateWith:ID,values:Ld,valuesIn:DD};var Id={at:OD,chain:Kb,commit:kP,lodash:va,next:hR,plant:GR,reverse:ND,tap:$4,thru:Wv,toIterator:sD,toJSON:Xm,value:Xm,valueOf:Xm,wrapperChain:BD};var ju={camelCase:jL,capitalize:Xb,deburr:Zb,endsWith:yI,escape:Ew,escapeRegExp:AI,kebabCase:V8,lowerCase:X8,lowerFirst:Z8,pad:FR,padEnd:OR,padStart:BR,parseInt:NR,repeat:l4,replace:u4,snakeCase:S4,split:O4,startCase:N4,startsWith:U4,template:iD,templateSettings:y_,toLower:lD,toUpper:hD,trim:dD,trimEnd:vD,trimStart:mD,truncate:gD,unescape:bD,upperCase:RD,upperFirst:py,words:Yb};var ec={attempt:Vb,bindAll:cL,cond:VP,conforms:HP,constant:Qg,defaultTo:QP,flow:jI,flowRight:qI,identity:Bc,iteratee:j8,matches:Q8,matchesProperty:eR,method:oR,methodOf:sR,mixin:qw,noop:Kg,nthArg:dR,over:wR,overEvery:SR,overSome:MR,property:mw,propertyOf:HR,range:e4,rangeRight:t4,stubArray:_y,stubFalse:iy,stubObject:j4,stubString:q4,stubTrue:V4,times:oD,toPath:uD,uniqueId:CD};function Jfe(){var ue=new Bl(this.__wrapped__);return ue.__actions__=pf(this.__actions__),ue.__dir__=this.__dir__,ue.__filtered__=this.__filtered__,ue.__iteratees__=pf(this.__iteratees__),ue.__takeCount__=this.__takeCount__,ue.__views__=pf(this.__views__),ue}var XD=Jfe;function $fe(){if(this.__filtered__){var ue=new Bl(this);ue.__dir__=-1,ue.__filtered__=!0}else ue=this.clone(),ue.__dir__*=-1;return ue}var ZD=$fe;var Qfe=Math.max,ehe=Math.min;function the(ue,ge,Ye){for(var Rt=-1,gr=Ye.length;++Rt0||ge<0)?new Bl(Ye):(ue<0?Ye=Ye.takeRight(-ue):ue&&(Ye=Ye.drop(ue)),ge!==void 0&&(ge=jo(ge),Ye=ge<0?Ye.dropRight(-ge):Ye.take(ge-ue)),Ye)};Bl.prototype.takeRightWhile=function(ue){return this.reverse().takeWhile(ue).reverse()};Bl.prototype.toArray=function(){return this.take(QD)};cp(Bl.prototype,function(ue,ge){var Ye=/^(?:filter|find|map|reject)|While$/.test(ge),Rt=/^(?:head|last)$/.test(ge),gr=va[Rt?"take"+(ge=="last"?"Right":""):ge],Yr=Rt||/^find/.test(ge);gr&&(va.prototype[ge]=function(){var Ea=this.__wrapped__,ei=Rt?[1]:arguments,oi=Ea instanceof Bl,Cn=ei[0],bn=oi||Io(Ea),Fn=function(Kl){var nu=gr.apply(va,Op([Kl],ei));return Rt&&To?nu[0]:nu};bn&&Ye&&typeof Cn=="function"&&Cn.length!=1&&(oi=bn=!1);var To=this.__chain__,ds=!!this.__actions__.length,Qs=Yr&&!To,Vo=oi&&!ds;if(!Yr&&bn){Ea=Vo?Ea:new Bl(this);var Xe=ue.apply(Ea,ei);return Xe.__actions__.push({func:Wv,args:[Fn],thisArg:void 0}),new zp(Xe,To)}return Qs&&Vo?ue.apply(this,ei):(Xe=this.thru(Fn),Qs?Rt?Xe.value()[0]:Xe.value():Xe)})});Nh(["pop","push","shift","sort","splice","unshift"],function(ue){var ge=che[ue],Ye=/^(?:push|sort|unshift)$/.test(ue)?"tap":"thru",Rt=/^(?:pop|shift)$/.test(ue);va.prototype[ue]=function(){var gr=arguments;if(Rt&&!this.__chain__){var Yr=this.value();return ge.apply(Io(Yr)?Yr:[],gr)}return this[Ye](function(Ea){return ge.apply(Io(Ea)?Ea:[],gr)})}});cp(Bl.prototype,function(ue,ge){var Ye=va[ge];if(Ye){var Rt=Ye.name+"";e7.call(Am,Rt)||(Am[Rt]=[]),Am[Rt].push({name:ge,func:Ye})}});Am[ry(void 0,she).name]=[{name:"wrapper",func:void 0}];Bl.prototype.clone=XD;Bl.prototype.reverse=ZD;Bl.prototype.value=KD;va.prototype.at=Id.at;va.prototype.chain=Id.wrapperChain;va.prototype.commit=Id.commit;va.prototype.next=Id.next;va.prototype.plant=Id.plant;va.prototype.reverse=Id.reverse;va.prototype.toJSON=va.prototype.valueOf=va.prototype.value=Id.value;va.prototype.first=va.prototype.head;JD&&(va.prototype[JD]=Id.toIterator);var Qc=va;var Rd=uX(a7());window.PlotlyConfig={MathJaxConfig:"local"};var XA=class{constructor(ge,Ye){this.model=ge,this.serializers=Ye}get(ge){let Ye=this.serializers[ge],Rt=this.model.get(ge);return Ye?.deserialize?Ye.deserialize(Rt):Rt}set(ge,Ye){let Rt=this.serializers[ge];Rt?.serialize&&(Ye=Rt.serialize(Ye)),this.model.set(ge,Ye)}on(ge,Ye){this.model.on(ge,Ye)}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(ge){if(ge==null){var Ye=this.model.get("_widget_data").length;ge=Qc.range(Ye)}return Array.isArray(ge)||(ge=[ge]),ge}do_data(){}do_layout(){}do_addTraces(){var ge=this.model.get("_py2js_addTraces");if(ge!==null){var Ye=this.model.get("_widget_data"),Rt=ge.trace_data;Qc.forEach(Rt,function(gr){Ye.push(gr)})}}do_deleteTraces(){var ge=this.model.get("_py2js_deleteTraces");if(ge!==null){var Ye=ge.delete_inds,Rt=this.model.get("_widget_data");Ye.slice().reverse().forEach(function(gr){Rt.splice(gr,1)})}}do_moveTraces(){var ge=this.model.get("_py2js_moveTraces");if(ge!==null){var Ye=this.model.get("_widget_data"),Rt=ge.current_trace_inds,gr=ge.new_trace_inds;ghe(Ye,Rt,gr)}}do_restyle(){var ge=this.model.get("_py2js_restyle");if(ge!==null){var Ye=ge.restyle_data,Rt=this._normalize_trace_indexes(ge.restyle_traces);n7(this.model.get("_widget_data"),Ye,Rt)}}do_relayout(){var ge=this.model.get("_py2js_relayout");ge!==null&&f2(this.model.get("_widget_layout"),ge.relayout_data)}do_update(){var ge=this.model.get("_py2js_update");if(ge!==null){var Ye=ge.style_data,Rt=ge.layout_data,gr=this._normalize_trace_indexes(ge.style_traces);n7(this.model.get("_widget_data"),Ye,gr),f2(this.model.get("_widget_layout"),Rt)}}do_animate(){var ge=this.model.get("_py2js_animate");if(ge!==null){for(var Ye=ge.style_data,Rt=ge.layout_data,gr=this._normalize_trace_indexes(ge.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 Ye=this.model.get("_last_layout_edit_id"),Rt=this.model.get("_last_trace_edit_id");this.viewID=s7();var gr=Qc.cloneDeep(this.model.get("_widget_data")),Yr=Qc.cloneDeep(this.model.get("_widget_layout"));Yr.height||(Yr.height=360);var Ea=this.model.get("_config");Ea.editSelection=!1,Rd.default.newPlot(ge.el,gr,Yr,Ea).then(function(){ge._sendTraceDeltas(Rt),ge._sendLayoutDelta(Ye),ge.el.on("plotly_restyle",function(oi){ge.handle_plotly_restyle(oi)}),ge.el.on("plotly_relayout",function(oi){ge.handle_plotly_relayout(oi)}),ge.el.on("plotly_update",function(oi){ge.handle_plotly_update(oi)}),ge.el.on("plotly_click",function(oi){ge.handle_plotly_click(oi)}),ge.el.on("plotly_hover",function(oi){ge.handle_plotly_hover(oi)}),ge.el.on("plotly_unhover",function(oi){ge.handle_plotly_unhover(oi)}),ge.el.on("plotly_selected",function(oi){ge.handle_plotly_selected(oi)}),ge.el.on("plotly_deselect",function(oi){ge.handle_plotly_deselect(oi)}),ge.el.on("plotly_doubleclick",function(oi){ge.handle_plotly_doubleclick(oi)});var ei=new CustomEvent("plotlywidget-after-render",{detail:{element:ge.el,viewID:ge.viewID}});document.dispatchEvent(ei)})}_processLuminoMessage(ge,Ye){Ye.apply(this,arguments);var Rt=this;switch(ge.type){case"before-attach":var gr={showgrid:!1,showline:!1,tickvals:[]};Rd.default.newPlot(Rt.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 ge=this,Ye=ge.model.get("_widget_layout");(Qc.isNil(Ye)||Qc.isNil(Ye.width))&&Rd.default.Plots.resize(ge.el).then(function(){var Rt=ge.model.get("_last_layout_edit_id");ge._sendLayoutDelta(Rt)})}remove(){Rd.default.purge(this.el),window.removeEventListener("resize",this.resizeEventListener)}getFullData(){return Qc.mergeWith({},this.el._fullData,this.el.data,i7)}getFullLayout(){return Qc.mergeWith({},this.el._fullLayout,this.el.layout,i7)}buildPointsObject(ge){var Ye;if(ge.hasOwnProperty("points")){var Rt=ge.points,gr=Rt.length,Yr=!0;for(let bn=0;bn=0;gr--)Rt.splice(0,0,ue[ge[gr]]),ue.splice(ge[gr],1);var Yr=Qc(Ye).zip(Rt).sortBy(0).unzip().value();Ye=Yr[0],Rt=Yr[1];for(var Ea=0;Ea0&&typeof Yr[0]=="object"){Ye[Rt]=new Array(Yr.length);for(var Ea=0;Ea0&&(Ye[Rt]=ei)}else typeof Yr=="object"&&!Array.isArray(Yr)?Ye[Rt]=x_(Yr,{}):Yr!==void 0&&typeof Yr!="function"&&(Ye[Rt]=Yr)}}return Ye}function s7(ue,ge,Ye,Rt){if(Ye||(Ye=16),ge===void 0&&(ge=24),ge<=0)return"0";var gr=Math.log(Math.pow(2,ge))/Math.log(Ye),Yr="",Ea,ei,oi;for(Ea=2;gr===1/0;Ea*=2)gr=Math.log(Math.pow(2,ge/Ea))/Math.log(Ye)*Ea;var Cn=gr-Math.floor(gr);for(Ea=0;Ea=Math.pow(2,ge)?Rt>10?(console.warn("randstr failed uniqueness"),Yr):s7(ue,ge,Ye,(Rt||0)+1):Yr}var MHe=()=>{let ue;return{initialize(ge){ue=new XA(ge.model,phe),ue.initialize()},render({el:ge}){let Ye=new ZA(ue,ge);return Ye.perform_render(),()=>Ye.remove()}}};export{XA as FigureModel,ZA as FigureView,MHe as default}; /*! Bundled license information: plotly.js/dist/plotly.js: (*! * pad-left * * Copyright (c) 2014-2015, Jon Schlinkert. * Licensed under the MIT license. *) (*! * repeat-string * * Copyright (c) 2014-2015, Jon Schlinkert. * Licensed under the MIT License. *) (*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh *) (*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT *) (*! * Determine if an object is a Buffer * * @author Feross Aboukhadijeh * @license MIT *) (*! Bundled license information: native-promise-only/lib/npo.src.js: (*! Native Promise Only v0.8.1 (c) Kyle Simpson MIT License: http://getify.mit-license.org *) polybooljs/index.js: (* * @copyright 2016 Sean Connelly (@voidqk), http://syntheti.cc * @license MIT * @preserve Project Home: https://github.com/voidqk/polybooljs *) ieee754/index.js: (*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh *) buffer/index.js: (*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT *) safe-buffer/index.js: (*! safe-buffer. MIT License. Feross Aboukhadijeh *) assert/build/internal/util/comparisons.js: (*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT *) object-assign/index.js: (* object-assign (c) Sindre Sorhus @license MIT *) maplibre-gl/dist/maplibre-gl.js: (** * MapLibre GL JS * @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v4.7.1/LICENSE.txt *) *) lodash-es/lodash.default.js: (** * @license * Lodash (Custom Build) * Build: `lodash modularize exports="es" -o ./` * Copyright OpenJS Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors *) lodash-es/lodash.js: (** * @license * Lodash (Custom Build) * Build: `lodash modularize exports="es" -o ./` * Copyright OpenJS Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors *) */